qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] USB passthrough in qemu


From: Michal Suchanek
Subject: Re: [Qemu-devel] USB passthrough in qemu
Date: Fri, 13 Jun 2014 18:45:02 +0200

On 13 June 2014 16:51, Gerd Hoffmann <address@hidden> wrote:
>   Hi,
>
>> Ok, so without a machine description that has ehci or xhci as default
>> device you cannot use -usbdevice and with -device you get a magic
>> incantation like -device usb-ehci,id=usb,bus=pci.0,addr=0x4 -device
>> usb-host,vendorid=0x0b95,productid=0x772b,id=hostdev0,bus=usb.0 which
>> is overly long for TheRightThing(tm) and as I understand it you have
>> to
>
> qemu -device nec-usb-xhci \
>      -device usb-host,vendorid=0x0b95,productid=0x772b
>
> Works just fine too.  As long as there is a single bus only there is no
> need to explicitly specify which you want.  As long as you don't care
> which port your devices are attached to you don't need to specify that.
> And as long as you don't want/need refer to your devices you also don't
> have to give them an id.

ok, that's something that could work in the future.

Attaching the passthru device and usb-tablet to xhci hub in in qemu
2.0 results in qemu aborting when Windows probes the xhci bus. Also
the driver Windows attaches after another boot is Renesas.

>
>> 1) know if the device is usb1/2/3 because here you specify by hand to
>> what bus it is attached to and it is not going to be automatically
>> attached to the correct bus
>
> Wrong.  Create a bus which can handle multiple usb speeds (xhci will do
> for 1+2+3, ehci+companions will do for 1+2).  Use that.  Done.
>
> And we had that topic in this thread already, so you know this.  Please
> stop your false claims.

ok, so this should work with -usbdevice *and* -device

>
>> 2) in case you have more than 1 device count usb ports and manually
>> assign each to unique port number and count pci ports to know where to
>> attach the ehci controller
>
> You don't have to specify the port, qemu will happily pick a free one
> automatically for you then.

Indeed, weeding out addr and multifunction in ich9-ehci-uhci.cfg still
results in working setup.

With -net none -readconfig /scratch/qemu/ehci.cfg -device
usb-host,vendorid=0x0b95,productid=0x772b -device
usb-host,vendorid=0x0a12,productid=0x0001 -device usb-tablet

I get networking over the USB Ethernet adaptor (which works only on
ehci), the qemu tablet gets attached to ehci and the BT dongle to
uhci.

Thanks

Michal



reply via email to

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