xref: /kvmtool/include/kvm/irq.h (revision f9ef46f2f7816cc70cedf41a9c65c20e846886d8)
1 #ifndef KVM__IRQ_H
2 #define KVM__IRQ_H
3 
4 #include <linux/types.h>
5 #include <linux/rbtree.h>
6 #include <linux/list.h>
7 #include <linux/kvm.h>
8 
9 #include "kvm/msi.h"
10 
11 struct kvm;
12 
13 extern struct kvm_irq_routing *irq_routing;
14 extern int next_gsi;
15 
16 int irq__alloc_line(void);
17 int irq__get_nr_allocated_lines(void);
18 
19 int irq__init(struct kvm *kvm);
20 int irq__exit(struct kvm *kvm);
21 
22 int irq__allocate_routing_entry(void);
23 int irq__add_msix_route(struct kvm *kvm, struct msi_msg *msg, u32 device_id);
24 void irq__update_msix_route(struct kvm *kvm, u32 gsi, struct msi_msg *msg);
25 
26 #endif
27