On Tue, Dec 11, 2012 at 14:53:38 +0000, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Use virArch APIs to determine host architecture when launching
QEMU.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_command.c | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 9009bd2..6968f74 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
...
@@ -4414,7 +4400,7 @@ qemuBuildCpuArgStr(const virQEMUDriverPtr
driver,
* 2. emulator is qemu-system-x86_64
*/
if (STREQ(def->os.arch, "i686") &&
- ((STREQ(ut->machine, "x86_64") &&
+ (((hostarch == VIR_ARCH_X86_64) &&
Unneeded ().
strstr(emulator, "kvm")) ||
strstr(emulator, "x86_64"))) {
virBufferAdd(&buf, default_model, -1);
ACK
Jirka