From: Avi Kivity <avi@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: kvm@vger.kernel.org
Subject: [PATCH 13/42] KVM: Move irq ack notifier list to arch independent code
Date: Mon, 16 Nov 2009 14:19:14 +0200 [thread overview]
Message-ID: <1258373983-8693-14-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1258373983-8693-1-git-send-email-avi@redhat.com>
From: Gleb Natapov <gleb@redhat.com>
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 | 1 -
arch/x86/include/asm/kvm_host.h | 1 -
include/linux/kvm_host.h | 1 +
virt/kvm/irq_comm.c | 5 ++---
virt/kvm/kvm_main.c | 1 +
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 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 35d3236..a46e2dd 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -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;
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index cc2d749..4aa5e1d 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -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
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index fb861dd..f019725 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)
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);
}
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 3bee948..6eca153 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -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
--
1.6.5.2
next prev parent reply other threads:[~2009-11-16 12:19 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 12:19 [PATCH 00/42] KVM updates for the 2.6.33 merge window (batch 1/2) Avi Kivity
2009-11-16 12:19 ` [PATCH 01/42] core, x86: Add user return notifiers Avi Kivity
2009-11-16 12:19 ` [PATCH 02/42] x86: Fix user return notifier build Avi Kivity
2009-11-16 12:19 ` [PATCH 03/42] x86: Fix user return notifier put_cpu_var() invocation Avi Kivity
2009-11-16 12:19 ` [PATCH 04/42] KVM: Don't wrap schedule() with vcpu_put()/vcpu_load() Avi Kivity
2009-11-16 12:19 ` [PATCH 05/42] KVM: x86 emulator: Add 'push/pop sreg' instructions Avi Kivity
2009-11-16 12:19 ` [PATCH 06/42] KVM: x86 emulator: Introduce No64 decode option Avi Kivity
2009-11-16 12:19 ` [PATCH 07/42] KVM: Don't pass kvm_run arguments Avi Kivity
2009-11-16 12:19 ` [PATCH 08/42] KVM: Call pic_clear_isr() on pic reset to reuse logic there Avi Kivity
2009-11-16 12:19 ` [PATCH 09/42] KVM: Move irq sharing information to irqchip level Avi Kivity
2009-11-16 12:19 ` [PATCH 10/42] KVM: Change irq routing table to use gsi indexed array Avi Kivity
2009-11-16 12:19 ` [PATCH 11/42] KVM: Maintain back mapping from irqchip/pin to gsi Avi Kivity
2009-11-16 12:19 ` [PATCH 12/42] KVM: Move irq routing data structure to rcu locking Avi Kivity
2009-11-16 12:19 ` Avi Kivity [this message]
2009-11-16 12:19 ` [PATCH 14/42] KVM: Convert irq notifiers lists to RCU locking Avi Kivity
2009-11-16 12:19 ` [PATCH 15/42] KVM: Move IO APIC to its own lock Avi Kivity
2009-11-16 12:19 ` [PATCH 16/42] KVM: Drop kvm->irq_lock lock from irq injection path Avi Kivity
2009-11-16 12:19 ` [PATCH 17/42] KVM: Return -ENOTTY on unrecognized ioctls Avi Kivity
2009-11-16 12:19 ` [PATCH 18/42] KVM: Move assigned device code to own file Avi Kivity
2009-11-16 12:19 ` [PATCH 19/42] KVM: x86 emulator: Add missing decoder flags for 'or' instructions Avi Kivity
2009-11-16 12:19 ` [PATCH 20/42] KVM: x86 emulator: Add pusha and popa instructions Avi Kivity
2009-11-16 12:19 ` [PATCH 21/42] KVM: VMX: Enhance invalid guest state emulation Avi Kivity
2009-11-16 12:19 ` [PATCH 22/42] KVM: SVM: remove needless mmap_sem acquision from nested_svm_map Avi Kivity
2009-11-16 12:19 ` [PATCH 23/42] KVM: Activate Virtualization On Demand Avi Kivity
2010-03-17 21:57 ` Dieter Ries
2010-03-17 22:02 ` Alexander Graf
2010-03-17 22:40 ` Dieter Ries
2010-03-17 22:47 ` Alexander Graf
2010-03-18 7:11 ` Dieter Ries
2010-03-18 7:17 ` Alexander Graf
2010-03-19 2:26 ` Dieter Ries
2010-08-08 12:02 ` Serge Belyshev
2010-08-16 13:24 ` Alexander Graf
2010-08-16 13:49 ` Serge Belyshev
2010-08-16 14:13 ` Alexander Graf
2010-03-18 5:41 ` Michael Tokarev
2010-03-18 7:04 ` Dieter Ries
2009-11-16 12:19 ` [PATCH 24/42] KVM: remove duplicated #include Avi Kivity
2009-11-16 12:19 ` [PATCH 25/42] KVM: SVM: reorganize svm_interrupt_allowed Avi Kivity
2009-11-16 12:19 ` [PATCH 26/42] KVM: SVM: don't copy exit_int_info on nested vmrun Avi Kivity
2009-11-16 12:19 ` [PATCH 27/42] KVM: SVM: Remove remaining occurences of rdtscll Avi Kivity
2009-11-16 12:19 ` [PATCH 28/42] KVM: fix lock imbalance in kvm_*_irq_source_id() Avi Kivity
2009-11-16 12:19 ` [PATCH 29/42] KVM: Separate timer intialization into an indepedent function Avi Kivity
2009-11-16 12:19 ` [PATCH 30/42] KVM: Kill the confusing tsc_ref_khz and ref_freq variables Avi Kivity
2009-11-16 12:19 ` [PATCH 31/42] KVM: Fix printk name error in svm.c Avi Kivity
2009-11-16 12:19 ` [PATCH 32/42] KVM: Fix hotplug of CPUs Avi Kivity
2009-11-16 12:19 ` [PATCH 33/42] KVM: remove pre_task_link setting in save_state_to_tss16 Avi Kivity
2009-11-16 12:19 ` [PATCH 34/42] KVM: x86: Refactor guest debug IOCTL handling Avi Kivity
2009-11-16 12:19 ` [PATCH 35/42] KVM: x86: disable paravirt mmu reporting Avi Kivity
2009-11-16 12:19 ` [PATCH 36/42] KVM: x86: Rework guest single-step flag injection and filtering Avi Kivity
2009-11-16 12:19 ` [PATCH 37/42] KVM: x86: include pvclock MSRs in msrs_to_save Avi Kivity
2009-11-16 12:19 ` [PATCH 38/42] KVM: SVM: Notify nested hypervisor of lost event injections Avi Kivity
2009-11-16 12:19 ` [PATCH 39/42] KVM: SVM: Move INTR vmexit out of atomic code Avi Kivity
2009-11-16 12:19 ` [PATCH 40/42] KVM: SVM: Add tracepoint for nested vmrun Avi Kivity
2009-11-16 12:19 ` [PATCH 41/42] KVM: SVM: Add tracepoint for nested #vmexit Avi Kivity
2009-11-16 12:19 ` [PATCH 42/42] KVM: SVM: Add tracepoint for injected #vmexit Avi Kivity
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=1258373983-8693-14-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@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