From: SeokYeon Hwang Date: Wed, 23 Apr 2014 09:37:56 +0000 (+0900) Subject: hax: modify some codes for QEMU 2.0 X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~386^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F19944%2F1;p=sdk%2Femulator%2Fqemu.git hax: modify some codes for QEMU 2.0 Change-Id: I512d7d7d4b2eca10e887edef41ae63c974a1c1f6 Signed-off-by: SeokYeon Hwang --- diff --git a/cpu-exec.c b/cpu-exec.c index 3fe9ffcf24..e119e4c39e 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -334,7 +334,7 @@ int cpu_exec(CPUArchState *env) #ifdef CONFIG_HAX if (hax_enabled() && !hax_vcpu_exec(env)) - longjmp(env->jmp_env, 1); + longjmp(cpu->jmp_env, 1); #endif next_tb = 0; /* force lookup of first TB */ diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 2dd6206d4a..01c0ee8eb0 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -118,5 +118,9 @@ QEMU_BUILD_BUG_ON(sizeof(CPUTLBEntry) != (1 << CPU_TLB_ENTRY_BITS)); #define CPU_COMMON \ /* soft mmu support */ \ CPU_COMMON_TLB \ + \ + /* for hax */ \ + int hax_vcpu_dirty; \ + struct hax_vcpu_state *hax_vcpu; \ #endif diff --git a/target-i386/hax-all.c b/target-i386/hax-all.c index cbc27ab936..83f1b66aac 100644 --- a/target-i386/hax-all.c +++ b/target-i386/hax-all.c @@ -714,7 +714,7 @@ static int hax_vcpu_hax_exec(CPUArchState *env) /* hlt instruction with interrupt disabled is shutdown */ env->eflags |= IF_MASK; cpu->halted = 1; - env->exception_index = EXCP_HLT; + cpu->exception_index = EXCP_HLT; ret = HAX_EMUL_HLT; } break; @@ -734,7 +734,7 @@ static int hax_vcpu_hax_exec(CPUArchState *env) if (cpu->exit_request) { cpu->exit_request = 0; - env->exception_index = EXCP_INTERRUPT; + cpu->exception_index = EXCP_INTERRUPT; } return ret; }