On Mon, Feb 03, 2014 at 12:46:50PM -0500, Kevin O'Connor wrote:
On Mon, Feb 03, 2014 at 11:50:21AM -0500, Gabriel L. Somlo wrote:
Hi Kevin,
I'm running into an intermittent (roughly 50% of the time) USB keyboard freeze, using the following command line:
bin/qemu-system-x86_64 -enable-kvm -m 2048 -cpu core2duo -M q35 \ -usb -device usb-kbd -device usb-mouse \ -device ide-drive,bus=ide.2,drive=HDD \ -drive id=HDD,if=none,snapshot=on,file=./Fedora-Live-Desktop-x86_64-20-1.iso \ -bios bios-test.bin
Hi Gerd,
You're familiar with the QEMU USB code. Any idea what could be causing these intermittent failures? I can reproduce the above issue as well. It's not related to xhci at all - it seems related to this change:
Interestingly, regardless of the keyboard failure, it looks like the usb mouse is never detected correctly (nor the usb hub it's attached to). The failure is more pronounced when using:
-usb -device usb-kbd -device usb-net
as in this case, one can see in the seabios logs:
|1ffaa000| device rev=0100 cls=00 sub=00 proto=00 size=8 [...] |1ffaa000| usb_hid_setup 0x1ffad2cc [...] |1ffaa000| USB keyboard initialized [...] \1ffaa000/ End thread
[...] |1ffac000| device rev=0100 cls=00 sub=00 proto=00 size=8 [...] |1ffac000| usb_hid_setup 0x1ffad2cc [...] \1ffac000/ End thread
Which indicates two USB HID devices are found when there is only one actual device. So, it seems like when SeaBIOS is trying to initialize the USB hub, it is somehow talking to the USB keyboard again.
Does QEMU keep some kind of cache of UHCI transfer descriptors that may be getting out of sync?
-Kevin