[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 25/61] virtio-scsi : moving host_features from prope
From: |
fred . konrad |
Subject: |
[Qemu-devel] [PATCH 25/61] virtio-scsi : moving host_features from properties to transport properties. |
Date: |
Mon, 7 Jan 2013 19:40:38 +0100 |
From: KONRAD Frederic <address@hidden>
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 <address@hidden>
---
hw/s390-virtio-bus.c | 7 ++++++-
hw/virtio-pci.c | 7 ++++++-
hw/virtio-scsi.h | 9 +++------
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index 8a2c8b3..283b7b6 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -543,7 +543,12 @@ static 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_COMMON_FEATURES(VirtIOS390Device, host_features),
+ DEFINE_PROP_BIT("hotplug", VirtIOS390Device, host_features,
+ VIRTIO_SCSI_F_HOTPLUG, true),
+ DEFINE_PROP_BIT("param_change", VirtIOS390Device, host_features,
+ VIRTIO_SCSI_F_CHANGE, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 06bdbe1..8955b73 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -1010,7 +1010,12 @@ 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_COMMON_FEATURES(VirtIOPCIProxy, host_features),
+ DEFINE_PROP_BIT("hotplug", VirtIOPCIProxy, host_features,
+ VIRTIO_SCSI_F_HOTPLUG, true),
+ DEFINE_PROP_BIT("param_change", VirtIOPCIProxy, host_features,
+ VIRTIO_SCSI_F_CHANGE, true),
+ DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOPCIProxy, scsi),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h
index c659ba1..197a7b5 100644
--- a/hw/virtio-scsi.h
+++ b/hw/virtio-scsi.h
@@ -47,12 +47,9 @@ typedef struct {
VirtQueue **cmd_vqs;
} VirtIOSCSI;
-#define DEFINE_VIRTIO_SCSI_PROPERTIES(_state, _features_field, _conf_field) \
- DEFINE_VIRTIO_COMMON_FEATURES(_state, _features_field), \
+#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_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_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors,
0xFFFF),\
+ DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
#endif /* _QEMU_VIRTIO_SCSI_H */
--
1.7.11.7
- [Qemu-devel] [PATCH 42/61] virtio-rng-pci : switch to the new API., (continued)
- [Qemu-devel] [PATCH 42/61] virtio-rng-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 47/61] virtio-serial : add the virtio-serial device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 61/61] virtio : cleanup : init and exit function., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 51/61] virtio-serial : cleanup : use QOM casts., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 56/61] virtio-9p : cleanup : QOM casts., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 59/61] s390-virtio-bus : cleanup, fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 57/61] virtio : remove the function pointer., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 22/61] virtio-scsi : show the VirtIOSCSI structure., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 58/61] virtio-pci : cleanup : init, exit and reset functions., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 53/61] virtio-9p : add the virtio-9p device., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 25/61] virtio-scsi : moving host_features from properties to transport properties.,
fred . konrad <=
- [Qemu-devel] [PATCH 55/61] virtio-9p : cleanup : init function., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 54/61] virtio-9p-pci : switch to the new API., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 60/61] virtio : remove virtiobindings., fred . konrad, 2013/01/07
- Re: [Qemu-devel] [PATCH 00/61] Virtio refactoring., Anthony Liguori, 2013/01/07
- [Qemu-devel] [PATCH 44/61] virtio-rng.c : cleanup : remove qdev field., fred . konrad, 2013/01/07
- [Qemu-devel] [PATCH 26/61] virtio-scsi : add the virtio-scsi device., fred . konrad, 2013/01/07