From: Stanislav Vorobiov Date: Mon, 16 Sep 2013 13:47:41 +0000 (+0400) Subject: YaGL: Fix QEMU 1.6 merge cpu state related bugs X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~731^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51fa849f46525eef6fb0567276716c40299debeb;p=sdk%2Femulator%2Fqemu.git YaGL: Fix QEMU 1.6 merge cpu state related bugs current_cpu is not CPUX86State, CPUX86State is in current_cpu->env_ptr now --- diff --git a/hw/yagl_process.c b/hw/yagl_process.c index 3e384288e7..2c672aa233 100644 --- a/hw/yagl_process.c +++ b/hw/yagl_process.c @@ -18,7 +18,7 @@ struct yagl_process_state #ifdef CONFIG_KVM cpu_synchronize_state(current_cpu); - memcpy(&ps->cr[0], &((CPUX86State*)current_cpu)->cr[0], sizeof(ps->cr)); + memcpy(&ps->cr[0], &((CPUX86State*)current_cpu->env_ptr)->cr[0], sizeof(ps->cr)); #endif return ps; diff --git a/hw/yagl_thread.c b/hw/yagl_thread.c index b497ccdc93..eded5b5b81 100644 --- a/hw/yagl_thread.c +++ b/hw/yagl_thread.c @@ -15,7 +15,7 @@ YAGL_DEFINE_TLS(struct yagl_thread_state*, cur_ts); static __inline void yagl_cpu_synchronize_state(struct yagl_process_state *ps) { if (kvm_enabled()) { - memcpy(&((CPUX86State*)current_cpu)->cr[0], &ps->cr[0], sizeof(ps->cr)); + memcpy(&((CPUX86State*)current_cpu->env_ptr)->cr[0], &ps->cr[0], sizeof(ps->cr)); } } #else