qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] USB device assignment in qemu-1.0


From: erik . rull
Subject: [Qemu-devel] USB device assignment in qemu-1.0
Date: Fri, 09 Dec 2011 13:38:57 +0100

Hi all,

coming from 0.14 and older versions, I'm a bit confused using usb in qemu.

My scenario is:

- Linux box as host with USB devices that are used by the host
- Windows guest that needs e.g. access to some dedicated usb-ports and
needs to get ALL devices that are connected there

What I do:
I start qemu with:
 -usb -device usb-ehci,id=ehci.0 -device usb-tablet,bus=usb.0

The root controller hardware gets detected by Windows - fine up to here.

Now I add on the qemu command line:
device_add usb-host,hostport=2

This adds the filter, so that my EHCI host controller gets forwarded.
The filter like looks then like:
Auto filters:
  Bus *, Addr *, Port 2, ID *:*

If I plug in then a device (e.g. USB key), I get the following dmesg:

[ 2867.747786] usb 2-1.2: new high speed USB device using ehci_hcd and
address 13
[ 2867.835547] usb 2-1.2: configuration #1 chosen from 1 choice
[ 2867.835860] scsi13 : SCSI emulation for USB Mass Storage devices
[ 2867.836012] usb-storage: device found at 13
[ 2867.836094] usb-storage: waiting for device to settle before scanning
[ 2869.625659] usb 2-1.2: reset high speed USB device using ehci_hcd and
address 13
[ 2869.923784] usb 2-1.2: reset high speed USB device using ehci_hcd and
address 13
[ 2870.178205] usb 2-1.2: usbfs: interface 0 claimed by usb-storage while
'qemu-system-x86' sets config #1
[ 2873.819811] scsi 13:0:0:0: Direct-Access     USB      DISK 2.0        
0604 PQ: 0 ANSI: 0 CCS
[ 2873.820195] sd 13:0:0:0: Attached scsi generic sg1 type 0
[ 2873.821670] sd 13:0:0:0: [sdb] 3981312 512-byte logical blocks: (2.03
GB/1.89 GiB)
[ 2873.821737] usb-storage: device scan complete
[ 2873.822916] sd 13:0:0:0: [sdb] Write Protect is off
[ 2873.822997] sd 13:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 2873.823077] sd 13:0:0:0: [sdb] Assuming drive cache: write through
[ 2873.825916] sd 13:0:0:0: [sdb] Assuming drive cache: write through
[ 2873.826000]  sdb: sdb1
[ 2873.828166] sd 13:0:0:0: [sdb] Assuming drive cache: write through
[ 2873.828249] sd 13:0:0:0: [sdb] Attached SCSI removable disk


How can I force qemu to take the device? This worked in older qemu versions!
Windows sees the device "partially" - the device manager complains with a:
"This device cannot start." (Code 10)

Additionally the device gets not removed from qemu when unplugging it. When
plugging in another device, it gets not really detected any more. The "info
usb" list gets neither extended nor shrinked when removing the device.

Maybe I just missed something to set up. The inserting and removing worked
fine in 0.14 and prior versions, but now I need to split up two ports for
the guest (for copying files etc.), one for the host (internally used) -
and this is only possible when using 0.15 or later, so I tested 1.0.

Additionally I didn't find a way of adding the usb uhci host controller
again when having ehci enabled. Which option is needed here?

Best regards,

Erik








reply via email to

[Prev in Thread] Current Thread [Next in Thread]