KVM: Move irq ack notifier list to arch independent code
authorGleb Natapov <gleb@redhat.com>
Mon, 24 Aug 2009 08:54:23 +0000 (11:54 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 3 Dec 2009 07:32:07 +0000 (09:32 +0200)
Mask irq notifier list is already there.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/ia64/include/asm/kvm_host.h
arch/x86/include/asm/kvm_host.h
include/linux/kvm_host.h
virt/kvm/irq_comm.c
virt/kvm/kvm_main.c

index d9b6325a93282b77ea7c0362530ae5fafe602fe1..a362e67e0ca6edec83923e42a655d61d639001c8 100644 (file)
@@ -475,7 +475,6 @@ struct kvm_arch {
        struct list_head assigned_dev_head;
        struct iommu_domain *iommu_domain;
        int iommu_flags;
-       struct hlist_head irq_ack_notifier_list;
 
        unsigned long irq_sources_bitmap;
        unsigned long irq_states[KVM_IOAPIC_NUM_PINS];
index 35d3236c9de4f90a14ab75a26558fa601b4320db..a46e2dd9aca827e6de6de4f97327e9c5fd088035 100644 (file)
@@ -397,7 +397,6 @@ struct kvm_arch{
        struct kvm_pic *vpic;
        struct kvm_ioapic *vioapic;
        struct kvm_pit *vpit;
-       struct hlist_head irq_ack_notifier_list;
        int vapics_in_nmi_mode;
 
        unsigned int tss_addr;
index cc2d7493598b47818403f213596b2d8d3d3991ce..4aa5e1d9a7970efa8de1c9b86ab628f1bec02d03 100644 (file)
@@ -187,6 +187,7 @@ struct kvm {
 #ifdef CONFIG_HAVE_KVM_IRQCHIP
        struct kvm_irq_routing_table *irq_routing;
        struct hlist_head mask_notifier_list;
+       struct hlist_head irq_ack_notifier_list;
 #endif
 
 #ifdef KVM_ARCH_WANT_MMU_NOTIFIER
index fb861dd956fc41a8c486a773ffb22241cfed3970..f0197259593857cd25214a18d048110c62d68a89 100644 (file)
@@ -186,8 +186,7 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
        rcu_read_unlock();
 
        if (gsi != -1)
-               hlist_for_each_entry(kian, n, &kvm->arch.irq_ack_notifier_list,
-                                    link)
+               hlist_for_each_entry(kian, n, &kvm->irq_ack_notifier_list, link)
                        if (kian->gsi == gsi)
                                kian->irq_acked(kian);
 }
@@ -196,7 +195,7 @@ void kvm_register_irq_ack_notifier(struct kvm *kvm,
                                   struct kvm_irq_ack_notifier *kian)
 {
        mutex_lock(&kvm->irq_lock);
-       hlist_add_head(&kian->link, &kvm->arch.irq_ack_notifier_list);
+       hlist_add_head(&kian->link, &kvm->irq_ack_notifier_list);
        mutex_unlock(&kvm->irq_lock);
 }
 
index 3bee94892774e56c30f6bb60c9e5d74bcf0a6299..6eca153e1a0229c1d7178f4ec7962c4706d777ab 100644 (file)
@@ -958,6 +958,7 @@ static struct kvm *kvm_create_vm(void)
                goto out;
 #ifdef CONFIG_HAVE_KVM_IRQCHIP
        INIT_HLIST_HEAD(&kvm->mask_notifier_list);
+       INIT_HLIST_HEAD(&kvm->irq_ack_notifier_list);
 #endif
 
 #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET