From: David Gibson Subject: Re: [RFC PATCH] qemu spapr-pci: added IRQ list to PCIBus Date: Mon, 14 May 2012 11:58:30 +1000 Message-ID: <20120514015830.GC30229@truffala.fritz.box> References: <4FAE1171.1010806@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alex Williamson , Benjamin Herrenschmidt , anthony@codemonkey.ws, Alex Graf , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Alexey Kardashevskiy Return-path: Received: from ozlabs.org ([203.10.76.45]:47144 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753769Ab2ENB6g (ORCPT ); Sun, 13 May 2012 21:58:36 -0400 Content-Disposition: inline In-Reply-To: <4FAE1171.1010806@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: 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