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

2014-09-21 Thread Laszlo Ersek
On 09/22/14 00:10, Gabriel L. Somlo wrote: > 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

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

2014-09-21 Thread Gabriel L. Somlo
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)

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

2014-09-21 Thread Gabriel L. Somlo
On Tue, Sep 16, 2014 at 10:15:20AM +0200, Gerd Hoffmann wrote: > Hi, > > > OK, so I forgot to articulate that with the above patch, I'm seeing > > *both* uhci2 and uhci3, but not uhci1. Basically, if uhciX has an > > irq_pin less than 2, it won't show up in OSX if booted with ovmf. > > We're no

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

2014-09-16 Thread Gerd Hoffmann
Hi, > OK, so I forgot to articulate that with the above patch, I'm seeing > *both* uhci2 and uhci3, but not uhci1. Basically, if uhciX has an > irq_pin less than 2, it won't show up in OSX if booted with ovmf. > We're no longer looking at PIIX, this is q35 with ovmf or without. Can you test wha

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

2014-09-15 Thread BALATON Zoltan
On Mon, 15 Sep 2014, Gabriel L. Somlo wrote: mappings should end up being the same. I'll look for as close an equivalent of "cat /proc/interrupts" on os x as I can find, and try to sanity-check this assumption. I think you can find these in the ioreg output. Try ioreg -lfw0 and look for IOInte

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

2014-09-15 Thread Gabriel L. Somlo
On Mon, Sep 15, 2014 at 08:02:04PM +0200, Laszlo Ersek wrote: > >> It is actually extremely relevant, the irq_pin field. I'm not exactly > >> sure how just yet, but it is. Maybe check the interrupt routing in OSX > >> somehow? Do you have a dmesg-like log in OSX, with a PRT dump from the > >> DSDT,

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

2014-09-15 Thread Laszlo Ersek
On 09/15/14 17:07, Gabriel L. Somlo wrote: > On Mon, Sep 15, 2014 at 05:01:21PM +0200, Laszlo Ersek wrote: >>> diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c >>> index 289ca3b..bb230f1 100644 >>> --- a/hw/usb/hcd-ehci-pci.c >>> +++ b/hw/usb/hcd-ehci-pci.c >>> @@ -208,8 +208,8 @@ struct

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

2014-09-15 Thread Gabriel L. Somlo
On Mon, Sep 15, 2014 at 05:01:21PM +0200, Laszlo Ersek wrote: > > diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c > > index 289ca3b..bb230f1 100644 > > --- a/hw/usb/hcd-ehci-pci.c > > +++ b/hw/usb/hcd-ehci-pci.c > > @@ -208,8 +208,8 @@ struct ehci_companions { > > }; > > > > static c

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

2014-09-15 Thread Laszlo Ersek
On 09/15/14 16:50, Gabriel L. Somlo wrote: > On Fri, Sep 12, 2014 at 03:59:52PM -0400, Gabriel L. Somlo wrote: >> On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: >>> So it could be an OVMF bug related to multifunction devices. >>> >>> Well, you could try moving devices around in diff

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

2014-09-15 Thread Gabriel L. Somlo
On Fri, Sep 12, 2014 at 03:59:52PM -0400, Gabriel L. Somlo wrote: > On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: > > So it could be an OVMF bug related to multifunction devices. > > > > Well, you could try moving devices around in different functions. > > You could try moving ehc

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

2014-09-12 Thread Laszlo Ersek
On 09/12/14 21:59, Gabriel L. Somlo wrote: > On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: >> So it could be an OVMF bug related to multifunction devices. >> >> Well, you could try moving devices around in different functions. >> You could try moving ehci1 to 0 and the UHCIs to 1/2

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

