Skip to contentSkip to conversation

Synchronize cpu state with kernel before poking into registers.

PATCH Applied Gleb Natapov 3 participants 3 messages Feb 16, 2012 KVM

lore
Share & tools
lore
#0 lore raw

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.

target-i386/kvm.c +1 -0
index 7079e87..51d0ae7 100644
@@ -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.

Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Gleb Natapov

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

target-i386/kvm.c +0 -0
index 7079e87..51d0ae7 100644

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);
 }
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
Applied
#2 lore raw
In reply to Gleb Natapov
Quoted 4 lines · Gleb Natapov

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

Thanks, applied to uq/master.

Signature · 1 line
error compiling committee.c: too many arguments to function