aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index c8cd242f36ff..00119ec41669 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1331,7 +1331,9 @@ static void svm_intr_assist(struct vcpu_svm *svm)
1331{ 1331{
1332 struct vmcb *vmcb = svm->vmcb; 1332 struct vmcb *vmcb = svm->vmcb;
1333 int intr_vector = -1; 1333 int intr_vector = -1;
1334 struct kvm_vcpu *vcpu = &svm->vcpu;
1334 1335
1336 kvm_inject_pending_timer_irqs(vcpu);
1335 if ((vmcb->control.exit_int_info & SVM_EVTINJ_VALID) && 1337 if ((vmcb->control.exit_int_info & SVM_EVTINJ_VALID) &&
1336 ((vmcb->control.exit_int_info & SVM_EVTINJ_TYPE_MASK) == 0)) { 1338 ((vmcb->control.exit_int_info & SVM_EVTINJ_TYPE_MASK) == 0)) {
1337 intr_vector = vmcb->control.exit_int_info & 1339 intr_vector = vmcb->control.exit_int_info &
@@ -1344,7 +1346,7 @@ static void svm_intr_assist(struct vcpu_svm *svm)
1344 if (vmcb->control.int_ctl & V_IRQ_MASK) 1346 if (vmcb->control.int_ctl & V_IRQ_MASK)
1345 return; 1347 return;
1346 1348
1347 if (!kvm_cpu_has_interrupt(&svm->vcpu)) 1349 if (!kvm_cpu_has_interrupt(vcpu))
1348 return; 1350 return;
1349 1351
1350 if (!(vmcb->save.rflags & X86_EFLAGS_IF) || 1352 if (!(vmcb->save.rflags & X86_EFLAGS_IF) ||
@@ -1356,8 +1358,9 @@ static void svm_intr_assist(struct vcpu_svm *svm)
1356 return; 1358 return;
1357 } 1359 }
1358 /* Okay, we can deliver the interrupt: grab it and update PIC state. */ 1360 /* Okay, we can deliver the interrupt: grab it and update PIC state. */
1359 intr_vector = kvm_cpu_get_interrupt(&svm->vcpu); 1361 intr_vector = kvm_cpu_get_interrupt(vcpu);
1360 svm_inject_irq(svm, intr_vector); 1362 svm_inject_irq(svm, intr_vector);
1363 kvm_timer_intr_post(vcpu, intr_vector);
1361} 1364}
1362 1365
1363static void kvm_reput_irq(struct vcpu_svm *svm) 1366static void kvm_reput_irq(struct vcpu_svm *svm)