From: Ben-Ami Yassour Subject: Re: [PATCH 4/8] KVM: PCIPT: fix interrupt handling Date: Thu, 24 Jul 2008 17:24:25 +0300 Message-ID: <1216909465.7822.22.camel@cluwyn.haifa.ibm.com> References: <1216214225-18030-1-git-send-email-benami@il.ibm.com> <200807231907.50900.amit.shah@qumranet.com> <1216898937.7822.18.camel@cluwyn.haifa.ibm.com> <200807241901.52049.amit.shah@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Muli Ben-Yehuda , weidong.han@intel.com, anthony@codemonkey.ws To: Amit Shah Return-path: Received: from mtagate7.de.ibm.com ([195.212.29.156]:51953 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754379AbYGXOZq (ORCPT ); Thu, 24 Jul 2008 10:25:46 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id m6OEOSO0401860 for ; Thu, 24 Jul 2008 14:24:28 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6OEOSHa3862700 for ; Thu, 24 Jul 2008 16:24:28 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6OEORKj002214 for ; Thu, 24 Jul 2008 16:24:28 +0200 In-Reply-To: <200807241901.52049.amit.shah@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 2008-07-24 at 19:01 +0530, Amit Shah wrote: > * On Thursday 24 Jul 2008 16:58:57 Ben-Ami Yassour wrote: > > On Wed, 2008-07-23 at 19:07 +0530, Amit Shah wrote: > > > * On Wednesday 16 Jul 2008 18:47:01 Ben-Ami Yassour wrote: > > > > > > > > if (irqchip_in_kernel(kvm)) { > > > > + match->pt_dev.guest.irq = pci_pt_dev->guest.irq; > > > > + match->pt_dev.host.irq = dev->irq; > > > > + if (kvm->arch.vioapic) > > > > + kvm->arch.vioapic->ack_notifier = kvm_pci_pt_ack_irq; > > > > + if (kvm->arch.vpic) > > > > + kvm->arch.vpic->ack_notifier = kvm_pci_pt_ack_irq; > > > > + > > > > > > We shouldn't register this notifier unless we get the irq below to avoid > > > unneeded function calls and checks. > > > > Note: This code was changed in the last version of the code but the > > comment is still relevant. > > > > Do you mean that we need to postpone registering the notification? > > I mean we can register these function pointers after the request_irq succeeds. request_irq should be the last initialization operation, since every thing should be ready when in case an interrupt is received > > > In the case of an assigned device this is means the we postpone it for a > > few seconds, and implementing it like above it cleaner. So I don't see > > the real value in postponing it. > > Sorry, don't get what you mean here. never mind... see the answer is above.