aboutsummaryrefslogtreecommitdiffstats
path: root/target-i386
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 /target-i386
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 'target-i386')
-rw-r--r--target-i386/helper.c6
-rw-r--r--target-i386/translate.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 6d0f18c..7e2ac4e 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -28,6 +28,7 @@
#include "exec-all.h"
#include "qemu-common.h"
#include "kvm.h"
+#include "hax.h"
//#define DEBUG_MMU
@@ -662,6 +663,11 @@ void cpu_dump_state(CPUState *env, FILE *f,
if (kvm_enabled())
kvm_arch_get_registers(env);
+#ifdef CONFIG_HAX
+ if (hax_enabled())
+ hax_arch_get_registers(env);
+#endif
+
eflags = env->eflags;
#ifdef TARGET_X86_64
if (env->hflags & HF_CS64_MASK) {
diff --git a/target-i386/translate.c b/target-i386/translate.c
index f4e295f..e05cdac 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -32,6 +32,7 @@
#include "helper.h"
#define GEN_HELPER 1
#include "helper.h"
+#include "hax.h"
#define PREFIX_REPZ 0x01
#define PREFIX_REPNZ 0x02
@@ -7714,6 +7715,14 @@ static inline void gen_intermediate_code_internal(CPUState *env,
pc_ptr = disas_insn(dc, pc_ptr);
num_insns++;
+#ifdef CONFIG_HAX
+ if (hax_enabled() && hax_stop_translate(env))
+ {
+ gen_jmp_im(pc_ptr - dc->cs_base);
+ gen_eob(dc);
+ break;
+ }
+#endif
/* stop translation if indicated */
if (dc->is_jmp)
break;