From 92d5793f73c463576a17d6a281cf7b3c8804aea0 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Wed, 23 Apr 2014 18:37:56 +0900 Subject: [PATCH] hax: modify some codes for QEMU 2.0 Change-Id: I512d7d7d4b2eca10e887edef41ae63c974a1c1f6 Signed-off-by: SeokYeon Hwang --- cpu-exec.c | 2 +- include/exec/cpu-defs.h | 4 ++++ target-i386/hax-all.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) 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; } -- 2.34.1