aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/vmx.c')
-rw-r--r--drivers/kvm/vmx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 5c2c6e71abf2..eeecadf5da46 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -2151,7 +2151,9 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
2151{ 2151{
2152 u32 idtv_info_field, intr_info_field; 2152 u32 idtv_info_field, intr_info_field;
2153 int has_ext_irq, interrupt_window_open; 2153 int has_ext_irq, interrupt_window_open;
2154 int vector;
2154 2155
2156 kvm_inject_pending_timer_irqs(vcpu);
2155 update_tpr_threshold(vcpu); 2157 update_tpr_threshold(vcpu);
2156 2158
2157 has_ext_irq = kvm_cpu_has_interrupt(vcpu); 2159 has_ext_irq = kvm_cpu_has_interrupt(vcpu);
@@ -2183,9 +2185,11 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
2183 interrupt_window_open = 2185 interrupt_window_open =
2184 ((vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF) && 2186 ((vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_IF) &&
2185 (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0); 2187 (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0);
2186 if (interrupt_window_open) 2188 if (interrupt_window_open) {
2187 vmx_inject_irq(vcpu, kvm_cpu_get_interrupt(vcpu)); 2189 vector = kvm_cpu_get_interrupt(vcpu);
2188 else 2190 vmx_inject_irq(vcpu, vector);
2191 kvm_timer_intr_post(vcpu, vector);
2192 } else
2189 enable_irq_window(vcpu); 2193 enable_irq_window(vcpu);
2190} 2194}
2191 2195