qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse


From: Gabriel L. Somlo
Subject: Re: [Qemu-devel] OVMF, Q35 and USB keyboard/mouse
Date: Sun, 21 Sep 2014 18:10:56 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]