qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v2 04/10] virtio-scsi: Add VirtIOSCSIVring in Vi


From: Fam Zheng
Subject: [Qemu-devel] [RFC PATCH v2 04/10] virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq
Date: Wed, 6 Aug 2014 13:35:02 +0800

Move VirtIOSCSIReq to header and add one field "vring" as a wrapper
structure of Vring, VirtIOSCSIVring.

This is necessary for coming dataplane code that runs uses vring on
iothread.

Signed-off-by: Fam Zheng <address@hidden>
---
 include/hw/virtio/virtio-scsi.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index fcd45e7..6138674 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -17,6 +17,8 @@
 #include "hw/virtio/virtio.h"
 #include "hw/pci/pci.h"
 #include "hw/scsi/scsi.h"
+#include "sysemu/iothread.h"
+#include "hw/virtio/dataplane/vring.h"
 
 #define TYPE_VIRTIO_SCSI_COMMON "virtio-scsi-common"
 #define VIRTIO_SCSI_COMMON(obj) \
@@ -153,6 +155,15 @@ struct VirtIOSCSIConf {
     char *wwpn;
 };
 
+struct VirtIOSCSICommon;
+
+typedef struct {
+    struct VirtIOSCSICommon *parent;
+    Vring vring;
+    EventNotifier host_notifier;
+    EventNotifier guest_notifier;
+} VirtIOSCSIVring;
+
 typedef struct VirtIOSCSICommon {
     VirtIODevice parent_obj;
     VirtIOSCSIConf conf;
@@ -175,6 +186,9 @@ typedef struct {
 typedef struct VirtIOSCSIReq {
     VirtIOSCSI *dev;
     VirtQueue *vq;
+    /* set if create by dataplane code */
+    VirtIOSCSIVring *vring;
+
     VirtQueueElement elem;
     QEMUSGList qsgl;
     SCSIRequest *sreq;
-- 
2.0.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]