From 30ecbf3ec2ada68f7e125a180553e31b069033b7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 11 May 2012 21:32:39 +0100 Subject: arm: Disable -machine, -enable-kvm options except on x86, x86-64. Presently KVM is only applicable to x86 and x86-64 (although that will change in future, and there are rumoured to be implementations for some current non-x86 architectures). In any case having these options breaks ARM, so disable them for non-x86 architectures at the moment. --- src/launch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/launch.c b/src/launch.c index bb54fb6b..5c6676fc 100644 --- a/src/launch.c +++ b/src/launch.c @@ -598,6 +598,10 @@ launch_appliance (guestfs_h *g) if (qemu_supports (g, "-nodefconfig")) add_cmdline (g, "-nodefconfig"); + /* The #if on the next line should really be "architectures for + * which KVM is commonly available. + */ +#if defined(__i386__) || defined(__x86_64__) /* The qemu -machine option (added 2010-12) is a bit more sane * since it falls back through various different acceleration * modes, so try that first (thanks Markus Armbruster). @@ -634,6 +638,7 @@ launch_appliance (guestfs_h *g) is_openable (g, "/dev/kvm", O_RDWR|O_CLOEXEC)) add_cmdline (g, "-enable-kvm"); } +#endif /* i386 or x86-64 */ /* Newer versions of qemu (from around 2009/12) changed the * behaviour of monitors so that an implicit '-monitor stdio' is -- cgit