[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: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [SeaBIOS] [PATCH 05/18] virtio: add version 1.0 structs and #defines |
Date: |
Mon, 29 Jun 2015 15:35:59 +0200 |
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.
> BTW, it would be nice (but certainly not required) to move these types
> of interface definitions to a new virtio header in the std/ directory.
Can do that.
cheers,
Gerd
[Qemu-devel] [PATCH 07/18] virtio: add version 1.0 read/write macros, Gerd Hoffmann, 2015/06/29