diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-06-09 08:56:29 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:32:52 -0400 |
commit | 988a2cae6a3c0dea6df59808a935a9a697bfc28c (patch) | |
tree | c1118d86c5d6f24fe738c608917b0affb311f26d /virt/kvm/irq_comm.c | |
parent | 73880c80aa9c8dc353cd0ad26579023213cd5314 (diff) |
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 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, |