aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/ioapic.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-03-05 09:34:54 -0500
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:27 -0400
commit343f94fe4d16ec898da77720c03da9e09f8523d2 (patch)
treefa0180a8446a90000086593b9fa8d4d81708ddd8 /virt/kvm/ioapic.c
parenta53c17d21c46a752f5ac6695376481bc27865b04 (diff)
KVM: consolidate ioapic/ipi interrupt delivery logic
Use kvm_apic_match_dest() in kvm_get_intr_delivery_bitmask() instead of duplicating the same code. Use kvm_get_intr_delivery_bitmask() in apic_send_ipi() to figure out ipi destination instead of reimplementing the logic. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm/ioapic.c')
-rw-r--r--virt/kvm/ioapic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index b71c0442cecf..43969bbf127f 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -147,7 +147,10 @@ int ioapic_deliver_entry(struct kvm *kvm, union kvm_ioapic_redirect_entry *e)
147 DECLARE_BITMAP(deliver_bitmask, KVM_MAX_VCPUS); 147 DECLARE_BITMAP(deliver_bitmask, KVM_MAX_VCPUS);
148 int i, r = -1; 148 int i, r = -1;
149 149
150 kvm_get_intr_delivery_bitmask(kvm, e, deliver_bitmask); 150 kvm_get_intr_delivery_bitmask(kvm, NULL, e->fields.dest_id,
151 e->fields.dest_mode,
152 e->fields.delivery_mode == IOAPIC_LOWEST_PRIORITY,
153 0, deliver_bitmask);
151 154
152 if (find_first_bit(deliver_bitmask, KVM_MAX_VCPUS) >= KVM_MAX_VCPUS) { 155 if (find_first_bit(deliver_bitmask, KVM_MAX_VCPUS) >= KVM_MAX_VCPUS) {
153 ioapic_debug("no target on destination\n"); 156 ioapic_debug("no target on destination\n");