YaGL thread: do not sync with inkernel HAX cpu state
authorIgor Mitsyanko <i.mitsyanko@samsung.com>
Wed, 5 Dec 2012 19:17:58 +0000 (23:17 +0400)
committerKitae Kim <kt920.kim@samsung.com>
Thu, 20 Dec 2012 07:37:52 +0000 (16:37 +0900)
In case of HAX cpu state sync is performed every time HAX leaves kernel
before emulating MMIO instructions, no need to do this again in YaGl
device.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
hw/yagl_process.c
hw/yagl_process.h
hw/yagl_thread.c

index 8accbae..d51aacf 100644 (file)
@@ -26,7 +26,7 @@ struct yagl_process_state
         }
     }
 
-#ifdef TARGET_I386
+#ifdef CONFIG_KVM
     cpu_synchronize_state(cpu_single_env);
     memcpy(&ps->cr[0], &((CPUX86State*)cpu_single_env)->cr[0], sizeof(ps->cr));
 #endif
index 4dbeb0f..fd6e875 100644 (file)
@@ -25,7 +25,7 @@ struct yagl_process_state
 
     QLIST_HEAD(, yagl_thread_state) threads;
 
-#ifdef TARGET_I386
+#ifdef CONFIG_KVM
     target_ulong cr[5];
 #endif
 };
index a23fbe1..0b27c34 100644 (file)
@@ -9,10 +9,10 @@
 #include "kvm.h"
 #include "hax.h"
 
-#ifdef TARGET_I386
+#ifdef CONFIG_KVM
 static __inline void yagl_cpu_synchronize_state(struct yagl_process_state *ps)
 {
-    if (kvm_enabled() || hax_enabled()) {
+    if (kvm_enabled()) {
         memcpy(&((CPUX86State*)cpu_single_env)->cr[0], &ps->cr[0], sizeof(ps->cr));
     }
 }