From: Cole Robinson Date: Thu, 1 Aug 2013 01:37:40 +0000 (-0400) Subject: qemu: Only setup vhost if virtType == "kvm" X-Git-Tag: v1.1.2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d962318c4f3f8f2b020b391dc8deadaf658e7acd;p=thirdparty%2Flibvirt.git qemu: Only setup vhost if virtType == "kvm" vhost only works in KVM mode at the moment, and is infact compiled out if the emulator is built for non-native architecture. While it may work at some point in the future for plain qemu, for now it's just noise on the command line (and which contributes to arm cli breakage). --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 45a334734a..f8fccead4b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -441,8 +441,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; }