From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/1] KVM: IRQ ACK notifier should be used with in-kernel irqchip Date: Sun, 19 Oct 2008 11:16:16 +0200 Message-ID: <48FAFAE0.9050201@redhat.com> References: <1223540214-353-1-git-send-email-sheng@linux.intel.com> <48EDC227.40904@redhat.com> <200810091643.40817.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Amit Shah To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:58519 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750698AbYJSJQU (ORCPT ); Sun, 19 Oct 2008 05:16:20 -0400 In-Reply-To: <200810091643.40817.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > On Thursday 09 October 2008 16:34:47 Avi Kivity wrote: > >> Sheng Yang wrote: >> >>> Also remove unnecessary parameter of unregister irq ack notifier. >>> >>> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c >>> index d0169f5..54b251d 100644 >>> --- a/virt/kvm/irq_comm.c >>> +++ b/virt/kvm/irq_comm.c >>> @@ -50,11 +50,15 @@ 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); >>> } >>> >> We don't want a BUG() here is the user specifies -no-kvm-irqchip; is >> there a check on the irq assignment ioctls before calling this? >> > > Yes. kvm_register_irq_ack_notifier should be called within irqchip_in_kernel() > (on the other side, only if we have irqchip_in_kernel(), ack_notifier is > useful, so we shouldn't call it without it), And I can't see if this would be > useful with userspace irqchip, so add a ASSERT here. > Yes. The code changed quite a lot here due to ia64 gaining VT-d support. Can you regenerate the patch? -- error compiling committee.c: too many arguments to function