[Spice-devel] RFC: usb redirection plan

Hans de Goede hdegoede at redhat.com
Tue Nov 30 03:14:22 PST 2010


Hi,

On 11/29/2010 06:26 PM, Gerd Hoffmann wrote:
> Hi,
>
>> Step 4:
>> Look into getting usb-2.0 support into qemu
>
> Have you looked at xHCI + usb 3.0?
>

No not really I must admit, I know you have and I plan
to write a protocol doc / RFC before coding, so perhaps
you can shoot at the RFC from that pov?

> I think it would be a good idea to do that to make sure the redirection protocol can handle usb3 just fine. In a few years usb3 will be everythere, and when designing something now we should make sure it works nicely with usb3.

Agreed.

> I had a brief look at the xHCI specs. It looks pretty nice from a emulation point of view. It is fully event driven design. It does more in hardware than UHCI+EHCI (it has to to reach the speeds without keeping the cpu 100% busy ;) IIRC the guest can just hand a ring buffer to the xHCI for iso xfers, no need to fiddle with usb packets manually. This is nice as it probably allows a quite efficient emulation. I think it is good for usb redirection too. Also xHCI handles all usb devices, so the UHCI/EHCI split for USB 1.1/2.0 devices which is quite nasty to emulate isn't there.

But the event driven-ness is from the device driver for the
host controller pov, and usb redirection is dealing with usb
at the device level / emulating a usb device. Has much changed
(other then speed) for the way usb looks from the device pov ?

> Jumping from USB 1.1 straight to USB 3.0 looks quite attractive from a emulation point of view, only problem with that is guest support, we can't (yet) expect guests to handle usb3 out-of-the-box. Also the qemu usb subsystem needs some work to handle usb3 nicely.

Yeah the whole ehci + companion controller is a mess, esp. combined
with the transaction translator in usb-2.0 hubs stuff, so now
we still have 2 ways to talk to a usb-1.1 device through the
companion controller, or through the tt, just great.

But I think given you're guest os support argument that skipping 2.0
support is not really an option.

Regards,

Hans


More information about the Spice-devel mailing list