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
					
				| 
						 | 
				
			
			@ -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…
	
		Reference in New Issue