2014-09-12 Thread Gabriel L. Somlo
On Fri, Sep 12, 2014 at 08:26:01PM +0200, Paolo Bonzini wrote: > So it could be an OVMF bug related to multifunction devices. > > Well, you could try moving devices around in different functions. > You could try moving ehci1 to 0 and the UHCIs to 1/2/7. > > Or drop uhci2/uhci3 and move the two re

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

2014-09-12 Thread Paolo Bonzini
Il 12/09/2014 20:18, Gabriel L. Somlo ha scritto: >> > Now *that* is really strange, especially as UHCI1 is pci function 0, >> > without probing that successfully you wouldn't see the other pci >> > functions (1+2+7 for uhci2+uhci3+ehci) in the same slot in the first >> > place. > I've only ever sk

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

2014-09-12 Thread Gabriel L. Somlo
Hi Gerd, On Fri, Sep 12, 2014 at 08:46:19AM +0200, Gerd Hoffmann wrote: > > Obviously, since QEMU was routing the slow keyboard+mouse to UHCI1, > > which for some reason gets masked when OVMF is used, things weren't > > working. > > Try '-device usb-mouse,port=5 -device usb-kbd,port=6'. That lin

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

2014-09-12 Thread Gabriel L. Somlo
On Fri, Sep 12, 2014 at 11:17:35AM +0200, BALATON Zoltan wrote: > On Thu, 11 Sep 2014, Gabriel L. Somlo wrote: > >On Thu, Sep 11, 2014 at 11:34:03PM +0200, Alexander Graf wrote: > >>XNU also populates its device tree based on the DSDT. Maybe there's a > >>subtle difference there? > > > >This was th

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

2014-09-12 Thread BALATON Zoltan
On Thu, 11 Sep 2014, Gabriel L. Somlo wrote: On Thu, Sep 11, 2014 at 11:34:03PM +0200, Alexander Graf wrote: XNU also populates its device tree based on the DSDT. Maybe there's a subtle difference there? This was the low hanging fruit, so I checked it first :) Pulled the DSDT using the OS X ve

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

2014-09-11 Thread Gerd Hoffmann
Hi, > With OVMF, I have EHCI with the high-speed (and working) > keyboard+mouse, but ONLY ONE UHCI device (UHCI3). UHCI1 UHCI2 do not > get detected. Now *that* is really strange, especially as UHCI1 is pci function 0, without probing that successfully you wouldn't see the other pci functions (1

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

2014-09-11 Thread Gabriel L. Somlo
On Thu, Sep 11, 2014 at 11:34:03PM +0200, Alexander Graf wrote: > >> With Chameleon (and SeaBIOS), I see all three UHCIs (with no attached > >> devices), and EHCI (with the now-high-speed keyboard and mouse). > >> > >> With OVMF, I have EHCI with the high-speed (and working) > >> keyboard+mouse, b

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

2014-09-11 Thread Alexander Graf
> Am 11.09.2014 um 22:46 schrieb Laszlo Ersek : > >> On 09/11/14 22:16, Gabriel L. Somlo wrote: >>> On Thu, Sep 11, 2014 at 06:40:38PM +0200, Paolo Bonzini wrote: >>> Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: >> Can you configure Chamaleon to avoid the boot prompt? Yes. After do

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

2014-09-11 Thread Laszlo Ersek
On 09/11/14 22:16, Gabriel L. Somlo wrote: > On Thu, Sep 11, 2014 at 06:40:38PM +0200, Paolo Bonzini wrote: >> Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: > Can you configure Chamaleon to avoid the boot prompt? >>> Yes. After doing that, usb starts working once OS X is fully booted. >>> >

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

2014-09-11 Thread Gabriel L. Somlo
On Thu, Sep 11, 2014 at 06:40:38PM +0200, Paolo Bonzini wrote: > Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: > >> > Can you configure Chamaleon to avoid the boot prompt? > > Yes. After doing that, usb starts working once OS X is fully booted. > > > > Works with either piix or q35 just fine.

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

