diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-03-05 09:34:54 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:27 -0400 |
commit | 343f94fe4d16ec898da77720c03da9e09f8523d2 (patch) | |
tree | fa0180a8446a90000086593b9fa8d4d81708ddd8 /virt/kvm/ioapic.h | |
parent | a53c17d21c46a752f5ac6695376481bc27865b04 (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.h')
-rw-r--r-- | virt/kvm/ioapic.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h index bedeea59cc1c..d996c7abc466 100644 --- a/virt/kvm/ioapic.h +++ b/virt/kvm/ioapic.h | |||
@@ -65,13 +65,15 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector, | 67 | struct kvm_vcpu *kvm_get_lowest_prio_vcpu(struct kvm *kvm, u8 vector, |
68 | unsigned long *bitmap); | 68 | unsigned long *bitmap); |
69 | int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, | ||
70 | int short_hand, int dest, int dest_mode); | ||
69 | void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode); | 71 | void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode); |
70 | int kvm_ioapic_init(struct kvm *kvm); | 72 | int kvm_ioapic_init(struct kvm *kvm); |
71 | int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level); | 73 | int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level); |
72 | void kvm_ioapic_reset(struct kvm_ioapic *ioapic); | 74 | void kvm_ioapic_reset(struct kvm_ioapic *ioapic); |
73 | void kvm_get_intr_delivery_bitmask(struct kvm *kvm, | 75 | void kvm_get_intr_delivery_bitmask(struct kvm *kvm, struct kvm_lapic *src, |
74 | union kvm_ioapic_redirect_entry *entry, | 76 | int dest_id, int dest_mode, bool low_prio, int short_hand, |
75 | unsigned long *deliver_bitmask); | 77 | unsigned long *deliver_bitmask); |
76 | int ioapic_deliver_entry(struct kvm *kvm, union kvm_ioapic_redirect_entry *e); | 78 | int ioapic_deliver_entry(struct kvm *kvm, union kvm_ioapic_redirect_entry *e); |
77 | #endif | 79 | #endif |