aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-08-24 04:54:23 -0400
committerAvi Kivity <avi@redhat.com>2009-12-03 02:32:07 -0500
commit136bdfeee7b5bc986fc94af3a40d7d13ea37bb95 (patch)
tree8f054eab63663dd0a55084d1a397079c73774664
parente42bba90bfe724e32fc66ab1b6cb283c51d064b1 (diff)
KVM: Move irq ack notifier list to arch independent code
Mask irq notifier list is already there. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/ia64/include/asm/kvm_host.h1
-rw-r--r--arch/x86/include/asm/kvm_host.h1
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--virt/kvm/irq_comm.c5
-rw-r--r--virt/kvm/kvm_main.c1
5 files changed, 4 insertions, 5 deletions
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h
index d9b6325a9328..a362e67e0ca6 100644
--- a/arch/ia64/include/asm/kvm_host.h
+++ b/arch/ia64/include/asm/kvm_host.h
@@ -475,7 +475,6 @@ struct kvm_arch {
475 struct list_head assigned_dev_head; 475 struct list_head assigned_dev_head;
476 struct iommu_domain *iommu_domain; 476 struct iommu_domain *iommu_domain;
477 int iommu_flags; 477 int iommu_flags;
478 struct hlist_head irq_ack_notifier_list;
479 478
480 unsigned long irq_sources_bitmap; 479 unsigned long irq_sources_bitmap;
481 unsigned long irq_states[KVM_IOAPIC_NUM_PINS]; 480 unsigned long irq_states[KVM_IOAPIC_NUM_PINS];
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 35d3236c9de4..a46e2dd9aca8 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -397,7 +397,6 @@ struct kvm_arch{
397 struct kvm_pic *vpic; 397 struct kvm_pic *vpic;
398 struct kvm_ioapic *vioapic; 398 struct kvm_ioapic *vioapic;
399 struct kvm_pit *vpit; 399 struct kvm_pit *vpit;
400 struct hlist_head irq_ack_notifier_list;
401 int vapics_in_nmi_mode; 400 int vapics_in_nmi_mode;
402 401
403 unsigned int tss_addr; 402 unsigned int tss_addr;
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index cc2d7493598b..4aa5e1d9a797 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -187,6 +187,7 @@ struct kvm {
187#ifdef CONFIG_HAVE_KVM_IRQCHIP 187#ifdef CONFIG_HAVE_KVM_IRQCHIP
188 struct kvm_irq_routing_table *irq_routing; 188 struct kvm_irq_routing_table *irq_routing;
189 struct hlist_head mask_notifier_list; 189 struct hlist_head mask_notifier_list;
190 struct hlist_head irq_ack_notifier_list;
190#endif 191#endif
191 192
192#ifdef KVM_ARCH_WANT_MMU_NOTIFIER 193#ifdef KVM_ARCH_WANT_MMU_NOTIFIER
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index fb861dd956fc..f01972595938 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -186,8 +186,7 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
186 rcu_read_unlock(); 186 rcu_read_unlock();
187 187
188 if (gsi != -1) 188 if (gsi != -1)
189 hlist_for_each_entry(kian, n, &kvm->arch.irq_ack_notifier_list, 189 hlist_for_each_entry(kian, n, &kvm->irq_ack_notifier_list, link)
190 link)
191 if (kian->gsi == gsi) 190 if (kian->gsi == gsi)
192 kian->irq_acked(kian); 191 kian->irq_acked(kian);
193} 192}
@@ -196,7 +195,7 @@ void kvm_register_irq_ack_notifier(struct kvm *kvm,
196 struct kvm_irq_ack_notifier *kian) 195 struct kvm_irq_ack_notifier *kian)
197{ 196{
198 mutex_lock(&kvm->irq_lock); 197 mutex_lock(&kvm->irq_lock);
199 hlist_add_head(&kian->link, &kvm->arch.irq_ack_notifier_list); 198 hlist_add_head(&kian->link, &kvm->irq_ack_notifier_list);
200 mutex_unlock(&kvm->irq_lock); 199 mutex_unlock(&kvm->irq_lock);
201} 200}
202 201
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 3bee94892774..6eca153e1a02 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -958,6 +958,7 @@ static struct kvm *kvm_create_vm(void)
958 goto out; 958 goto out;
959#ifdef CONFIG_HAVE_KVM_IRQCHIP 959#ifdef CONFIG_HAVE_KVM_IRQCHIP
960 INIT_HLIST_HEAD(&kvm->mask_notifier_list); 960 INIT_HLIST_HEAD(&kvm->mask_notifier_list);
961 INIT_HLIST_HEAD(&kvm->irq_ack_notifier_list);
961#endif 962#endif
962 963
963#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET 964#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET