From: Igor Mitsyanko Date: Wed, 5 Dec 2012 19:17:58 +0000 (+0400) Subject: YaGL thread: do not sync with inkernel HAX cpu state X-Git-Tag: TizenStudio_2.0_p2.3~1123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78926883bda33a25824f5b9628faec2f8c07fd37;p=sdk%2Femulator%2Fqemu.git YaGL thread: do not sync with inkernel HAX cpu state 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 --- diff --git a/hw/yagl_process.c b/hw/yagl_process.c index 8accbae..d51aacf 100644 --- a/hw/yagl_process.c +++ b/hw/yagl_process.c @@ -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 diff --git a/hw/yagl_process.h b/hw/yagl_process.h index 4dbeb0f..fd6e875 100644 --- a/hw/yagl_process.h +++ b/hw/yagl_process.h @@ -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 }; diff --git a/hw/yagl_thread.c b/hw/yagl_thread.c index a23fbe1..0b27c34 100644 --- a/hw/yagl_thread.c +++ b/hw/yagl_thread.c @@ -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)); } }