launch: direct: aarch64: Add gic-version=host to -M option.

On ARM machines with vGICv3, we need to use the extra -M
parameter gic-version=3 (or gic-version=2 for the old vGIC).

qemu can detect this feature for us if we pass gic-version=host,
so add that to the -M option.  Unfortunately we cannot detect if
qemu itself supports this parameter, but this change only affects
aarch64.

Thanks: Wei Huang
This commit is contained in:
Richard W.M. Jones
2015-11-24 13:35:26 -05:00
parent 6e15468337
commit 49ad09bae3

View File

@@ -388,12 +388,18 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
ADD_CMDLINE (
#ifdef MACHINE_TYPE
MACHINE_TYPE ","
#endif
#ifdef __aarch64__
"gic-version=host,"
#endif
"accel=kvm:tcg");
else
ADD_CMDLINE (
#ifdef MACHINE_TYPE
MACHINE_TYPE ","
#endif
#ifdef __aarch64__
"gic-version=host,"
#endif
"accel=tcg");