[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [SeaBIOS] [PATCH 05/18] virtio: add version 1.0 structs
From: |
Kevin O'Connor |
Subject: |
Re: [Qemu-devel] [SeaBIOS] [PATCH 05/18] virtio: add version 1.0 structs and #defines |
Date: |
Mon, 29 Jun 2015 10:21:25 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jun 29, 2015 at 03:35:59PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > > +typedef struct virtio_pci_common_cfg {
> > > + /* About the whole device. */
> > > + u32 device_feature_select; /* read-write */
> >
> > If I understand these structs correctly, they don't reside in memory,
> > but instead represent an interface layout and are used with offsetof()
> > and sizeof().
>
> Correct.
>
> > If so, I think they should be marked with PACKED.
>
> They are carefully ordered and padded so that adding PACKED should not
> change anything. The linux kernel has them without PACKED too.
Okay - it's up to you. It helps a little with documentation - but
moving to "std/" would acomplish the same thing.
-Kevin
[Qemu-devel] [PATCH 07/18] virtio: add version 1.0 read/write macros, Gerd Hoffmann, 2015/06/29
[Qemu-devel] [PATCH 08/18] virtio: make features 64bit, support version 1.0 features, Gerd Hoffmann, 2015/06/29