2014-09-11 Thread Gabriel L. Somlo
On Thu, Sep 11, 2014 at 06:40:38PM +0200, Paolo Bonzini wrote: > Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: > >> > Can you configure Chamaleon to avoid the boot prompt? > > Yes. After doing that, usb starts working once OS X is fully booted. > > > > Works with either piix or q35 just fine.

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

2014-09-11 Thread Paolo Bonzini
Il 11/09/2014 18:35, Gabriel L. Somlo ha scritto: >> > Can you configure Chamaleon to avoid the boot prompt? > Yes. After doing that, usb starts working once OS X is fully booted. > > Works with either piix or q35 just fine. > > Does this mean it's likely to be an OVMF uhci/ehci issue specific to

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

2014-09-11 Thread Gabriel L. Somlo
On Thu, Sep 11, 2014 at 05:49:08PM +0200, Paolo Bonzini wrote: > Il 11/09/2014 17:42, Gabriel L. Somlo ha scritto: > > Building SeaBIOS w/o EHCI and UHCI won't allow me to type into > > Chameleon's boot prompt at all (and yes, I do end up getting the > > "usb-kbd: warning: key event queue full" err

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

2014-09-11 Thread Gabriel L. Somlo
On Thu, 11 Sep 2014 01:08:39 +0200, Paolo Bonzini wrote: > Il 10/09/2014 16:06, Gabriel L. Somlo ha scritto: > > If it's in QEMU, it's only tickled by the OVMF + OSX combination. > > Fedora works (around it) fine, and everyone's happy when using > > SeaBIOS (and Chameleon, in OSX's case). > > > >

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

2014-09-11 Thread Paolo Bonzini
Il 11/09/2014 17:42, Gabriel L. Somlo ha scritto: > Building SeaBIOS w/o EHCI and UHCI won't allow me to type into > Chameleon's boot prompt at all (and yes, I do end up getting the > "usb-kbd: warning: key event queue full" errors after a few > keystrokes). Can you configure Chamaleon to avoid th

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

2014-09-10 Thread Gabriel L. Somlo
Hi Gerd & Laszlo, On Wed, Sep 10, 2014 at 09:59:27AM +0200, Laszlo Ersek wrote: > On 09/10/14 08:31, Gerd Hoffmann wrote: > > > > What happens if you build ovmf with uhci but without ehci driver? Does > > that work? > > I'm glad I happened to suggest the same. ;) Commenting out MdeModulePkg/Bu

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

2014-09-10 Thread Laszlo Ersek
On 09/10/14 08:31, Gerd Hoffmann wrote: > Hi, > >> So at this point I'm wondering why guests and "info qtree" are contradictory, >> and whether the combination of OVMF and OS X tickle some qemu usb emulation >> bug differently than all other (working) combinations ? > > It's due to the way how

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

2014-09-09 Thread Gerd Hoffmann
Hi, > So at this point I'm wondering why guests and "info qtree" are contradictory, > and whether the combination of OVMF and OS X tickle some qemu usb emulation > bug differently than all other (working) combinations ? It's due to the way how usb1 compatibility was implemented when ehci was in

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

2014-09-09 Thread Laszlo Ersek
On 09/10/14 00:00, Gabriel L. Somlo wrote: > Executive summary: OS X (10.9.4) works on Q35 with usb keyboard+mouse when > booted on SeaBIOS with Chameleon , but not on OVMF [1]. > > [1] Recently patched acpi pm timer to boot on Q35, plus a bunch of pending > sata patches by Reza, cc-ed. > > C

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

2014-09-09 Thread Gabriel L. Somlo
Executive summary: OS X (10.9.4) works on Q35 with usb keyboard+mouse when booted on SeaBIOS with Chameleon , but not on OVMF [1]. [1] Recently patched acpi pm timer to boot on Q35, plus a bunch of pending sata patches by Reza, cc-ed. Command lines used to test using Fedora 20 live and OS X 1