summaryrefslogtreecommitdiffstats
path: root/virt/kvm/irq_comm.c
diff options
context:
space:
mode:
authorChris Lalancette <clalance@redhat.com>2010-06-16 17:11:13 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 10:46:51 +0300
commitaefd18f01ee848448d834c80e601ccff61515811 (patch)
treebc1a44ea185d4b712e3e8cd570e515923dd80a38 /virt/kvm/irq_comm.c
parente7dca5c0eba63e4ba8e3586c4b37863fd7fadb5a (diff)
downloadlinux-aefd18f01ee848448d834c80e601ccff61515811.tar.gz
linux-aefd18f01ee848448d834c80e601ccff61515811.tar.bz2
linux-aefd18f01ee848448d834c80e601ccff61515811.zip
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>
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r--virt/kvm/irq_comm.c2
1 files changed, 1 insertions, 1 deletions
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)