[PATCH 8/9] qemu: Only setup vhost if virtType == "kvm"

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

 



vhost only works in KVM mode AIUI, and is infact compiled out if
the emulator is built for non-native architecture.
---
 src/qemu/qemu_command.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3b275e3..f611940 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -462,8 +462,10 @@ qemuOpenVhostNet(virDomainDefPtr def,
 {
     size_t i;
 
-    /* If the config says explicitly to not use vhost, return now */
-    if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_QEMU) {
+    /* If running a plain QEMU guest, or
+     * if the config says explicitly to not use vhost, return now*/
+    if (def->virtType != VIR_DOMAIN_VIRT_KVM ||
+        net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_QEMU) {
         *vhostfdSize = 0;
         return 0;
     }
-- 
1.8.3.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]