[Spice-devel] Questions on usbredir + XSpice redux, libusb anyone?

Jeremy White jwhite at codeweavers.com
Mon Apr 13 12:40:44 PDT 2015


Hi folks,

I've done some work on a usbredir kernel module to bring support for USB
to XSpice.   In doing so, and talking with some colleagues, their
reaction was:  why don't you modify libusb instead?

That is, the current change is to modify XSpice to pipe the USBREDIR
protocol bytes out to a unix domain socket, and then into the kernel
module from there.  However, if you think about it, most Linux
applications (e.g. most apps running inside an XSpice session) are going
to use libusb to access the USB devices.

So then the question - why not modify libusb to detect devices from the
unix domain socket instead of making the round trip through the kernel?
 It has the benefit of letting you keep the traffic and the files in
userspace, and avoiding sharing devices system wide.  The main downside
would seem to be that non libusb devices (e.g. thumb drives et all)
would not be supported.  For our use case, that limitation is not an
issue, and the simplicity is compelling.

I wanted to share this idea to make sure there wasn't something else we
were missing and to see what others think.

Thoughts and comments are appreciated.

Cheers,

Jeremy


More information about the Spice-devel mailing list