From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTXss-00064Q-Le for qemu-devel@nongnu.org; Mon, 15 Sep 2014 11:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTXsj-0000qU-JX for qemu-devel@nongnu.org; Mon, 15 Sep 2014 11:08:06 -0400 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:49708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTXsj-0000qQ-F7 for qemu-devel@nongnu.org; Mon, 15 Sep 2014 11:07:57 -0400 Received: by mail-qg0-f54.google.com with SMTP id z60so4099601qgd.27 for ; Mon, 15 Sep 2014 08:07:57 -0700 (PDT) Date: Mon, 15 Sep 2014 11:07:54 -0400 From: "Gabriel L. Somlo" Message-ID: <20140915150754.GO1825@ERROL.INI.CMU.EDU> References: <20140915145005.GM1825@ERROL.INI.CMU.EDU> <5416FF41.7010800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5416FF41.7010800@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 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 const struct ehci_companions ich9_1d[] = { > > - { .name = "ich9-usb-uhci1", .func = 0, .port = 0 }, > > - { .name = "ich9-usb-uhci2", .func = 1, .port = 2 }, > > + { .name = "ich9-usb-uhci3", .func = 0, .port = 0 }, > > + { .name = "ich9-usb-uhci3", .func = 1, .port = 2 }, > > { .name = "ich9-usb-uhci3", .func = 2, .port = 4 }, > > }; > > > > > > they *all* get detected and work great on ovmf+osx. Slow kbd+mouse > > get routed automatically to one of them, and work fine. The only > > differences I can see between them (in hw/usb/hcd-uhci.c) is > > the name string and "irq_pin" field. Not sure yet if that's likely > > to point to an explanation... > > 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, and messages about interrupt routing setup? Do you have in OSX > anything that corresponds to /proc/interrupts under Linux? Actually, even more exciting: diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 3b3ebcd..d61656e 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1335,21 +1335,21 @@ static UHCIInfo uhci_info[] = { .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82801I_UHCI1, .revision = 0x03, - .irq_pin = 0, + .irq_pin = 1, .unplug = false, },{ .name = "ich9-usb-uhci2", /* 00:1d.1 */ .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82801I_UHCI2, .revision = 0x03, - .irq_pin = 1, + .irq_pin = 2, .unplug = false, },{ .name = "ich9-usb-uhci3", /* 00:1d.2 */ .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82801I_UHCI3, .revision = 0x03, - .irq_pin = 2, + .irq_pin = 3, .unplug = false, },{ .name = "ich9-usb-uhci4", /* 00:1a.0 */ Turns out, anything with an irq_pin <= 1 won't show up when osx is booted on q35 with ovmf (but osx + q35 works if booted via Chameleon). DSDT looks identical across the ovmf vs. chameleon divide. I'm going to take some time to do a more thorough search of any and all logging I can find on OS X, and also try to find wherever in ovmf the guest device irq pin comes into play where uhci is concerned. I am basically just poking at it with a stick right now, but maybe something will start making sense soon :) Thanks again, --Gabriel