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

Re: [Xen-devel] [PATCH v0 RFC 0/2] xl/libxl support for PVUSB



Yes, I reviewed the codes inÂtools/python/xen/util/vusb_util.c:bind_usb_device()Â
and what Xend did wasÂtake the "device" (which would be "1-1"),
and search the sysfs usb node for all "interfaces" (which would be
"1-1:.*"), and then unbind each of them and bind them to usbback.

This helps a lot.Â

Thanks!
-Bo


On Thu, Aug 14, 2014 at 11:04 PM, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:
On Sun, Aug 10, 2014 at 4:23 PM, Bo Cao <caobosimon@xxxxxxxxx> wrote:
> 2. sysfs_intf_write
> Â Â In the process of "xl usb-attach domid intf=1-1", after writing "1-1" to Xenstore entry, we need to
> bind the controller of this usb device to usbback driver so that it can be used by VM Guest. For exampele,
> for usb device "1-1", it's controller interface maybe "1-1:1.0", and we write this value to "/sys/bus/usb/driver/usbback/bind".
> But for some devices, they have two controllers, for example "1-1:1.0" and "1-1:1.1". I think this means it has two functions,
> such as usbhid and usb-storage. So in this case, we bind the two controller to usbback?

So looking at tools/python/xen/util/vusb_util.c:bind_usb_device(), it
looks like what xend did was take the "device" (which would be "1-1"),
and search the sysfs usb node for all "interfaces" (which would be
"1-1:.*"), and then unbind each of them and bind them to usbback.

(Obviously I needed to check out a 4.4 branch to look at the xend
code, since it's been deleted in the development branch.)

Â-George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.