hax: modify some codes for QEMU 2.0 44/19944/1
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 23 Apr 2014 09:37:56 +0000 (18:37 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 23 Apr 2014 09:37:56 +0000 (18:37 +0900)
Change-Id: I512d7d7d4b2eca10e887edef41ae63c974a1c1f6
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
cpu-exec.c
include/exec/cpu-defs.h
target-i386/hax-all.c

index 3fe9ffc..e119e4c 100644 (file)
@@ -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 */
index 2dd6206..01c0ee8 100644 (file)
@@ -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
index cbc27ab..83f1b66 100644 (file)
@@ -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;
 }