All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
@ 2015-02-09 19:56 Michael S. Tsirkin
  2015-02-11  1:36 ` Chen, Tiejun
  2015-02-11  2:12 ` Peter Maydell
  0 siblings, 2 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2015-02-09 19:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cornelia Huck, Chen, Tiejun, Alexander Graf, stefanha, Peter Maydell

It doesn't make sense to copy values manually:
the only issue with getting headers from linux
seems to be dealing with linux/types, we
can easily fix that automatically while importing.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

FYI this is what I propose instead of the recently
suggested
    virtio: uniform virtio device IDs
we can then rework existing code to include these headers.

Will automatically bring in goodies as they arrive in linux.

This doesn't yet import virtio ccw header,
that won't be hard to add later.

 scripts/update-linux-headers.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index c8e026d..0bd8437 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -76,4 +76,14 @@ else
     cp "$linux/COPYING" "$output/linux-headers"
 fi
 
+rm -rf "$output/standard-headers/linux"
+mkdir -p "$output/standard-headers/linux"
+for f in $tmpdir/include/linux/virtio*h; do
+    header=$(expr "$f" : '.*/\(.*\)');
+    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
+        -e 's/linux\/types/inttypes/' \
+        -e 's/__bitwise__//' \
+        "$tmpdir/include/linux/$header" > \
+        "$output/standard-headers/linux/$header";
+done
 rm -rf "$tmpdir"
