summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/vmx.c
diff options
context:
space:
mode:
authorSean Christopherson2019-04-20 07:50:58 +0200
committerPaolo Bonzini2019-06-18 11:46:03 +0200
commit165072b089e5af32c2693ab900d5fb5d41e3f293 (patch)
tree235c969908b6d21a80bf4bec4147a45346beb154 /arch/x86/kvm/vmx/vmx.c
parentKVM: VMX: Store the host kernel's IDT base in a global variable (diff)
downloadkernel-qcow2-linux-165072b089e5af32c2693ab900d5fb5d41e3f293.tar.gz
kernel-qcow2-linux-165072b089e5af32c2693ab900d5fb5d41e3f293.tar.xz
kernel-qcow2-linux-165072b089e5af32c2693ab900d5fb5d41e3f293.zip
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>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.c')
-rw-r--r--arch/x86/kvm/vmx/vmx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c90abf33b509..963c8c409223 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6145,6 +6145,8 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
desc = (gate_desc *)host_idt_base + vector;
entry = gate_offset(desc);
+ kvm_before_interrupt(vcpu);
+
asm volatile(
#ifdef CONFIG_X86_64
"mov %%" _ASM_SP ", %[sp]\n\t"
@@ -6165,6 +6167,8 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
[ss]"i"(__KERNEL_DS),
[cs]"i"(__KERNEL_CS)
);
+
+ kvm_after_interrupt(vcpu);
}
STACK_FRAME_NON_STANDARD(vmx_handle_external_intr);