Hi, I'm testing OS X on the q35 tree, and it seems to work quite nicely so far.
However, with the addition of "usb-ehci1" in the latest round of updates, I've started experiencing hangs during OS X boot. First, what works: With the following command line (usb items on the last line): bin/qemu-system-x86_64 -enable-kvm -m 2048 -cpu core2duo \ -M q35 -L q35-seabios/out -monitor stdio \ -device isa-applesmc,osk="our...<magic apple smc key>...Inc" \ -kernel ./Chameleon_RC5_Trunk_Binaries_r668/i386/boot \ -netdev user,id=hub0port0 -device e1000,netdev=hub0port0,id=eth0 \ -device ide-drive,bus=ide.0,drive=MacHDD \ -drive id=MacHDD,if=none,snapshot=on,file=./mac_10.6.img \ -device ich9-usb-uhci1 -device usb-kbd -device usb-mouse I get a working OS X guest, with the following USB related bits in 'info qtree': ... dev: gmch-pcihost, id "" MCFG = 2952790016 irq 0 bus: pcie.0 type PCI dev: ich9-usb-uhci1, id "" masterbus = <null> firstport = 0 bandwidth = 1280 addr = 03.0 romfile = <null> rombar = 1 multifunction = off command_serr_enable = on class USB controller, addr 00:03.0, pci id 8086:2934 (sub 1af4:1100) bar 4: i/o at 0xc040 [0xc05f] bus: usb-bus.0 type usb-bus dev: usb-hub, id "" port = <null> full-path = on addr 0.3, port 2, speed 12, name QEMU USB Hub, attached dev: usb-mouse, id "" port = <null> full-path = on addr 0.4, port 2.1, speed 12, name QEMU USB Mouse, attached dev: usb-kbd, id "" port = <null> full-path = on addr 0.2, port 1, speed 12, name QEMU USB Keyboard, attached ... If I replace: -device ich9-usb-uhci1 -device usb-kbd -device usb-mouse with the generic default: -usb -device usb-kbd -device usb-mouse I get a hang at boot time. OS X (SnowLeopard) prints the following USB-related warning/error to its console: USBF: 2.557 AppleUSBEHCI[0xffffff80056c5000]::CheckSleepCapability - controller will be unloaded across sleep The following USB bits show up in 'info qtree': ... dev: gmch-pcihost, id "" MCFG = 2952790016 irq 0 bus: pcie.0 type PCI ... dev: ich9-usb-uhci3, id "" masterbus = "usb-bus.0" firstport = 4 bandwidth = 1280 addr = 1d.2 romfile = <null> rombar = 1 multifunction = on command_serr_enable = on class USB controller, addr 00:1d.2, pci id 8086:2936 (sub 1af4:1100) bar 4: i/o at 0xc080 [0xc09f] dev: ich9-usb-uhci2, id "" masterbus = "usb-bus.0" firstport = 2 bandwidth = 1280 addr = 1d.1 romfile = <null> rombar = 1 multifunction = on command_serr_enable = on class USB controller, addr 00:1d.1, pci id 8086:2935 (sub 1af4:1100) bar 4: i/o at 0xc060 [0xc07f] dev: ich9-usb-uhci1, id "" masterbus = "usb-bus.0" firstport = 0 bandwidth = 1280 addr = 1d.0 romfile = <null> rombar = 1 multifunction = on command_serr_enable = on class USB controller, addr 00:1d.0, pci id 8086:2934 (sub 1af4:1100) bar 4: i/o at 0xc040 [0xc05f] dev: ich9-usb-ehci1, id "" maxframes = 128 addr = 1d.7 romfile = <null> rombar = 1 multifunction = on command_serr_enable = on class USB controller, addr 00:1d.7, pci id 8086:293a (sub 1af4:1100) bar 0: mem at 0xfebf1000 [0xfebf1fff] bus: usb-bus.0 type usb-bus dev: usb-mouse, id "" port = <null> full-path = on addr 0.0, port 2, speed 12, name QEMU USB Mouse, attached dev: usb-kbd, id "" port = <null> full-path = on addr 0.0, port 1, speed 12, name QEMU USB Keyboard, attached Note how both the keyboard and mouse are now under 'ehci1', rather than under one of the 'uhci' entries, e.g. uhci1 like in the working example earlier on. When I try to start with ehci1 only, with the following USB command line items: -device ich9-usb-ehci1 -device usb-kbd -device usb-mouse I get an error from qemu: speed mismatch trying to attach usb device QEMU USB Keyboard to bus usb-bus.0 The simple presence of EHCI1 as configured by "-device ich9-usb-ehci1" will prevent OS X from booting (with the above-mentioned "controller will be unloaded across sleep" warning). If added all by itself, it looks like this in qtree: ... dev: gmch-pcihost, id "" MCFG = 2952790016 irq 0 bus: pcie.0 type PCI dev: ich9-usb-ehci1, id "" maxframes = 128 addr = 03.0 romfile = <null> rombar = 1 multifunction = off command_serr_enable = on class USB controller, addr 00:03.0, pci id 8086:293a (sub 1af4:1100) bar 0: mem at 0xfebf1000 [0xfebf1fff] bus: usb-bus.0 type usb-bus ... I don't know if/how I can tell '-device usb-kbd' to connect under usb-uhci1 specifically (in the case where both ehci1 and uhci[1-3] are present), so I did not have a chance to try that. I wonder what specifically about the way ehci1 is added to the device tree make it not work properly on OS X -- any ideas for what may be wrong, or what else I may try, would be much appreciated ! Thanks, --Gabriel PS. For comparison with some real Apple hardware, here are the usb bits from lspci on an old first-generation MacBookPro from 2006: 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 23 Region 4: I/O ports at 40a0 [size=32] Kernel driver in use: uhci_hcd 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin B routed to IRQ 19 Region 4: I/O ports at 4080 [size=32] Kernel driver in use: uhci_hcd 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin C routed to IRQ 18 Region 4: I/O ports at 4060 [size=32] Kernel driver in use: uhci_hcd 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin D routed to IRQ 16 Region 4: I/O ports at 4040 [size=32] Kernel driver in use: uhci_hcd 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 23 Region 0: Memory at 98405400 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [58] Debug port: BAR=1 offset=00a0 Kernel driver in use: ehci_hcd Also, on my 2010 MacPro5,1 (now with twice the USB hardware :) : 00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 16 Region 4: I/O ports at 40e0 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin B routed to IRQ 21 Region 4: I/O ports at 40c0 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin D routed to IRQ 19 Region 4: I/O ports at 40a0 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2 (prog-if 20 [EHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin C routed to IRQ 18 Region 0: Memory at a0526000 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [58] Debug port: BAR=1 offset=00a0 Capabilities: [98] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: ehci_hcd ... 00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin A routed to IRQ 23 Region 4: I/O ports at 4080 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin B routed to IRQ 19 Region 4: I/O ports at 4060 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3 (prog-if 00 [UHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin C routed to IRQ 18 Region 4: I/O ports at 4040 [size=32] Capabilities: [50] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: uhci_hcd 00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1 (prog-if 20 [EHCI]) Subsystem: Intel Corporation Device 7270 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Interrupt: pin D routed to IRQ 16 Region 0: Memory at a0525000 (32-bit, non-prefetchable) [size=1K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [58] Debug port: BAR=1 offset=00a0 Capabilities: [98] PCI Advanced Features AFCap: TP+ FLR+ AFCtrl: FLR- AFStatus: TP- Kernel driver in use: ehci_hcd