aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-11-23 11:08:57 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:55:00 -0500
commitdf203ec9a77a7236cb90456664d714423b98a977 (patch)
treefc86d8072405aa5c196880fc0b328dacbd8d3a6e
parent8fe0736763a07fbea56213ea105a0c2ee098e6fc (diff)
KVM: VMX: Conditionally request interrupt window after injecting irq
If we're injecting an interrupt, and another one is pending, request an interrupt window notification so we don't have excess latency on the second interrupt. This shouldn't happen in practice since an EOI will be issued, giving a second chance to request an interrupt window, but... Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f5958a7823f4..7ea485543cf8 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3304,6 +3304,8 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
3304 if (vcpu->arch.interrupt.pending) { 3304 if (vcpu->arch.interrupt.pending) {
3305 vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr); 3305 vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);
3306 kvm_timer_intr_post(vcpu, vcpu->arch.interrupt.nr); 3306 kvm_timer_intr_post(vcpu, vcpu->arch.interrupt.nr);
3307 if (kvm_cpu_has_interrupt(vcpu))
3308 enable_irq_window(vcpu);
3307 } 3309 }
3308} 3310}
3309 3311