aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-01-04 10:10:50 -0500
committerAvi Kivity <avi@redhat.com>2009-03-24 05:03:03 -0400
commit75858a84a6207f5e60196f6bbd18fde4250e5759 (patch)
treead8ab5d60a616270c61d88a9af08713cefbc9d35 /include/linux/kvm_host.h
parent5d9b8e30f543a9f21a968a4cda71e8f6d1c66a61 (diff)
KVM: Interrupt mask notifiers for ioapic
Allow clients to request notifications when the guest masks or unmasks a particular irq line. This complements irq ack notifications, as the guest will not ack an irq line that is masked. Currently implemented for the ioapic only. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 3cf0ede3fd73..99963f36a6db 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -127,6 +127,10 @@ struct kvm {
127 struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; 127 struct kvm_coalesced_mmio_ring *coalesced_mmio_ring;
128#endif 128#endif
129 129
130#ifdef CONFIG_HAVE_KVM_IRQCHIP
131 struct hlist_head mask_notifier_list;
132#endif
133
130#ifdef KVM_ARCH_WANT_MMU_NOTIFIER 134#ifdef KVM_ARCH_WANT_MMU_NOTIFIER
131 struct mmu_notifier mmu_notifier; 135 struct mmu_notifier mmu_notifier;
132 unsigned long mmu_notifier_seq; 136 unsigned long mmu_notifier_seq;
@@ -320,6 +324,19 @@ struct kvm_assigned_dev_kernel {
320 struct pci_dev *dev; 324 struct pci_dev *dev;
321 struct kvm *kvm; 325 struct kvm *kvm;
322}; 326};
327
328struct kvm_irq_mask_notifier {
329 void (*func)(struct kvm_irq_mask_notifier *kimn, bool masked);
330 int irq;
331 struct hlist_node link;
332};
333
334void kvm_register_irq_mask_notifier(struct kvm *kvm, int irq,
335 struct kvm_irq_mask_notifier *kimn);
336void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq,
337 struct kvm_irq_mask_notifier *kimn);
338void kvm_fire_mask_notifiers(struct kvm *kvm, int irq, bool mask);
339
323void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level); 340void kvm_set_irq(struct kvm *kvm, int irq_source_id, int irq, int level);
324void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi); 341void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi);
325void kvm_register_irq_ack_notifier(struct kvm *kvm, 342void kvm_register_irq_ack_notifier(struct kvm *kvm,