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 16:26:39 +0200

On 13 June 2014 10:12, Gerd Hoffmann <address@hidden> wrote:
> On Fr, 2014-06-13 at 09:46 +0200, Michal Suchanek wrote:
>> On 13 June 2014 09:33, Gerd Hoffmann <address@hidden> wrote:
>> >   Hi,
>> >
>> >> However,
>> >> -device nec-usb-xhci -usbdevice host:0b95:772b -usbdevice tablet
>> >> gives empy xhci bus and both devices attached to uhci bus which does not 
>> >> work.
>> >
>> > Either drop '-usb' so xhci is the only usb controller, or use -device
>> > usb-$device,bus=$name to explicitly say which controller you want your
>> > device attach to.
>> >
>>
>> I did drop -usb
>>
>> I am using qemu 2.0
>>
>> Do I need newer version for this to work?
>
> Oops.  No.  Use -device instead of -usbdevice.
>
> -usbdevice tried to be clever and automatically turns on usb for you, so
> you get uhci too.
>
> This kind problems showing up when qemu tries to do TheRightThing[tm]
> automatically is exactly the reason why we don't like adding such things
> any more.  What people consider useful simply changes over time and with
> qemu improving.  The behavior made sense back the day where we didn't
> have ehci+xhci emulation.  Now days not so much ...
>

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

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

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

which adds unnecessary manual configuration where qemu already has
existing code to deal with all this.

Thanks

Michal



reply via email to

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