From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH 3/4] Move irq ack notifier list to arch independent code.
Date: Sun, 12 Jul 2009 15:03:52 +0300 [thread overview]
Message-ID: <1247400233-24243-4-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1247400233-24243-1-git-send-email-gleb@redhat.com>
Mask irq notifier list is already there.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
arch/ia64/include/asm/kvm_host.h | 1 -
arch/x86/include/asm/kvm_host.h | 1 -
include/linux/kvm_host.h | 1 +
virt/kvm/irq_comm.c | 4 ++--
virt/kvm/kvm_main.c | 1 +
5 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h
index d9b6325..a362e67 100644
--- a/arch/ia64/include/asm/kvm_host.h
+++ b/arch/ia64/include/asm/kvm_host.h
@@ -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];
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 08732d7..eb723a7 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -401,7 +401,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;
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 6756b3e..f795f25 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -163,6 +163,7 @@ struct kvm {
#ifdef CONFIG_HAVE_KVM_IRQCHIP
struct kvm_kernel_irq_routing_entry *irq_routing;
struct hlist_head mask_notifier_list;
+ struct hlist_head irq_ack_notifier_list;
#endif
#ifdef KVM_ARCH_WANT_MMU_NOTIFIER
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index b2fa3f6..5dde1ef 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -181,7 +181,7 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin)
}
rcu_read_unlock();
- 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);
}
@@ -190,7 +190,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);
}
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 24013b4..53d9b70 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -946,6 +946,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
--
1.6.2.1
next prev parent reply other threads:[~2009-07-12 12:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-12 12:03 [PATCH 0/4] moving irq routing and notifiers to RCU locking Gleb Natapov
2009-07-12 12:03 ` [PATCH 1/4] Move irq routing data structure to rcu locking Gleb Natapov
2009-07-13 12:55 ` Michael S. Tsirkin
2009-07-13 13:03 ` Gleb Natapov
2009-07-13 13:15 ` Michael S. Tsirkin
2009-07-13 13:23 ` Gleb Natapov
2009-07-13 13:36 ` Michael S. Tsirkin
2009-07-13 13:01 ` Gregory Haskins
2009-07-13 13:15 ` Gleb Natapov
2009-07-13 13:16 ` Gregory Haskins
2009-07-13 13:25 ` Gleb Natapov
2009-07-13 13:29 ` Gregory Haskins
2009-07-13 15:55 ` Marcelo Tosatti
2009-07-13 16:24 ` Gleb Natapov
2009-07-13 16:27 ` Marcelo Tosatti
2009-07-13 16:33 ` Gleb Natapov
2009-07-13 16:42 ` Marcelo Tosatti
2009-07-13 16:44 ` Gleb Natapov
2009-07-13 16:45 ` Marcelo Tosatti
2009-07-13 16:54 ` Gleb Natapov
2009-07-12 12:03 ` [PATCH 2/4] Unregister ack notifier callback on PIT freeing Gleb Natapov
2009-07-12 12:03 ` Gleb Natapov [this message]
2009-07-12 12:03 ` [PATCH 4/4] Convert irq notifiers lists to RCU locking Gleb Natapov
2009-07-13 12:56 ` Michael S. Tsirkin
2009-07-13 13:05 ` Gleb Natapov
2009-07-13 13:29 ` Michael S. Tsirkin
2009-07-13 13:48 ` Gregory Haskins
2009-07-13 13:02 ` Michael S. Tsirkin
2009-07-13 13:11 ` Gleb Natapov
2009-07-13 13:26 ` Gregory Haskins
2009-07-13 13:32 ` Gleb Natapov
2009-07-13 13:40 ` Gregory Haskins
2009-07-13 13:52 ` Gleb Natapov
2009-07-13 14:02 ` Gregory Haskins
2009-07-13 14:08 ` Gleb Natapov
2009-07-13 13:40 ` Michael S. Tsirkin
2009-07-13 13:44 ` Gregory Haskins
2009-07-13 19:31 ` Paul E. McKenney
2009-07-14 5:46 ` Gleb Natapov
2009-07-14 12:03 ` Paul E. McKenney
2009-07-14 12:06 ` Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247400233-24243-4-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox