KVM: Use macro to iterate over vcpus.
[deliverable/linux.git] / virt / kvm / irq_comm.c
index 08a9a49481b2ee765058c8915ad9b4cdab3dfc8c..bb8a1b5e41c14f9cba34d46f685f14097e33f89b 100644 (file)
@@ -68,10 +68,8 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
                        kvm_is_dm_lowest_prio(irq))
                printk(KERN_INFO "kvm: apic: phys broadcast and lowest prio\n");
 
-       for (i = 0; i < KVM_MAX_VCPUS; i++) {
-               vcpu = kvm->vcpus[i];
-
-               if (!vcpu || !kvm_apic_present(vcpu))
+       kvm_for_each_vcpu(i, vcpu, kvm) {
+               if (!kvm_apic_present(vcpu))
                        continue;
 
                if (!kvm_apic_match_dest(vcpu, src, irq->shorthand,
This page took 0.025589 seconds and 5 git commands to generate.