From: Avi Kivity Date: Sun, 23 Nov 2008 16:08:57 +0000 (+0200) Subject: KVM: VMX: Conditionally request interrupt window after injecting irq X-Git-Tag: v2.6.29-rc1~539^2~63 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=df203ec9a77a7236cb90456664d714423b98a977;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index f5958a7823f..7ea485543cf 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) 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); } }