Always add -no-kvm and -no-kqemu, for qemu domains

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"
This commit is contained in:
Jim Paris 2009-07-22 20:51:28 +02:00 committed by Daniel Veillard
parent 647247740f
commit 7922e247f1

View 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;