OSDN Git Service

KVM: VMX: Use vmx_interrupt_blocked() directly from vmx_handle_exit()
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 23 Apr 2020 02:25:48 +0000 (19:25 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 May 2020 16:14:47 +0000 (12:14 -0400)
commitdb438592807e059e3b730f556c22ae201f4d4ebc
treea49486ba2019e8d736000d6110825e9535344bcd
parent3b82b8d7fdf7c1c284cfa6ebe273435483bcbd9d
KVM: VMX: Use vmx_interrupt_blocked() directly from vmx_handle_exit()

Use vmx_interrupt_blocked() instead of bouncing through
vmx_interrupt_allowed() when handling edge cases in vmx_handle_exit().
The nested_run_pending check in vmx_interrupt_allowed() should never
evaluate true in the VM-Exit path.

Hoist the WARN in handle_invalid_guest_state() up to vmx_handle_exit()
to enforce the above assumption for the !enable_vnmi case, and to detect
any other potential bugs with nested VM-Enter.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200423022550.15113-12-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c