summaryrefslogtreecommitdiffstats
path: root/virt/kvm/irq_comm.c
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2008-10-20 16:07:10 +0800
committerAvi Kivity <avi@redhat.com>2008-12-31 16:51:47 +0200
commite19e30effac03f5a005a8e42ed941a2a5dc62654 (patch)
treea950bd5be65dba2ebe611c88c95af131e71cf191 /virt/kvm/irq_comm.c
parentcc6e462cd54e64858ea25816df87d033229efe56 (diff)
downloadop-kernel-dev-e19e30effac03f5a005a8e42ed941a2a5dc62654.zip
op-kernel-dev-e19e30effac03f5a005a8e42ed941a2a5dc62654.tar.gz
KVM: IRQ ACK notifier should be used with in-kernel irqchip
Also remove unnecessary parameter of unregister irq ack notifier. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm/irq_comm.c')
-rw-r--r--virt/kvm/irq_comm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c
index 55ad76e..9fbbdea 100644
--- a/virt/kvm/irq_comm.c
+++ b/virt/kvm/irq_comm.c
@@ -58,12 +58,16 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned gsi)
void kvm_register_irq_ack_notifier(struct kvm *kvm,
struct kvm_irq_ack_notifier *kian)
{
+ /* Must be called with in-kernel IRQ chip, otherwise it's nonsense */
+ ASSERT(irqchip_in_kernel(kvm));
+ ASSERT(kian);
hlist_add_head(&kian->link, &kvm->arch.irq_ack_notifier_list);
}
-void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
- struct kvm_irq_ack_notifier *kian)
+void kvm_unregister_irq_ack_notifier(struct kvm_irq_ack_notifier *kian)
{
+ if (!kian)
+ return;
hlist_del(&kian->link);
}
OpenPOWER on IntegriCloud