From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJsXp-0007gY-5f for qemu-devel@nongnu.org; Sun, 24 Mar 2013 17:33:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJsXm-0006eC-Lt for qemu-devel@nongnu.org; Sun, 24 Mar 2013 17:33:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJsXm-0006dw-DG for qemu-devel@nongnu.org; Sun, 24 Mar 2013 17:33:34 -0400 Date: Sun, 24 Mar 2013 23:34:00 +0200 From: "Michael S. Tsirkin" Message-ID: <20130324213400.GB31631@redhat.com> References: <1364124760-5794-1-git-send-email-peter.maydell@linaro.org> <20130324155837.GB22106@hall.aurel32.net> <20130324191719.GB31138@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 00/10] Fix versatile_pci (and break versatilepb linux guests!) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Arnd Bergmann , patches@linaro.org, Will Deacon , qemu-devel@nongnu.org, Paul Brook , Andreas =?iso-8859-1?Q?F=E4rber?= , Aurelien Jarno On Sun, Mar 24, 2013 at 08:53:33PM +0000, Peter Maydell wrote: > On 24 March 2013 19:17, Michael S. Tsirkin wrote: > > On Sun, Mar 24, 2013 at 04:58:37PM +0100, Aurelien Jarno wrote: > >> On Sun, Mar 24, 2013 at 11:32:30AM +0000, Peter Maydell wrote: > >> > I've provided a property for enabling the old broken IRQ mapping; > >> > this can be enabled with the command line option: > >> > -global versatile_pci.broken-irq-mapping=1 > >> > > >> > (If anybody wants to suggest a better way of handling this please do.) > >> > >> Do you have a pointer to the corresponding kernel patch? Is it possible > >> to get the kernel to detect if it should use the correct or the broken > >> IRQ mapping? > > > > Alternatively, or additionally, how about detecting the correct or > > the incorrect kernel and updating the mapping? > > For example, maybe we could do this using the > > IRQ value written into the device pci config register? > > Yeah, ideally being able to detect the buggy kernel would be good; > I can't see anything at the controller level that would do though, > and I don't really know enough about PCI to know about generic > PCI stuff that would work. (Why would the OS need to tell the > device anything about its IRQ if it's hardwired?) Each pci device has a bit of memory where the OS stores the IRQ#. I think it was invented as a simple way to pass data from BIOS to the OS on a PC. There's no special reason to store it on the device but everyone does it. > > If we can't find anything, maybe add our own register > > so the same qemu config can support old and new kernels? > > Then the new kernel wouldn't work on real hardware... > > -- PMM Not if our register is read-only in real hardware. -- MST