summaryrefslogtreecommitdiffstats
path: root/hw/virtio-pci.h
diff options
context:
space:
mode:
authorKONRAD Frederic2013-03-21 15:15:15 +0100
committerAnthony Liguori2013-03-26 15:26:36 +0100
commitbc7b90a010719612344c4a78be7819841e76b7ec (patch)
treea7e6996c49fdb0e0e2718738c4a612d50a715d1d /hw/virtio-pci.h
parentvirtio-scsi: add the virtio-scsi device. (diff)
downloadqemu-bc7b90a010719612344c4a78be7819841e76b7ec.tar.gz
qemu-bc7b90a010719612344c4a78be7819841e76b7ec.tar.xz
qemu-bc7b90a010719612344c4a78be7819841e76b7ec.zip
virtio-scsi-pci: switch to new API.
Here the virtio-scsi-pci is modified for the new API. The device virtio-scsi-pci extends virtio-pci. It creates and connects a virtio-scsi during the init. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-pci.h')
-rw-r--r--hw/virtio-pci.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index a9dbffffea..bfe7a8e1ca 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -26,6 +26,7 @@
typedef struct VirtIOPCIProxy VirtIOPCIProxy;
typedef struct VirtIOBlkPCI VirtIOBlkPCI;
+typedef struct VirtIOSCSIPCI VirtIOSCSIPCI;
/* virtio-pci-bus */
@@ -81,7 +82,6 @@ struct VirtIOPCIProxy {
#endif
virtio_serial_conf serial;
virtio_net_conf net;
- VirtIOSCSIConf scsi;
VirtIORNGConf rng;
bool ioeventfd_disabled;
bool ioeventfd_started;
@@ -90,6 +90,19 @@ struct VirtIOPCIProxy {
VirtioBusState bus;
};
+
+/*
+ * virtio-scsi-pci: This extends VirtioPCIProxy.
+ */
+#define TYPE_VIRTIO_SCSI_PCI "virtio-scsi-pci"
+#define VIRTIO_SCSI_PCI(obj) \
+ OBJECT_CHECK(VirtIOSCSIPCI, (obj), TYPE_VIRTIO_SCSI_PCI)
+
+struct VirtIOSCSIPCI {
+ VirtIOPCIProxy parent_obj;
+ VirtIOSCSI vdev;
+};
+
/*
* virtio-blk-pci: This extends VirtioPCIProxy.
*/