]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Always add -no-kvm and -no-kqemu, for qemu domains
authorJim Paris <jim@jtan.com>
Wed, 22 Jul 2009 18:51:28 +0000 (20:51 +0200)
committerDaniel Veillard <veillard@redhat.com>
Wed, 22 Jul 2009 18:51:28 +0000 (20:51 +0200)
If the qemu binary supports "-no-kvm" and/or "-no-kqemu", they should
always be added for plain "qemu" domains.  Previously, we omitted them
whenever the host and guest architectures implied that they would be
disabled automatically, but that logic was flawed in some cases
(such as i686 and x86_64).
* src/qemu_conf.c: fix the conditions for adding "-no-kvm" and/or "-no-kqemu"

src/qemu_conf.c

index f483a5148b5d880bc4877d0feadb5ac546c17ead..96f83cb809a100a11b75eca403c4fca945c7d594 100644 (file)
@@ -1143,22 +1143,18 @@ int qemudBuildCommandLine(virConnectPtr conn,
     emulator = def->emulator;
 
     /* Need to explicitly disable KQEMU if
-     * 1. Arch matches host arch
-     * 2. Guest domain is 'qemu'
-     * 3. The qemu binary has the -no-kqemu flag
+     * 1. Guest domain is 'qemu'
+     * 2. The qemu binary has the -no-kqemu flag
      */
     if ((qemuCmdFlags & QEMUD_CMD_FLAG_KQEMU) &&
-        STREQ(ut.machine, def->os.arch) &&
         def->virtType == VIR_DOMAIN_VIRT_QEMU)
         disableKQEMU = 1;
 
     /* Need to explicitly disable KVM if
-     * 1. Arch matches host arch
-     * 2. Guest domain is 'qemu'
-     * 3. The qemu binary has the -no-kvm flag
+     * 1. Guest domain is 'qemu'
+     * 2. The qemu binary has the -no-kvm flag
      */
     if ((qemuCmdFlags & QEMUD_CMD_FLAG_KVM) &&
-        STREQ(ut.machine, def->os.arch) &&
         def->virtType == VIR_DOMAIN_VIRT_QEMU)
         disableKVM = 1;