diff options
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 99963f36a6db..ce285e01bd57 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -107,6 +107,19 @@ struct kvm_memory_slot { | |||
107 | int user_alloc; | 107 | int user_alloc; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | struct kvm_kernel_irq_routing_entry { | ||
111 | u32 gsi; | ||
112 | void (*set)(struct kvm_kernel_irq_routing_entry *e, | ||
113 | struct kvm *kvm, int level); | ||
114 | union { | ||
115 | struct { | ||
116 | unsigned irqchip; | ||
117 | unsigned pin; | ||
118 | } irqchip; | ||
119 | }; | ||
120 | struct list_head link; | ||
121 | }; | ||
122 | |||
110 | struct kvm { | 123 | struct kvm { |
111 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 124 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
112 | spinlock_t mmu_lock; | 125 | spinlock_t mmu_lock; |
@@ -128,6 +141,7 @@ struct kvm { | |||
128 | #endif | 141 | #endif |
129 | 142 | ||
130 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 143 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
144 | struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */ | ||
131 | struct hlist_head mask_notifier_list; | 145 | struct hlist_head mask_notifier_list; |
132 | #endif | 146 | #endif |
133 | 147 | ||
@@ -480,4 +494,21 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
480 | } | 494 | } |
481 | #endif | 495 | #endif |
482 | 496 | ||
497 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | ||
498 | |||
499 | #define KVM_MAX_IRQ_ROUTES 1024 | ||
500 | |||
501 | int kvm_setup_default_irq_routing(struct kvm *kvm); | ||
502 | int kvm_set_irq_routing(struct kvm *kvm, | ||
503 | const struct kvm_irq_routing_entry *entries, | ||
504 | unsigned nr, | ||
505 | unsigned flags); | ||
506 | void kvm_free_irq_routing(struct kvm *kvm); | ||
507 | |||
508 | #else | ||
509 | |||
510 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} | ||
511 | |||
512 | #endif | ||
513 | |||
483 | #endif | 514 | #endif |