From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STkYa-0002Wb-AS for qemu-devel@nongnu.org; Sun, 13 May 2012 21:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STkYY-0001iO-AJ for qemu-devel@nongnu.org; Sun, 13 May 2012 21:58:39 -0400 Received: from ozlabs.org ([203.10.76.45]:58469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STkYX-0001iI-VA for qemu-devel@nongnu.org; Sun, 13 May 2012 21:58:38 -0400 Date: Mon, 14 May 2012 11:58:30 +1000 From: David Gibson Message-ID: <20120514015830.GC30229@truffala.fritz.box> References: <4FAE1171.1010806@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FAE1171.1010806@ozlabs.ru> Subject: Re: [Qemu-devel] [RFC PATCH] qemu spapr-pci: added IRQ list to PCIBus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Alex Graf , Alex Williamson , anthony@codemonkey.ws On Sat, May 12, 2012 at 05:29:53PM +1000, Alexey Kardashevskiy wrote: > There is a need for a mechanism to obtain an IRQ line number to > initialize End-Of-Interrupt handler. > > There is another proposed solution (commit > b7790763828b732059ad24ba0e64ce327563fe1a "pci: Add callbacks > to support retrieving and updating interrupts") which adds pci_get_irq > callback to every PCI bus to allow an external caller to calculate > IRQ number from IRQ line (ABDD). > > However it seems to be too complicated as it affects all PCI buses > while the only user of it is VFIO-PCI so this could be done simpler > by an array of 4 IRQs (lines A, B, C, D) in struct PCIBus which > every platform would initialize in its own way. I think you need to pin down the definition of what's going on here a bit better. Not all platforms have a concept of global IRQ number, and the usual qemu_irq model supports that. So for this function who is it that is defining the number space in which pci_get_irq() is returning values. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson