diff options
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r-- | virt/kvm/irq_comm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 08a9a49481b2..bb8a1b5e41c1 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -68,10 +68,8 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, | |||
68 | kvm_is_dm_lowest_prio(irq)) | 68 | kvm_is_dm_lowest_prio(irq)) |
69 | printk(KERN_INFO "kvm: apic: phys broadcast and lowest prio\n"); | 69 | printk(KERN_INFO "kvm: apic: phys broadcast and lowest prio\n"); |
70 | 70 | ||
71 | for (i = 0; i < KVM_MAX_VCPUS; i++) { | 71 | kvm_for_each_vcpu(i, vcpu, kvm) { |
72 | vcpu = kvm->vcpus[i]; | 72 | if (!kvm_apic_present(vcpu)) |
73 | |||
74 | if (!vcpu || !kvm_apic_present(vcpu)) | ||
75 | continue; | 73 | continue; |
76 | 74 | ||
77 | if (!kvm_apic_match_dest(vcpu, src, irq->shorthand, | 75 | if (!kvm_apic_match_dest(vcpu, src, irq->shorthand, |