• Home
  • Raw
  • Download

Lines Matching full:irq

21 #include "irq.h"
48 struct kvm_lapic_irq *irq, struct dest_map *dest_map) in kvm_irq_delivery_to_apic() argument
55 if (kvm_irq_delivery_to_apic_fast(kvm, src, irq, &r, dest_map)) in kvm_irq_delivery_to_apic()
58 if (irq->dest_mode == APIC_DEST_PHYSICAL && in kvm_irq_delivery_to_apic()
59 irq->dest_id == 0xff && kvm_lowest_prio_delivery(irq)) { in kvm_irq_delivery_to_apic()
61 irq->delivery_mode = APIC_DM_FIXED; in kvm_irq_delivery_to_apic()
70 if (!kvm_apic_match_dest(vcpu, src, irq->shorthand, in kvm_irq_delivery_to_apic()
71 irq->dest_id, irq->dest_mode)) in kvm_irq_delivery_to_apic()
74 if (!kvm_lowest_prio_delivery(irq)) { in kvm_irq_delivery_to_apic()
77 r += kvm_apic_set_irq(vcpu, irq, dest_map); in kvm_irq_delivery_to_apic()
92 int idx = kvm_vector_to_index(irq->vector, dest_vcpus, in kvm_irq_delivery_to_apic()
99 r = kvm_apic_set_irq(lowest, irq, dest_map); in kvm_irq_delivery_to_apic()
105 struct kvm_lapic_irq *irq) in kvm_set_msi_irq() argument
111 irq->dest_id = (e->msi.address_lo & in kvm_set_msi_irq()
114 irq->dest_id |= MSI_ADDR_EXT_DEST_ID(e->msi.address_hi); in kvm_set_msi_irq()
115 irq->vector = (e->msi.data & in kvm_set_msi_irq()
117 irq->dest_mode = kvm_lapic_irq_dest_mode( in kvm_set_msi_irq()
119 irq->trig_mode = (1 << MSI_DATA_TRIGGER_SHIFT) & e->msi.data; in kvm_set_msi_irq()
120 irq->delivery_mode = e->msi.data & 0x700; in kvm_set_msi_irq()
121 irq->msi_redir_hint = ((e->msi.address_lo in kvm_set_msi_irq()
123 irq->level = 1; in kvm_set_msi_irq()
124 irq->shorthand = APIC_DEST_NOSHORT; in kvm_set_msi_irq()
137 struct kvm_lapic_irq irq; in kvm_set_msi() local
145 kvm_set_msi_irq(kvm, e, &irq); in kvm_set_msi()
147 return kvm_irq_delivery_to_apic(kvm, NULL, &irq, NULL); in kvm_set_msi()
165 struct kvm_lapic_irq irq; in kvm_arch_set_irq_inatomic() local
177 kvm_set_msi_irq(kvm, e, &irq); in kvm_arch_set_irq_inatomic()
179 if (kvm_irq_delivery_to_apic_fast(kvm, NULL, &irq, &r, NULL)) in kvm_arch_set_irq_inatomic()
199 printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n"); in kvm_request_irq_source_id()
221 printk(KERN_ERR "kvm: IRQ source ID out of range!\n"); in kvm_free_irq_source_id()
234 void kvm_register_irq_mask_notifier(struct kvm *kvm, int irq, in kvm_register_irq_mask_notifier() argument
238 kimn->irq = irq; in kvm_register_irq_mask_notifier()
243 void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, in kvm_unregister_irq_mask_notifier() argument
262 if (kimn->irq == gsi) in kvm_fire_mask_notifiers()
325 bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq, in kvm_intr_is_single_vcpu() argument
331 if (kvm_intr_is_single_vcpu_fast(kvm, irq, dest_vcpu)) in kvm_intr_is_single_vcpu()
338 if (!kvm_apic_match_dest(vcpu, NULL, irq->shorthand, in kvm_intr_is_single_vcpu()
339 irq->dest_id, irq->dest_mode)) in kvm_intr_is_single_vcpu()
352 #define IOAPIC_ROUTING_ENTRY(irq) \ argument
353 { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
354 .u.irqchip = { .irqchip = KVM_IRQCHIP_IOAPIC, .pin = (irq) } }
355 #define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq) argument
357 #define PIC_ROUTING_ENTRY(irq) \ argument
358 { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
359 .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } }
360 #define ROUTING_ENTRY2(irq) \ argument
361 IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq)
413 struct kvm_lapic_irq irq; in kvm_scan_ioapic_routes() local
418 kvm_set_msi_irq(vcpu->kvm, entry, &irq); in kvm_scan_ioapic_routes()
420 if (irq.trig_mode && in kvm_scan_ioapic_routes()
422 irq.dest_id, irq.dest_mode)) in kvm_scan_ioapic_routes()
423 __set_bit(irq.vector, ioapic_handled_vectors); in kvm_scan_ioapic_routes()