From aefd18f01ee848448d834c80e601ccff61515811 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 16 Jun 2010 17:11:13 -0400 Subject: [PATCH] KVM: x86: In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris Lalancette Signed-off-by: Marcelo Tosatti --- virt/kvm/irq_comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 52f412f16be3..06cf61e729d2 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -100,7 +100,7 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, if (r < 0) r = 0; r += kvm_apic_set_irq(vcpu, irq); - } else { + } else if (kvm_lapic_enabled(vcpu)) { if (!lowest) lowest = vcpu; else if (kvm_apic_compare_prio(vcpu, lowest) < 0) -- 2.39.5