From 7922e247f109f5794e994ef1160e823a9b748bfd Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Wed, 22 Jul 2009 20:51:28 +0200 Subject: [PATCH] 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" --- src/qemu_conf.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/qemu_conf.c b/src/qemu_conf.c index f483a5148b..96f83cb809 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -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;