KVM: x86: Move kvm_{before,after}_interrupt() calls to vendor code

VMX can conditionally call kvm_{before,after}_interrupt() since KVM
always uses "ack interrupt on exit" and therefore explicitly handles
interrupts as opposed to blindly enabling irqs.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Sean Christopherson
2019-04-19 22:50:58 -07:00
committed by Paolo Bonzini
parent 2342080cd6
commit 165072b089
3 changed files with 6 additions and 2 deletions

View File

@@ -6174,6 +6174,7 @@ out:
static void svm_handle_external_intr(struct kvm_vcpu *vcpu)
{
kvm_before_interrupt(vcpu);
local_irq_enable();
/*
* We must have an instruction with interrupts enabled, so
@@ -6181,6 +6182,7 @@ static void svm_handle_external_intr(struct kvm_vcpu *vcpu)
*/
asm("nop");
local_irq_disable();
kvm_after_interrupt(vcpu);
}
static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)