diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-06-09 15:56:29 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 08:32:52 +0300 |
commit | 988a2cae6a3c0dea6df59808a935a9a697bfc28c (patch) | |
tree | c1118d86c5d6f24fe738c608917b0affb311f26d /virt/kvm/irq_comm.c | |
parent | 73880c80aa9c8dc353cd0ad26579023213cd5314 (diff) | |
download | op-kernel-dev-988a2cae6a3c0dea6df59808a935a9a697bfc28c.zip op-kernel-dev-988a2cae6a3c0dea6df59808a935a9a697bfc28c.tar.gz |
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 08a9a49..bb8a1b5 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, |