Skip to content

Commit

Permalink
kvm: nVMX: small cleanup in handle_exception
Browse files Browse the repository at this point in the history
The reason for skipping handling of NMI and #MC in handle_exception is
the same, namely they are handled earlier by vmx_complete_atomic_exit.
Calling the machine check handler (which just returns 1) is misleading,
don't do it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Paolo Bonzini committed Jun 18, 2019
1 parent beb8d93 commit 2ea7203
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/x86/kvm/vmx/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4455,11 +4455,8 @@ static int handle_exception(struct kvm_vcpu *vcpu)
vect_info = vmx->idt_vectoring_info;
intr_info = vmx->exit_intr_info;

if (is_machine_check(intr_info))
return handle_machine_check(vcpu);

if (is_nmi(intr_info))
return 1; /* already handled by vmx_vcpu_run() */
if (is_machine_check(intr_info) || is_nmi(intr_info))
return 1; /* already handled by vmx_complete_atomic_exit */

if (is_invalid_opcode(intr_info))
return handle_ud(vcpu);
Expand Down

0 comments on commit 2ea7203

Please sign in to comment.