aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 1d2ea65d3537..1a85fc507cf7 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3261,6 +3261,17 @@ static void svm_complete_interrupts(struct vcpu_svm *svm)
3261 } 3261 }
3262} 3262}
3263 3263
3264static void svm_cancel_injection(struct kvm_vcpu *vcpu)
3265{
3266 struct vcpu_svm *svm = to_svm(vcpu);
3267 struct vmcb_control_area *control = &svm->vmcb->control;
3268
3269 control->exit_int_info = control->event_inj;
3270 control->exit_int_info_err = control->event_inj_err;
3271 control->event_inj = 0;
3272 svm_complete_interrupts(svm);
3273}
3274
3264#ifdef CONFIG_X86_64 3275#ifdef CONFIG_X86_64
3265#define R "r" 3276#define R "r"
3266#else 3277#else
@@ -3631,6 +3642,7 @@ static struct kvm_x86_ops svm_x86_ops = {
3631 .set_irq = svm_set_irq, 3642 .set_irq = svm_set_irq,
3632 .set_nmi = svm_inject_nmi, 3643 .set_nmi = svm_inject_nmi,
3633 .queue_exception = svm_queue_exception, 3644 .queue_exception = svm_queue_exception,
3645 .cancel_injection = svm_cancel_injection,
3634 .interrupt_allowed = svm_interrupt_allowed, 3646 .interrupt_allowed = svm_interrupt_allowed,
3635 .nmi_allowed = svm_nmi_allowed, 3647 .nmi_allowed = svm_nmi_allowed,
3636 .get_nmi_mask = svm_get_nmi_mask, 3648 .get_nmi_mask = svm_get_nmi_mask,