From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVpLd-0004pJ-IW for qemu-devel@nongnu.org; Sun, 21 Sep 2014 18:11:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVpLU-0004Uz-Fb for qemu-devel@nongnu.org; Sun, 21 Sep 2014 18:11:13 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:38559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVpLU-0004Uf-55 for qemu-devel@nongnu.org; Sun, 21 Sep 2014 18:11:04 -0400 Received: by mail-qg0-f43.google.com with SMTP id f51so2095630qge.16 for ; Sun, 21 Sep 2014 15:10:58 -0700 (PDT) Date: Sun, 21 Sep 2014 18:10:56 -0400 From: "Gabriel L. Somlo" Message-ID: <20140921221055.GB1695@ERROL.INI.CMU.EDU> References: <20140915145005.GM1825@ERROL.INI.CMU.EDU> <5416FF41.7010800@redhat.com> <20140915150754.GO1825@ERROL.INI.CMU.EDU> <5417299C.7020107@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5417299C.7020107@redhat.com> Subject: Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: edk2-devel@lists.sourceforge.net, agraf@suse.de, qemu-devel@nongnu.org, Gerd Hoffmann , reza.jelveh@tuhh.de, Paolo Bonzini On Mon, Sep 15, 2014 at 08:02:04PM +0200, Laszlo Ersek wrote: > Here's an example from my i440fx Fedora 20 VM. > > (1) The dmesg says first > > ACPI: PCI Interrupt Link [LNKA] (IRQs 5 10 *11) > ACPI: PCI Interrupt Link [LNKB] (IRQs 5 10 *11) > ACPI: PCI Interrupt Link [LNKC] (IRQs 5 *10 11) > ACPI: PCI Interrupt Link [LNKD] (IRQs 5 *10 11) > ACPI: PCI Interrupt Link [LNKS] (IRQs *9) > > This displays what IRQs the _PRT in the DSDT allows for each of the LNKx > links, and the asterisks show (IIRC) what elements of those sets are > selected (programmed) when Linux inherits the hardware. > > (2) Later it logs > > ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10 > ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11 > ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11 > ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10 > > Let's call this mapping LNK_IRQ(). > > (3) Then look for the uchi controllers: > > uhci_hcd 0000:00:07.0: irq 10, io base 0x0000c0c0 > uhci_hcd 0000:00:07.1: irq 11, io base 0x0000c0a0 > uhci_hcd 0000:00:07.2: irq 11, io base 0x0000c080 > > And /proc/interrupts is consistent with that: > > CPU0 CPU1 > 10: 6 25 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2 > 11: 0 0 IO-APIC-fasteoi uhci_hcd:usb3, uhci_hcd:usb4, virtio2 > > These last two blocks are *results*. Using F20-live on Q35 with SeaBIOS vs. OVMF, I get: $> grep LNK dmsg*.log dmsg_bios.log: ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKE] (IRQs 5 *10 11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKF] (IRQs 5 *10 11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKG] (IRQs 5 10 *11) dmsg_bios.log: ACPI: PCI Interrupt Link [LNKH] (IRQs 5 10 *11) dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKA] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKB] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKE] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKF] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKG] (IRQs 5 10 11) *0, disabled. dmsg_ovmf.log: ACPI: PCI Interrupt Link [LNKH] (IRQs 5 10 11) *0, disabled. Neither logs any "Link enabled at IRQ X" messages (at least not for LNKX; they both do for GSIX, though). Wonder why it says "disabled" on OVMF... This is the only suspicious (to me) difference between SeaBIOS and OVMF with q35 and fedora. $> grep uhci_hcd dmsg*.log dmsg_bios.log: uhci_hcd: USB Universal Host Controller Interface driver dmsg_bios.log: uhci_hcd 0000:00:1d.0: setting latency timer to 64 dmsg_bios.log: uhci_hcd 0000:00:1d.0: UHCI Host Controller dmsg_bios.log: uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus # 2 dmsg_bios.log: uhci_hcd 0000:00:1d.0: irq 16, io base 0x0000c080 dmsg_bios.log: usb usb2: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd dmsg_bios.log: uhci_hcd 0000:00:1d.1: setting latency timer to 64 dmsg_bios.log: uhci_hcd 0000:00:1d.1: UHCI Host Controller dmsg_bios.log: uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus # 3 dmsg_bios.log: uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000c0a0 dmsg_bios.log: usb usb3: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd dmsg_bios.log: uhci_hcd 0000:00:1d.2: setting latency timer to 64 dmsg_bios.log: uhci_hcd 0000:00:1d.2: UHCI Host Controller dmsg_bios.log: uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus # 4 dmsg_bios.log: uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000c0c0 dmsg_bios.log: usb usb4: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd dmsg_ovmf.log: uhci_hcd: USB Universal Host Controller Interface driver dmsg_ovmf.log: uhci_hcd 0000:00:1d.0: setting latency timer to 64 dmsg_ovmf.log: uhci_hcd 0000:00:1d.0: UHCI Host Controller dmsg_ovmf.log: uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus # 2 dmsg_ovmf.log: uhci_hcd 0000:00:1d.0: irq 16, io base 0x0000c0e0 dmsg_ovmf.log: usb usb2: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd dmsg_ovmf.log: uhci_hcd 0000:00:1d.1: setting latency timer to 64 dmsg_ovmf.log: uhci_hcd 0000:00:1d.1: UHCI Host Controller dmsg_ovmf.log: uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus # 3 dmsg_ovmf.log: uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000c0c0 dmsg_ovmf.log: usb usb3: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd dmsg_ovmf.log: uhci_hcd 0000:00:1d.2: setting latency timer to 64 dmsg_ovmf.log: uhci_hcd 0000:00:1d.2: UHCI Host Controller dmsg_ovmf.log: uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus # 4 dmsg_ovmf.log: uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000c0a0 dmsg_ovmf.log: usb usb4: Manufacturer: Linux 3.11.10-301.fc20.x86_64 uhci_hcd The IO base addresses are the only difference, not sure if this matters: pci io_base_addr device bios ovmf --------------------- 1d.0 c080 c0e0 1d.1 c0a0 c0c0 1d.2 c0c0 c0a0 Finally, the relevant bits from /proc/interrupts: with SeaBIOS: 16: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb2, i801_smbus 17: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb3 18: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb4 19: 55 0 341 0 IO-APIC-fasteoi ehci_hcd:usb1 and with OVMF: 16: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb2, i801_smbus 17: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb3 18: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb4 19: 55 0 131 0 IO-APIC-fasteoi ehci_hcd:usb1 So, basically, no difference. I'm off studying "pci_slot_get_irq" functions in SeaBIOS per Gerd's suggestion, hopefully I can locate the equivalent functionality in OVMF and spot some problem with it I can fix. That might take me a while... :) Thanks, --Gabriel