[PATCH v1 05/19] qemu: Allow a vhost protocol for scsi hostdev

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

 



Make sure that the new vhost protocol does not drive the existing
virtio SCSI code.

Signed-off-by: Eric Farman <farman@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_cgroup.c | 5 +++++
 src/qemu/qemu_conf.c   | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 2dca874..f14cfe8 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -356,6 +356,11 @@ qemuSetupHostdevCgroup(virDomainObjPtr vm,
                  */
                 VIR_DEBUG("Not updating cgroups for hostdev iSCSI path '%s'",
                           iscsisrc->path);
+            } else if (scsisrc->protocol ==
+                       VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_VHOST) {
+                virDomainHostdevSubsysSCSIVhostPtr vhostsrc = &scsisrc->u.vhost;
+                VIR_DEBUG("Not updating cgroups for hostdev vhost path '%s'",
+                          vhostsrc->wwpn);
             } else {
                 virDomainHostdevSubsysSCSIHostPtr scsihostsrc =
                     &scsisrc->u.host;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 64f85dd..1175d08 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1106,7 +1106,9 @@ qemuIsSharedHostdev(virDomainHostdevDefPtr hostdev)
         return false;
 
     if (hostdev->source.subsys.u.scsi.protocol ==
-        VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI)
+        VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI ||
+        hostdev->source.subsys.u.scsi.protocol ==
+        VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_VHOST)
         return false;
 
     return true;
-- 
1.9.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]