summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-05-11 21:32:39 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-12 16:59:48 +0100
commit30ecbf3ec2ada68f7e125a180553e31b069033b7 (patch)
tree4c3e6700f4da699011da807d32d1c2120b3c0d5a
parent10725acf9666c067df569fbcae86b48d8381ac81 (diff)
downloadlibguestfs-30ecbf3ec2ada68f7e125a180553e31b069033b7.tar.gz
libguestfs-30ecbf3ec2ada68f7e125a180553e31b069033b7.tar.xz
libguestfs-30ecbf3ec2ada68f7e125a180553e31b069033b7.zip
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.
-rw-r--r--src/launch.c5
1 files changed, 5 insertions, 0 deletions
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