aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2012-02-16 11:12:51 +0200
committerAvi Kivity <avi@redhat.com>2012-02-16 18:21:46 +0200
commitd1f866366070d09ff5c467efb0a64ac582e3aa5d (patch)
treeeb0d96b918f5fd75f940c358034ba53be594c8e3 /target-i386
parent6c263e26a5c162a8cd79e32bb82422697db5c57c (diff)
downloadqemu-d1f866366070d09ff5c467efb0a64ac582e3aa5d.zip
qemu-d1f866366070d09ff5c467efb0a64ac582e3aa5d.tar.gz
qemu-d1f866366070d09ff5c467efb0a64ac582e3aa5d.tar.bz2
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 <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 981192d..0e0b63b 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);
}