public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Synchronize cpu state with kernel before poking into registers.
@ 2012-02-16  9:12 Gleb Natapov
  2012-02-16 12:55 ` [PATCH uq/master] " Jan Kiszka
  2012-02-16 13:59 ` [PATCH] " Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2012-02-16  9:12 UTC (permalink / raw)
  To: kvm; +Cc: avi, mtosatti

Call to kvm_cpu_synchronize_state() is missing. kvm_arch_stop_on_emulation_error may
look at outdated registers here.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7079e87..51d0ae7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2020,6 +2020,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
 
 bool kvm_arch_stop_on_emulation_error(CPUState *env)
 {
+    kvm_cpu_synchronize_state(env);
     return !(env->cr[0] & CR0_PE_MASK) ||
            ((env->segs[R_CS].selector  & 3) != 3);
 }
--
			Gleb.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-16 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  9:12 [PATCH] Synchronize cpu state with kernel before poking into registers Gleb Natapov
2012-02-16 12:55 ` [PATCH uq/master] " Jan Kiszka
2012-02-16 13:59 ` [PATCH] " Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox