@@ -254,18 +254,6 @@ typedef struct virtio_input_conf virtio_input_conf;
typedef struct VirtIOSCSIConf VirtIOSCSIConf;
typedef struct VirtIORNGConf VirtIORNGConf;
-#define DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) \
- DEFINE_PROP_BIT64("indirect_desc", _state, _field, \
- VIRTIO_RING_F_INDIRECT_DESC, true), \
- DEFINE_PROP_BIT64("event_idx", _state, _field, \
- VIRTIO_RING_F_EVENT_IDX, true), \
- DEFINE_PROP_BIT64("notify_on_empty", _state, _field, \
- VIRTIO_F_NOTIFY_ON_EMPTY, true), \
- DEFINE_PROP_BIT64("any_layout", _state, _field, \
- VIRTIO_F_ANY_LAYOUT, true), \
- DEFINE_PROP_BIT64("iommu_platform", _state, _field, \
- VIRTIO_F_IOMMU_PLATFORM, false)
-
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n);
hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n);
hwaddr virtio_queue_get_used_addr(VirtIODevice *vdev, int n);
@@ -2601,7 +2601,16 @@ static void virtio_device_instance_finalize(Object *obj)
}
static Property virtio_properties[] = {
- DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
+ DEFINE_PROP_BIT64("indirect_desc", VirtIODevice, host_features,
+ VIRTIO_RING_F_INDIRECT_DESC, true),
+ DEFINE_PROP_BIT64("event_idx", VirtIODevice, host_features,
+ VIRTIO_RING_F_EVENT_IDX, true),
+ DEFINE_PROP_BIT64("notify_on_empty", VirtIODevice, host_features,
+ VIRTIO_F_NOTIFY_ON_EMPTY, true),
+ DEFINE_PROP_BIT64("any_layout", VirtIODevice, host_features,
+ VIRTIO_F_ANY_LAYOUT, true),
+ DEFINE_PROP_BIT64("iommu_platform", VirtIODevice, host_features,
+ VIRTIO_F_IOMMU_PLATFORM, false),
DEFINE_PROP_END_OF_LIST(),
};
This macro is only used in one place so seems to be unnecessary. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- include/hw/virtio/virtio.h | 12 ------------ hw/virtio/virtio.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 13 deletions(-)