From 78926883bda33a25824f5b9628faec2f8c07fd37 Mon Sep 17 00:00:00 2001 From: Igor Mitsyanko Date: Wed, 5 Dec 2012 23:17:58 +0400 Subject: [PATCH] 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 --- hw/yagl_process.c | 2 +- hw/yagl_process.h | 2 +- hw/yagl_thread.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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)); } } -- 2.7.4