Linux – USB forwarding from dom0 to domU

linuxusbxen

What are my options to forward two USB connected phones to xen guest?

I've read about PCI-passthrough http://www.wlug.org.nz/XenPciPassthrough, but I'm sure usb controller in the server isn't a pci card.

There's device level forwarding, but I need to forward two devices, this here doesn't say how to do it: http://www.olivetalks.com/2008/02/03/usb-forwarding-on-xen-it-just-does-not-work/

Would something as simple as:

usbdevice = [
'host:xxx',
'host:yyy',
]

work?

EDIT: I'm now starting a bounty. This is really important for me and for other people also, hoping someone who have this resolved will be able to help.

Best Answer

I use Xen with USB passthrough to my domU on Centos5.

So far I can tell: Forward the complete USB-stuff or nothing. Do not try to forward only some OHCI/UHCI devices.

So here it runs more or less (haven't started a stress test yet):

  1. Disconnect all USB devices
  2. Unload the USB devices from dom0 via pciback. Unload UHCI/OHCI and EHCI devices. (Write some kind of init.d script for your needs). Details about pciback are here under point 1
  3. Restart xend
  4. lsusb should output nothing on dom0
  5. edit you domU configuration file with the pci = [ '0000:yy:xx.0'] stuff
  6. Start your domU
  7. domU should report USB devices via lspci (other pciids) and lsusb

My dom0 is booted with kernel-parameter noirqdebug (grub).