-- 
MST

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-09 19:56 [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs Michael S. Tsirkin
@ 2015-02-11  1:36 ` Chen, Tiejun
  2015-02-11  2:03   ` Peter Maydell
  2015-02-11  2:12 ` Peter Maydell
  1 sibling, 1 reply; 11+ messages in thread
From: Chen, Tiejun @ 2015-02-11  1:36 UTC (permalink / raw)
  To: Michael S. Tsirkin, qemu-devel
  Cc: Cornelia Huck, Peter Maydell, Alexander Graf, stefanha

On 2015/2/10 3:56, Michael S. Tsirkin wrote:
> It doesn't make sense to copy values manually:
> the only issue with getting headers from linux
> seems to be dealing with linux/types, we
> can easily fix that automatically while importing.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> FYI this is what I propose instead of the recently
> suggested
>      virtio: uniform virtio device IDs
> we can then rework existing code to include these headers.
>
> Will automatically bring in goodies as they arrive in linux.
>
> This doesn't yet import virtio ccw header,
> that won't be hard to add later.
>
>   scripts/update-linux-headers.sh | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index c8e026d..0bd8437 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -76,4 +76,14 @@ else
>       cp "$linux/COPYING" "$output/linux-headers"
>   fi
>
> +rm -rf "$output/standard-headers/linux"
> +mkdir -p "$output/standard-headers/linux"

Shouldn't we add something in configure file to execute this automatically?

Or instead of creating 'standard-headers/, why can't we go that existing 
linux-headers/?

Thanks
Tiejun

> +for f in $tmpdir/include/linux/virtio*h; do
> +    header=$(expr "$f" : '.*/\(.*\)');
> +    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
> +        -e 's/linux\/types/inttypes/' \
> +        -e 's/__bitwise__//' \
> +        "$tmpdir/include/linux/$header" > \
> +        "$output/standard-headers/linux/$header";
> +done
>   rm -rf "$tmpdir"
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  1:36 ` Chen, Tiejun
@ 2015-02-11  2:03   ` Peter Maydell
  2015-02-11  2:50     ` Chen, Tiejun
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2015-02-11  2:03 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Cornelia Huck, Alexander Graf, QEMU Developers, Stefan Hajnoczi,
	Michael S. Tsirkin

On 11 February 2015 at 01:36, Chen, Tiejun <tiejun.chen@intel.com> wrote:
> On 2015/2/10 3:56, Michael S. Tsirkin wrote:
>>
>> It doesn't make sense to copy values manually:
>> the only issue with getting headers from linux
>> seems to be dealing with linux/types, we
>> can easily fix that automatically while importing.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>
>> FYI this is what I propose instead of the recently
>> suggested
>>      virtio: uniform virtio device IDs
>> we can then rework existing code to include these headers.
>>
>> Will automatically bring in goodies as they arrive in linux.
>>
>> This doesn't yet import virtio ccw header,
>> that won't be hard to add later.
>>
>>   scripts/update-linux-headers.sh | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/scripts/update-linux-headers.sh
>> b/scripts/update-linux-headers.sh
>> index c8e026d..0bd8437 100755
>> --- a/scripts/update-linux-headers.sh
>> +++ b/scripts/update-linux-headers.sh
>> @@ -76,4 +76,14 @@ else
>>       cp "$linux/COPYING" "$output/linux-headers"
>>   fi
>>
>> +rm -rf "$output/standard-headers/linux"
>> +mkdir -p "$output/standard-headers/linux"
>
>
> Shouldn't we add something in configure file to execute this automatically?

No. We want to run this script only when we're updating the
header files, which only happens when we have a valid
kernel source tree available and you're a developer doing
it as a specific action. configure is run by everybody and
should definitely not be doing header updates.

> Or instead of creating 'standard-headers/, why can't we go that existing
> linux-headers/?

The linux-headers/ directory contains header files which can only
validly be included if the host we're compiling on is Linux. Some
of them will cause compile failures on OSX or Windows if they
are in the include path. The idea of this patch is that the
standard-headers/ directory has "sanitized" header files which
have had the linux-specific types and includes stripped out.
So if we take the route this patch proposes we do need two
directories.

-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-09 19:56 [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs Michael S. Tsirkin
  2015-02-11  1:36 ` Chen, Tiejun
@ 2015-02-11  2:12 ` Peter Maydell
  2015-02-11 12:33   ` Michael S. Tsirkin
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2015-02-11  2:12 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cornelia Huck, Chen, Tiejun, QEMU Developers, Stefan Hajnoczi,
	Alexander Graf

On 9 February 2015 at 19:56, Michael S. Tsirkin <mst@redhat.com> wrote:
> +rm -rf "$output/standard-headers/linux"
> +mkdir -p "$output/standard-headers/linux"
> +for f in $tmpdir/include/linux/virtio*h; do
> +    header=$(expr "$f" : '.*/\(.*\)');
> +    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
> +        -e 's/linux\/types/inttypes/' \
> +        -e 's/__bitwise__//' \
> +        "$tmpdir/include/linux/$header" > \
> +        "$output/standard-headers/linux/$header";
> +done

This doesn't seem to be doing anything to fix up
the '__attribute__((packed))' annotations.
Presumably you're intending to put standard-headers/
on the include path? It would probably be better to
not make the headers be in "linux/" in that case,
since it would mean confusion/clashes for what
"linux/virtio_net.h" etc mean -- are they the QEMU
sanitized versions or the host OS's? (Having them
in linux/ also makes code review harder since it breaks
the current rule of thumb that is "no include of
linux/anything in code that's not Linux-host-specific".)

You need to strip out all the #include <linux/something.h>
from these headers, otherwise this won't build on non
Linux hosts. Then you need to add in whatever the
equivalent is to get the defines/types those includes
were providing (for instance our virtio-net.h does a
simple #define of ETH_ALEN). You probably want to make
the update script fail if there's an include it's not
expecting to deal with, otherwise you're likely to
end up with a set of headers that seem OK on Linux
but fail when tested on other OSes -- better to fail
early and for the person trying to do the header update
than to end up with a change that won't pass my build
tests and gets bounced.

All that makes it seem to me like it's more trouble
than it's worth compared to doing a one-time manual
import.

-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  2:03   ` Peter Maydell
@ 2015-02-11  2:50     ` Chen, Tiejun
  2015-02-11  3:46       ` Peter Maydell
  0 siblings, 1 reply; 11+ messages in thread
From: Chen, Tiejun @ 2015-02-11  2:50 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Alexander Graf, QEMU Developers, Stefan Hajnoczi,
	Michael S. Tsirkin

On 2015/2/11 10:03, Peter Maydell wrote:
> On 11 February 2015 at 01:36, Chen, Tiejun <tiejun.chen@intel.com> wrote:
>> On 2015/2/10 3:56, Michael S. Tsirkin wrote:
>>>
>>> It doesn't make sense to copy values manually:
>>> the only issue with getting headers from linux
>>> seems to be dealing with linux/types, we
>>> can easily fix that automatically while importing.
>>>
>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>
>>> FYI this is what I propose instead of the recently
>>> suggested
>>>       virtio: uniform virtio device IDs
>>> we can then rework existing code to include these headers.
>>>
>>> Will automatically bring in goodies as they arrive in linux.
>>>
>>> This doesn't yet import virtio ccw header,
>>> that won't be hard to add later.
>>>
>>>    scripts/update-linux-headers.sh | 10 ++++++++++
>>>    1 file changed, 10 insertions(+)
>>>
>>> diff --git a/scripts/update-linux-headers.sh
>>> b/scripts/update-linux-headers.sh
>>> index c8e026d..0bd8437 100755
>>> --- a/scripts/update-linux-headers.sh
>>> +++ b/scripts/update-linux-headers.sh
>>> @@ -76,4 +76,14 @@ else
>>>        cp "$linux/COPYING" "$output/linux-headers"
>>>    fi
>>>
>>> +rm -rf "$output/standard-headers/linux"
>>> +mkdir -p "$output/standard-headers/linux"
>>
>>
>> Shouldn't we add something in configure file to execute this automatically?
>
> No. We want to run this script only when we're updating the
> header files, which only happens when we have a valid
> kernel source tree available and you're a developer doing
> it as a specific action. configure is run by everybody and
> should definitely not be doing header updates.
>
>> Or instead of creating 'standard-headers/, why can't we go that existing
>> linux-headers/?
>
> The linux-headers/ directory contains header files which can only
> validly be included if the host we're compiling on is Linux. Some
> of them will cause compile failures on OSX or Windows if they
> are in the include path. The idea of this patch is that the
> standard-headers/ directory has "sanitized" header files which
> have had the linux-specific types and includes stripped out.
> So if we take the route this patch proposes we do need two
> directories.
>

This confounds me since for instance, one of goals based on this patch 
is, it exposes those Virtio devices ID definition to hw/virtio, instead 
of my original patch, right? So without this sort of standard-hearders, 
how can we compile virtio? Or you mean we still keep those original 
stuff in include/hw/virtio*, but somehow update them once we execute 
that script manually.

Thanks
Tiejun

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  2:50     ` Chen, Tiejun
@ 2015-02-11  3:46       ` Peter Maydell
  2015-02-11  8:08         ` Chen, Tiejun
  2015-02-11 12:28         ` Michael S. Tsirkin
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Maydell @ 2015-02-11  3:46 UTC (permalink / raw)
  To: Chen, Tiejun
  Cc: Cornelia Huck, Alexander Graf, QEMU Developers, Stefan Hajnoczi,
	Michael S. Tsirkin

On 11 February 2015 at 02:50, Chen, Tiejun <tiejun.chen@intel.com> wrote:
> On 2015/2/11 10:03, Peter Maydell wrote:
>> The linux-headers/ directory contains header files which can only
>> validly be included if the host we're compiling on is Linux. Some
>> of them will cause compile failures on OSX or Windows if they
>> are in the include path. The idea of this patch is that the
>> standard-headers/ directory has "sanitized" header files which
>> have had the linux-specific types and includes stripped out.
>> So if we take the route this patch proposes we do need two
>> directories.
>>
>
> This confounds me since for instance, one of goals based on this patch is,
> it exposes those Virtio devices ID definition to hw/virtio, instead of my
> original patch, right? So without this sort of standard-hearders, how can we
> compile virtio? Or you mean we still keep those original stuff in
> include/hw/virtio*, but somehow update them once we execute that script
> manually.

I'm confused about why you're confused. We have two basic
approaches we can take:

(1) What we do at the moment. There are headers defining the virtio
interface in include/hw/virtio, and these are basically manually
created and updated as necessary.

(2) What this patch is proposing. The headers defining virtio are
automatically copied into standard-headers/ and fixed up to make
them work with QEMU on all the hosts we support. This happens when
this script is run by a developer to update QEMU's headers based
on some new upstream kernel.

Personally I think that option 1 is more reliable and overall
less effort, since automatiing the fixups is hard and virtio
doesn't change very much.

-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  3:46       ` Peter Maydell
@ 2015-02-11  8:08         ` Chen, Tiejun
  2015-02-11 12:28         ` Michael S. Tsirkin
  1 sibling, 0 replies; 11+ messages in thread
From: Chen, Tiejun @ 2015-02-11  8:08 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Alexander Graf, QEMU Developers, Stefan Hajnoczi,
	Michael S. Tsirkin

On 2015/2/11 11:46, Peter Maydell wrote:
> On 11 February 2015 at 02:50, Chen, Tiejun <tiejun.chen@intel.com> wrote:
>> On 2015/2/11 10:03, Peter Maydell wrote:
>>> The linux-headers/ directory contains header files which can only
>>> validly be included if the host we're compiling on is Linux. Some
>>> of them will cause compile failures on OSX or Windows if they
>>> are in the include path. The idea of this patch is that the
>>> standard-headers/ directory has "sanitized" header files which
>>> have had the linux-specific types and includes stripped out.
>>> So if we take the route this patch proposes we do need two
>>> directories.
>>>
>>
>> This confounds me since for instance, one of goals based on this patch is,
>> it exposes those Virtio devices ID definition to hw/virtio, instead of my
>> original patch, right? So without this sort of standard-hearders, how can we
>> compile virtio? Or you mean we still keep those original stuff in
>> include/hw/virtio*, but somehow update them once we execute that script
>> manually.
>
> I'm confused about why you're confused. We have two basic
> approaches we can take:
>
> (1) What we do at the moment. There are headers defining the virtio
> interface in include/hw/virtio, and these are basically manually
> created and updated as necessary.
>
> (2) What this patch is proposing. The headers defining virtio are
> automatically copied into standard-headers/ and fixed up to make
> them work with QEMU on all the hosts we support. This happens when
> this script is run by a developer to update QEMU's headers based
> on some new upstream kernel.

I guess this mean this patch should be extended to smooth something in 
include/hw/virtio* in some ways.

>
> Personally I think that option 1 is more reliable and overall

Agreed.

> less effort, since automatiing the fixups is hard and virtio
> doesn't change very much.
>

So sounds my original patch is fine to you.

Thanks
Tiejun

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  3:46       ` Peter Maydell
  2015-02-11  8:08         ` Chen, Tiejun
@ 2015-02-11 12:28         ` Michael S. Tsirkin
  1 sibling, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2015-02-11 12:28 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Chen, Tiejun, QEMU Developers, Stefan Hajnoczi,
	Alexander Graf

On Wed, Feb 11, 2015 at 03:46:20AM +0000, Peter Maydell wrote:
> On 11 February 2015 at 02:50, Chen, Tiejun <tiejun.chen@intel.com> wrote:
> > On 2015/2/11 10:03, Peter Maydell wrote:
> >> The linux-headers/ directory contains header files which can only
> >> validly be included if the host we're compiling on is Linux. Some
> >> of them will cause compile failures on OSX or Windows if they
> >> are in the include path. The idea of this patch is that the
> >> standard-headers/ directory has "sanitized" header files which
> >> have had the linux-specific types and includes stripped out.
> >> So if we take the route this patch proposes we do need two
> >> directories.
> >>
> >
> > This confounds me since for instance, one of goals based on this patch is,
> > it exposes those Virtio devices ID definition to hw/virtio, instead of my
> > original patch, right? So without this sort of standard-hearders, how can we
> > compile virtio? Or you mean we still keep those original stuff in
> > include/hw/virtio*, but somehow update them once we execute that script
> > manually.
> 
> I'm confused about why you're confused. We have two basic
> approaches we can take:
> 
> (1) What we do at the moment. There are headers defining the virtio
> interface in include/hw/virtio, and these are basically manually
> created and updated as necessary.
> 
> (2) What this patch is proposing. The headers defining virtio are
> automatically copied into standard-headers/ and fixed up to make
> them work with QEMU on all the hosts we support. This happens when
> this script is run by a developer to update QEMU's headers based
> on some new upstream kernel.
> 
> Personally I think that option 1 is more reliable and overall
> less effort, since automatiing the fixups is hard and virtio
> doesn't change very much.
> 
> -- PMM

It picked up speed recently, so it's too much effort I think.
My script seems to have automated fixups - didn't seem hard.

-- 
MST

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11  2:12 ` Peter Maydell
@ 2015-02-11 12:33   ` Michael S. Tsirkin
  2015-02-11 13:29     ` Peter Maydell
  0 siblings, 1 reply; 11+ messages in thread
From: Michael S. Tsirkin @ 2015-02-11 12:33 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Chen, Tiejun, QEMU Developers, Stefan Hajnoczi,
	Alexander Graf

On Wed, Feb 11, 2015 at 02:12:35AM +0000, Peter Maydell wrote:
> On 9 February 2015 at 19:56, Michael S. Tsirkin <mst@redhat.com> wrote:
> > +rm -rf "$output/standard-headers/linux"
> > +mkdir -p "$output/standard-headers/linux"
> > +for f in $tmpdir/include/linux/virtio*h; do
> > +    header=$(expr "$f" : '.*/\(.*\)');
> > +    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
> > +        -e 's/linux\/types/inttypes/' \
> > +        -e 's/__bitwise__//' \
> > +        "$tmpdir/include/linux/$header" > \
> > +        "$output/standard-headers/linux/$header";
> > +done
> 
> This doesn't seem to be doing anything to fix up
> the '__attribute__((packed))' annotations.

I don't know - what needs to be fixed up?

> Presumably you're intending to put standard-headers/
> on the include path? It would probably be better to
> not make the headers be in "linux/" in that case,
> since it would mean confusion/clashes for what
> "linux/virtio_net.h" etc mean -- are they the QEMU
> sanitized versions or the host OS's? (Having them
> in linux/ also makes code review harder since it breaks
> the current rule of thumb that is "no include of
> linux/anything in code that's not Linux-host-specific".)

Agreed, I'll change this.

> You need to strip out all the #include <linux/something.h>
> from these headers, otherwise this won't build on non
> Linux hosts.
> Then you need to add in whatever the
> equivalent is to get the defines/types those includes
> were providing (for instance our virtio-net.h does a
> simple #define of ETH_ALEN). You probably want to make
> the update script fail if there's an include it's not
> expecting to deal with, otherwise you're likely to
> end up with a set of headers that seem OK on Linux
> but fail when tested on other OSes -- better to fail
> early and for the person trying to do the header update
> than to end up with a change that won't pass my build
> tests and gets bounced.

OK, seems easy.
Will do.

> All that makes it seem to me like it's more trouble
> than it's worth compared to doing a one-time manual
> import.
> 
> -- PMM

Only true if we are perfect and don't make mistakes.
If we do make mistakes, I want to fix them in one place
and propagate the fix automatically.
And since we are working on virtio 1.0 which is a huge change,
introducing mistakes seems more likely.

-- 
MST

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11 12:33   ` Michael S. Tsirkin
@ 2015-02-11 13:29     ` Peter Maydell
  2015-02-11 14:09       ` Michael S. Tsirkin
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2015-02-11 13:29 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Cornelia Huck, Chen, Tiejun, QEMU Developers, Stefan Hajnoczi,
	Alexander Graf

On 11 February 2015 at 12:33, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, Feb 11, 2015 at 02:12:35AM +0000, Peter Maydell wrote:
>> On 9 February 2015 at 19:56, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > +rm -rf "$output/standard-headers/linux"
>> > +mkdir -p "$output/standard-headers/linux"
>> > +for f in $tmpdir/include/linux/virtio*h; do
>> > +    header=$(expr "$f" : '.*/\(.*\)');
>> > +    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
>> > +        -e 's/linux\/types/inttypes/' \
>> > +        -e 's/__bitwise__//' \
>> > +        "$tmpdir/include/linux/$header" > \
>> > +        "$output/standard-headers/linux/$header";
>> > +done
>>
>> This doesn't seem to be doing anything to fix up
>> the '__attribute__((packed))' annotations.
>
> I don't know - what needs to be fixed up?

Needs to use the QEMU_PACKED macro.

-- PMM

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs
  2015-02-11 13:29     ` Peter Maydell
@ 2015-02-11 14:09       ` Michael S. Tsirkin
  0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Tsirkin @ 2015-02-11 14:09 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Cornelia Huck, Chen, Tiejun, QEMU Developers, Stefan Hajnoczi,
	Alexander Graf

On Wed, Feb 11, 2015 at 01:29:53PM +0000, Peter Maydell wrote:
> On 11 February 2015 at 12:33, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Wed, Feb 11, 2015 at 02:12:35AM +0000, Peter Maydell wrote:
> >> On 9 February 2015 at 19:56, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> > +rm -rf "$output/standard-headers/linux"
> >> > +mkdir -p "$output/standard-headers/linux"
> >> > +for f in $tmpdir/include/linux/virtio*h; do
> >> > +    header=$(expr "$f" : '.*/\(.*\)');
> >> > +    sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \
> >> > +        -e 's/linux\/types/inttypes/' \
> >> > +        -e 's/__bitwise__//' \
> >> > +        "$tmpdir/include/linux/$header" > \
> >> > +        "$output/standard-headers/linux/$header";
> >> > +done
> >>
> >> This doesn't seem to be doing anything to fix up
> >> the '__attribute__((packed))' annotations.
> >
> > I don't know - what needs to be fixed up?
> 
> Needs to use the QEMU_PACKED macro.
> 
> -- PMM

Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-11 14:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 19:56 [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs Michael S. Tsirkin
2015-02-11  1:36 ` Chen, Tiejun
2015-02-11  2:03   ` Peter Maydell
2015-02-11  2:50     ` Chen, Tiejun
2015-02-11  3:46       ` Peter Maydell
2015-02-11  8:08         ` Chen, Tiejun
2015-02-11 12:28         ` Michael S. Tsirkin
2015-02-11  2:12 ` Peter Maydell
2015-02-11 12:33   ` Michael S. Tsirkin
2015-02-11 13:29     ` Peter Maydell
2015-02-11 14:09       ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.