From d1f866366070d09ff5c467efb0a64ac582e3aa5d Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Thu, 16 Feb 2012 11:12:51 +0200 Subject: kvm: Synchronize cpu state in kvm_arch_stop_on_emulation_error() 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 Signed-off-by: Avi Kivity Reviewed-by: Jan Kiszka --- target-i386/kvm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'target-i386') diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 981192ddf8..0e0b63bb3e 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1987,6 +1987,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); } -- cgit v1.2.3