diff options
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 | ||||
-rw-r--r-- | drivers/kvm/svm.c | 1 | ||||
-rw-r--r-- | drivers/kvm/vmx.c | 1 |
3 files changed, 2 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 5fd2864b7811..4c96817929fd 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -2144,6 +2144,8 @@ again: if (unlikely(r)) goto out; + kvm_inject_pending_timer_irqs(vcpu); + preempt_disable(); kvm_x86_ops->prepare_guest_switch(vcpu); diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 7b21576b62bc..ef068d2dddd7 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -1355,7 +1355,6 @@ static void svm_intr_assist(struct kvm_vcpu *vcpu) struct vmcb *vmcb = svm->vmcb; int intr_vector = -1; - kvm_inject_pending_timer_irqs(vcpu); if ((vmcb->control.exit_int_info & SVM_EVTINJ_VALID) && ((vmcb->control.exit_int_info & SVM_EVTINJ_TYPE_MASK) == 0)) { intr_vector = vmcb->control.exit_int_info & diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 6955580bb69e..9f77ddbeb025 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -2191,7 +2191,6 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu) int has_ext_irq, interrupt_window_open; int vector; - kvm_inject_pending_timer_irqs(vcpu); update_tpr_threshold(vcpu); has_ext_irq = kvm_cpu_has_interrupt(vcpu); |