]> Git Repo - qemu.git/commitdiff
virtio-scsi: moving host_features from properties to transport properties.
authorKONRAD Frederic <[email protected]>
Thu, 21 Mar 2013 14:15:13 +0000 (15:15 +0100)
committerAnthony Liguori <[email protected]>
Tue, 26 Mar 2013 14:26:35 +0000 (09:26 -0500)
host_features field is part of the transport device. So move all the
host_features related properties into transport device.

Signed-off-by: KONRAD Frederic <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Tested-by: Cornelia Huck <[email protected]>
Message-id: 1363875320[email protected]
Signed-off-by: Anthony Liguori <[email protected]>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio-pci.c
hw/virtio-scsi.h

index c5d5456fa1aa3c53dd54bd42ceaad83b8f45479c..89441f8d2b7cc1d2a50c2063b921173b6b7eac92 100644 (file)
@@ -538,7 +538,8 @@ static const TypeInfo virtio_s390_device_info = {
 };
 
 static Property s390_virtio_scsi_properties[] = {
-    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOS390Device, host_features, scsi),
+    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOS390Device, scsi),
+    DEFINE_VIRTIO_SCSI_FEATURES(VirtIOS390Device, host_features),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 4c44b7e856528d902976fbb1c1862e2d0a9aebcc..a2f9f52bd01074fdccb9c126960191ad6f5ee37c 100644 (file)
@@ -832,7 +832,8 @@ static const TypeInfo virtio_ccw_balloon = {
 
 static Property virtio_ccw_scsi_properties[] = {
     DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
-    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtioCcwDevice, host_features[0], scsi),
+    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtioCcwDevice, scsi),
+    DEFINE_VIRTIO_SCSI_FEATURES(VirtioCcwDevice, host_features[0]),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index f3ece78954ce03b5c358c852a7fb6f6912cb82ab..0cf8b2e869581daf9cad56922e631872dc9ee5bc 100644 (file)
@@ -1221,7 +1221,8 @@ static void virtio_scsi_exit_pci(PCIDevice *pci_dev)
 static Property virtio_scsi_properties[] = {
     DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOPCIProxy, host_features, scsi),
+    DEFINE_VIRTIO_SCSI_FEATURES(VirtIOPCIProxy, host_features),
+    DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOPCIProxy, scsi),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index fb83b67cf7e78dd62d26fe3fe4d11747ba454d7a..da02f08b28e2d120aa85afa12c65e18acbb9b655 100644 (file)
@@ -47,12 +47,16 @@ typedef struct VirtIOSCSI {
     VirtQueue **cmd_vqs;
 } VirtIOSCSI;
 
-#define DEFINE_VIRTIO_SCSI_PROPERTIES(_state, _features_field, _conf_field) \
-    DEFINE_VIRTIO_COMMON_FEATURES(_state, _features_field), \
-    DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
-    DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \
-    DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128), \
-    DEFINE_PROP_BIT("hotplug", _state, _features_field, VIRTIO_SCSI_F_HOTPLUG, true), \
-    DEFINE_PROP_BIT("param_change", _state, _features_field, VIRTIO_SCSI_F_CHANGE, true)
+#define DEFINE_VIRTIO_SCSI_PROPERTIES(_state, _conf_field)                     \
+    DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1),       \
+    DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF),\
+    DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
+
+#define DEFINE_VIRTIO_SCSI_FEATURES(_state, _feature_field)                    \
+    DEFINE_VIRTIO_COMMON_FEATURES(_state, _feature_field),                     \
+    DEFINE_PROP_BIT("hotplug", _state, _feature_field, VIRTIO_SCSI_F_HOTPLUG,  \
+                                                       true),                  \
+    DEFINE_PROP_BIT("param_change", _state, _feature_field,                    \
+                                            VIRTIO_SCSI_F_CHANGE, true)
 
 #endif /* _QEMU_VIRTIO_SCSI_H */
This page took 0.032362 seconds and 4 git commands to generate.