USB passthru not work with Mac OS X El Capitan

Bug #1509336 reported by Okra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

QEMU emulator version 2.4.50 with kernel kvm module from linux kernel 3.16.0 or 4.2.3

Since upgrading from Yosemite to El Capitan - USB passthru does not work. Note USB passthru worked perfectly with Maverick and Yosemite. I attempt to use different USB hosts. I found a patch for widows xp that had similar problem the patch was applied in 2012. Note NO problems with USB passthru with windows or linux clients. If it matters the devices that I am trying to passthru USB are smartcard reader and webcam. The devices are present in El Capitan but do not function.

These are the massages from loading the VM (El Capitan). The first two lines are from the clover bootloader. The ehci warnings are generated when loading Mac Os X El Capitan.

QEMU 2.4.50 monitor - type 'help' for more information
### These messages below started when using the clover bootloader and occur when loading El Capitan, Maverick or Yosemite.
### The bootloader is Clover version 3292
(qemu) ehci: PERIODIC list base register set while periodic schedule
      is enabled and HC is enabled
ehci: ASYNC list address register set while async schedule
      is enabled and HC is enabled

#### Below are errors when the guest host (El Capitan) is loading from qemu monitor. The messages below only occur when loading El Capitan.
ehci warning: guest requested more bytes than allowed
processing error - resetting ehci HC
ehci warning: guest requested more bytes than allowed
processing error - resetting ehci HC
ehci warning: guest requested more bytes than allowed
processing error - resetting ehci HC

This is the errors from the guest os - Mac Os X - El Capitan
000000.580358 AppleUSBLegacyRoot@: AppleUSBLegacyRoot::init: enabling legacy matching
000001.803455 AppleUSBEHCIPCI@fd000000: AppleUSBEHCI::WaitForAsyncSchedule: USBC
MD (0x00080020) and USBSTS (0x00001000) did not synchronize

the following qemu command has worked flawlessly with Yosemite and Maverick.
qemu-system-x86_64 -enable-kvm -m 4096 -cpu core2duo -machine q35 \
-bios /usr/local/share/qemu/bios.bin \
-name "El Capitan" \
-mem-path /hugetlbfs \
-rtc base=utc,clock=vm,driftfix=slew \
-balloon none \
-parallel none \
-smp 4,sockets=1,cores=2,threads=2 \
-boot menu=on \
-usb -device usb-kbd -device usb-mouse \
-device usb-host,vendorid=0x0455,productid=0x0777 \
-vga std \
-monitor stdio \
-device isa-applesmc,osk="youknowwhatitis" \
-smbios type=2 \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-device e1000-82545em,netdev=hub0port0,id=mac_vnet0,mac=62:64:44:34:64:54 \
-netdev bridge,id=hub0port0,br=br0,helper=/usr/local/libexec/qemu-bridge-helper \
-device ide-drive,bus=ide.0,drive=elcapitan \
-drive id=elcapitan,format=qcow2,if=none,file=./iElCapitan.qcow2

If anything else I can do to debug the problem please let me know.

Okra (okrahere)
information type: Public → Private
Revision history for this message
Okra (okrahere) wrote :

My problem was solved by using the UEFI boot loader and I followed the instructions at the following links:

https://github.com/tianocore/tianocore.github.io/wiki/How-to-build-OVMF

http://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt

Also remove the "-bios" option above and added the following options.

-drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \
-drive if=pflash,format=raw,file=OVMF_VARS.fd \

Also changed clover to boot with UEFI only. Anyway that has used clover will know how to change this option.

information type: Private → Public
Okra (okrahere)
Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.