The qemu32/qemu64 models are weird in that the exact combination of
CPUID flags does not match any actual processor. kvm32 and kvm64 are
a better match when not using TCG. Use them when -cpu is only needed
to hardcode a 32-bit guest arch or for kvmclock.
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
---
src/qemu/qemu_command.c | 4 ++--
tests/qemuxml2argvdata/qemu-lib.sh | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 24e3adf..236d779 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3520,9 +3520,9 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
}
if (STREQ(def->os.arch, "i686"))
- default_model = "qemu32";
+ default_model = (def->virtType == VIR_DOMAIN_VIRT_QEMU ? "qemu32" :
"kvm32");
else
- default_model = "qemu64";
+ default_model = (def->virtType == VIR_DOMAIN_VIRT_QEMU ? "qemu64" :
"kvm64");
if (cpu) {
virCPUCompareResult cmp;
diff --git a/tests/qemuxml2argvdata/qemu-lib.sh b/tests/qemuxml2argvdata/qemu-lib.sh
index ba19119..098a110 100644
--- a/tests/qemuxml2argvdata/qemu-lib.sh
+++ b/tests/qemuxml2argvdata/qemu-lib.sh
@@ -41,6 +41,7 @@ x86 [pentium]
x86 [486]
x86 [coreduo]
x86 [qemu32]
+x86 [kvm32]
x86 [kvm64]
x86 [core2duo]
x86 [phenom]
--
1.7.7.1