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