]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: VMX: Conditionally request interrupt window after injecting irq
authorAvi Kivity <avi@redhat.com>
Sun, 23 Nov 2008 16:08:57 +0000 (18:08 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 31 Dec 2008 14:55:00 +0000 (16:55 +0200)
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>
arch/x86/kvm/vmx.c

index f5958a7823f497563b6781b536c16c78ea43fe4e..7ea485543cf8e989d881707089d5c301c22297e9 100644 (file)
@@ -3304,6 +3304,8 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu)
        if (vcpu->arch.interrupt.pending) {
                vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr);
                kvm_timer_intr_post(vcpu, vcpu->arch.interrupt.nr);
+               if (kvm_cpu_has_interrupt(vcpu))
+                       enable_irq_window(vcpu);
        }
 }