Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/s390-virtio-bus.h | 8 +++++--- hw/virtio-pci.h | 10 ++++++---- 2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index 414fd22..b9f711d 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-bus.h @@ -42,10 +42,12 @@ typedef struct VirtIOS390Device { ram_addr_t feat_offs; uint8_t feat_len; VirtIODevice *vdev; - VirtIOBlkConf blk; uint32_t host_features; - virtio_serial_conf serial; - virtio_net_conf net; + union { + VirtIOBlkConf blk; + virtio_serial_conf serial; + virtio_net_conf net; + }; } VirtIOS390Device; typedef struct VirtIOS390Bus { diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index a10df5a..0a9034a 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -33,13 +33,15 @@ typedef struct { uint32_t flags; uint32_t class_code; uint32_t nvectors; - VirtIOBlkConf blk; uint32_t host_features; + union { + VirtIOBlkConf blk; #ifdef CONFIG_VIRTFS - V9fsConf fsconf; + V9fsConf fsconf; #endif - virtio_serial_conf serial; - virtio_net_conf net; + virtio_serial_conf serial; + virtio_net_conf net; + }; bool ioeventfd_disabled; bool ioeventfd_started; } VirtIOPCIProxy; -- 1.7.7.1