Browse Source

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 <clalance@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Chris Lalancette 15 years ago
parent
commit
aefd18f01e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      virt/kvm/irq_comm.c

+ 1 - 1
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)