mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	KVM: nVMX: Do not emulate #UD while in guest mode
While in L2, leave all #UD to L2 and do not try to emulate it. If L1 is interested in doing this, it reports its interest via the exception bitmap, and we never get into handle_exception of L0 anyway. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
		
							parent
							
								
									b34a80517b
								
							
						
					
					
						commit
						ae1f576707
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -5065,6 +5065,10 @@ static int handle_exception(struct kvm_vcpu *vcpu)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if (is_invalid_opcode(intr_info)) {
 | 
			
		||||
		if (is_guest_mode(vcpu)) {
 | 
			
		||||
			kvm_queue_exception(vcpu, UD_VECTOR);
 | 
			
		||||
			return 1;
 | 
			
		||||
		}
 | 
			
		||||
		er = emulate_instruction(vcpu, EMULTYPE_TRAP_UD);
 | 
			
		||||
		if (er != EMULATE_DONE)
 | 
			
		||||
			kvm_queue_exception(vcpu, UD_VECTOR);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue