Add '-accel <mode>' and 'no-accel' options.
This patch adds two new options to better control CPU emulation
acceleration (i.e. KVM and HAX). More specifically:
'-no-accel' can be used to disable acceleration if available.
'-accel off' does the same.
'-accel on' forces to run with acceleration, or refuses to start
the emulator.
'-accel auto' probes the system for a working accelerator and uses
it when possible (i.e. when emulating x86 or x86_64 images only).
Also print some information with -verbose or -debug-init.
Note: This adds QEMU-independent probing code for KVM and HAX
under android/emulation/ (C++), as well as some glue to
use it from C under android/cpu_accelerator.[hc].
Note: HAX is no longer enabled by default when reaching the QEMU
main function.
Change-Id: Ic91db7a3b213d69296c50fec35cd29a32a8e5779
diff --git a/android/cmdline-options.h b/android/cmdline-options.h
index 0c75783..f268f9f 100644
--- a/android/cmdline-options.h
+++ b/android/cmdline-options.h
@@ -93,6 +93,9 @@
CFG_FLAG ( dynamic_skin, "dynamically construct a skin of given size, requires -skin WxH option" )
CFG_PARAM( memory, "<size>", "physical RAM size in MBs" )
+OPT_PARAM( accel, "<mode>", "Configure emulation acceleration" )
+OPT_FLAG ( no_accel, "Same as '-accel off'" )
+
OPT_PARAM( netspeed, "<speed>", "maximum network download/upload speeds" )
OPT_PARAM( netdelay, "<delay>", "network latency emulation" )
OPT_FLAG ( netfast, "disable network shaping" )