Synchronize cpu state with kernel before poking into registers.
PATCH 1/1 Synchronize cpu state with kernel before poking into registers.
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 <[email protected]>
target-i386/kvm.c +1 -0
@@ -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.
Quoted 9 lines · Gleb Natapov
Call to
kvm_cpu_synchronize_state()is missing.kvm_arch_stop_on_emulation_errormay look at outdated registers here.Signed-off-by Gleb Natapov <[email protected]>target-i386/kvm.c +0
-0
target-i386/kvm.c int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run) · line 2026
Quoted 7 lines
target-i386/kvm.c +1
-0@@ -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 ); }
Reviewed-by Jan Kiszka <[email protected]>
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Avi Kivity
AppliedQuoted 4 lines · Gleb Natapov
Call to
kvm_cpu_synchronize_state()is missing.kvm_arch_stop_on_emulation_errormay look at outdated registers here.
Thanks, applied to uq/master.
Signature · 1 line
error compiling committee.c: too many arguments to function