[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/9] virtio-9p: move property declarations to header
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 5/9] virtio-9p: move property declarations to header file |
Date: |
Thu, 24 Nov 2011 13:38:24 +0100 |
No s390 change here, since s390 does not (yet?) support virtio-9p.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/9pfs/virtio-9p-device.h | 5 +++++
hw/virtio-pci.c | 4 +---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/9pfs/virtio-9p-device.h b/hw/9pfs/virtio-9p-device.h
index 65789db..7f2a4eb 100644
--- a/hw/9pfs/virtio-9p-device.h
+++ b/hw/9pfs/virtio-9p-device.h
@@ -21,4 +21,9 @@ typedef struct V9fsConf
char *fsdev_id;
} V9fsConf;
+#define DEFINE_VIRTIO_9P_PROPERTIES(_state, _features_field, _conf_field) \
+ DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, _features_field), \
+ DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, _conf_field.tag), \
+ DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, _conf_field.fsdev_id)
+
#endif
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 78c1790..f522156 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -883,9 +883,7 @@ static PCIDeviceInfo virtio_info[] = {
DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
- DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
- DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag),
- DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id),
+ DEFINE_VIRTIO_9P_PROPERTIES(VirtIOPCIProxy, host_features, fsconf),
DEFINE_PROP_END_OF_LIST(),
},
.qdev.reset = virtio_pci_reset,
--
1.7.7.1
- [Qemu-devel] [PATCH 0/9] virtio: device configuration cleanup, Paolo Bonzini, 2011/11/24
- [Qemu-devel] [PATCH 5/9] virtio-9p: move property declarations to header file,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 6/9] virtio-blk: define VirtIOBlkConf, Paolo Bonzini, 2011/11/24
- [Qemu-devel] [PATCH 7/9] virtio-blk: move property declarations to header file, Paolo Bonzini, 2011/11/24
- [Qemu-devel] [PATCH 8/9] virtio-blk: move BlockConf into VirtIOBlkConf, Paolo Bonzini, 2011/11/24
- [Qemu-devel] [PATCH 9/9] virtio: move conf fields into an anonymous union, Paolo Bonzini, 2011/11/24
- Re: [Qemu-devel] [PATCH 0/9] virtio: device configuration cleanup, Michael S. Tsirkin, 2011/11/28