From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M66ZJ-000387-Mm for qemu-devel@nongnu.org; Mon, 18 May 2009 13:24:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M66ZJ-00037f-5b for qemu-devel@nongnu.org; Mon, 18 May 2009 13:24:05 -0400 Received: from [199.232.76.173] (port=45559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M66ZJ-00037W-1y for qemu-devel@nongnu.org; Mon, 18 May 2009 13:24:05 -0400 Received: from qw-out-1920.google.com ([74.125.92.145]:14848) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M66ZI-0006uX-IY for qemu-devel@nongnu.org; Mon, 18 May 2009 13:24:04 -0400 Received: by qw-out-1920.google.com with SMTP id 4so2182189qwk.4 for ; Mon, 18 May 2009 10:24:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A0D2A2B.7050302@redhat.com> References: <4A0D2A2B.7050302@redhat.com> Date: Mon, 18 May 2009 10:24:02 -0700 Message-ID: <9ae48b020905181024p15b3207fy7ea7eb62b868ec0b@mail.gmail.com> Subject: Re: [Qemu-devel] pci irq confusion From: Ed Swierk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: "qemu-devel@nongnu.org" On Fri, May 15, 2009 at 1:39 AM, Gerd Hoffmann wrote: > Putting the three info sources into a table gives this picture: > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0qemu =A0| =A0lspci = =A0| =A0driver > ------------------------+--------+---------+---------- > 00:01.2 =A0usb =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A09 =A0 | =A0 =A0 9 =A0 | = =A0 =A0 9 > 00:01.3 =A0acpi =A0 =A0 =A0 =A0 =A0 | =A0 11 =A0 | =A0 =A0 9 =A0 | =A0 = =A011 > 00:03.0 =A0xen-platform =A0 | =A0 11 =A0 | =A0 =A011 =A0 | =A0 =A011 > 00:04.0 =A0scsi =A0 =A0 =A0 =A0 =A0 | =A0 =A09 =A0 | =A0 =A0 9 =A0 | =A0 = =A0 9 > 00:05.0 =A0virtio-blk =A0 =A0 | =A0 11 =A0 | =A0 =A010 =A0 | =A0 =A010 > 00:06.0 =A0virtio-baloon =A0| =A0 =A09 =A0 | =A0 =A0 9 =A0 | =A0 =A0 9 > > Note the inconsistencies for acpi and virtio-blk. =A0Where do they come f= rom? > =A0Is that normal? =A0Or is that something which needs fixing? qemu's "info pci" monitor command gets the IRQ value from offset 0x3c in the device's PCI config space, which is a useless scratch register. Some BIOSes may write to this register the actual IRQ assigned to the device, but many don't, and I don't know of any OS that relies on it. IMHO this IRQ value is misleading and shouldn't be reported by qemu at all. lspci reads IRQ info for each device from sysfs, and represents the IRQ on which Linux would expect to receive device interrupts if the driver requested PCI interrupts. /proc/interrupts shows the IRQs that have actually been associated with device drivers that requested them, PCI or otherwise. I'm no expert on ACPI but it appears that the Linux ACPI driver doesn't use PCI interrupts, and is instead assigned an IRQ through some other means; the PCI IRQ that Linux happens to associate with device 00:01.3 is never used. --Ed