mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
6c263e26a5
commit
d1f8663660
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue