aboutsummaryrefslogtreecommitdiffstats
path: root/hax.h
diff options
context:
space:
mode:
authorJun Nakajima <jun.nakajima@intel.com>2011-12-17 19:13:25 -0800
committerJiang, Yunhong <yunhong.jiang@intel.com>2012-01-17 06:15:06 +0800
commita381ef07088ce479610129e37bfef42538f397da (patch)
tree523581dd6c18ddd42bb3980483778a3dd5d6154d /hax.h
parente7e8b324a626a4ba112c3ad47d54eb9cfd3025ba (diff)
downloadexternal_qemu-a381ef07088ce479610129e37bfef42538f397da.zip
external_qemu-a381ef07088ce479610129e37bfef42538f397da.tar.gz
external_qemu-a381ef07088ce479610129e37bfef42538f397da.tar.bz2
Changes to existing files to add HAX support
HAX (Hardware-based Accelerated eXecution) employes hardware virtualization technology to boost performance of the Android emulator on Mac OS X or Windows hosts. This changeset includes the changes required to the existing files. To pass the compilation, hax.h is added, but CONFIG_HAX is disabled so that no real changes added. Change-Id: Ifa5777e8788e6698747c1ec4cd91315161c2ca0b Signed-off-by: Zhang, Xiantao <xiantao.zhang@intel.com> Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com> Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com> Signed-off-by: Nakajima, Jun <jun.nakajima@intel.com>
Diffstat (limited to 'hax.h')
-rw-r--r--hax.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/hax.h b/hax.h
new file mode 100644
index 0000000..9af61ce
--- /dev/null
+++ b/hax.h
@@ -0,0 +1,38 @@
+/* header to be included in non-HAX-specific code */
+#ifndef _HAX_H
+#define _HAX_H
+
+#include "config.h"
+#include "qemu-common.h"
+#include "cpu.h"
+
+extern int hax_disabled;
+struct hax_vcpu_state;
+
+#ifdef CONFIG_HAX
+int hax_enabled(void);
+int hax_init(int smp_cpus);
+int hax_init_vcpu(CPUState *env);
+/* Execute vcpu in non-root mode */
+int hax_vcpu_exec(CPUState *env);
+/* Sync vcpu state with HAX driver */
+int hax_sync_vcpus(void);
+void hax_vcpu_sync_state(CPUState *env, int modified);
+int hax_populate_ram(uint64_t va, uint32_t size);
+int hax_set_phys_mem(target_phys_addr_t start_addr,
+ ram_addr_t size, ram_addr_t phys_offset);
+/* Check if QEMU need emulate guest execution */
+int hax_vcpu_emulation_mode(CPUState *env);
+int hax_stop_emulation(CPUState *env);
+int hax_stop_translate(CPUState *env);
+int hax_arch_get_registers(CPUState *env);
+void hax_raise_event(CPUState *env);
+void hax_reset_vcpu_state(void *opaque);
+
+#include "target-i386/hax-interface.h"
+
+#else
+#define hax_enabled() (0)
+#endif
+
+#endif