summaryrefslogtreecommitdiffstats
path: root/virt/kvm/irq_comm.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-06-09 15:56:29 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:32:52 +0300
commit988a2cae6a3c0dea6df59808a935a9a697bfc28c (patch)
treec1118d86c5d6f24fe738c608917b0affb311f26d /virt/kvm/irq_comm.c
parent73880c80aa9c8dc353cd0ad26579023213cd5314 (diff)
downloadlinux-stable-988a2cae6a3c0dea6df59808a935a9a697bfc28c.tar.gz
linux-stable-988a2cae6a3c0dea6df59808a935a9a697bfc28c.tar.bz2
linux-stable-988a2cae6a3c0dea6df59808a935a9a697bfc28c.zip
KVM: Use macro to iterate over vcpus.
[christian: remove unused variables on s390] Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r--virt/kvm/irq_comm.c6
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,
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,