Skip to contentSkip to conversation

libxl: Introduce functions to add and remove USB devices to an HVM guest

RFC PATCH Stefan 3 participants 6 messages Apr 10, 2013

lore
Share & tools
lore

Stefan

author
#0 lore raw

I've been following this thread with interest. Having USB passthrough for xl will certainly be an appreciated feature.

Provided a USB-device structure, enabling PVUSB is almost only a matter of writing to the xenstore. Please have a look at this script:
http://www.neobiker.de/wiki/index.php?title=XEN-PVUSB

It's a shell script that does the work. Of course, there's also a python implementation in the GIT. Perhaps we could at least have a USB-device structure before the feature freeze? Can you make the code that we have available? I'd like to see if I can do something with it, instead of having to start from nothing.

Stefan S

#1 lore raw
Quoted 7 lines · Stefan

I've been following this thread with interest. Having USB passthrough for xl will certainly be an appreciated feature.

Provided a USB-device structure, enabling PVUSB is almost only a matter of writing to the xenstore. Please have a look at this script:
http://www.neobiker.de/wiki/index.php?title=XEN-PVUSB

Quoted 5 lines

It's a shell script that does the work. Of course, there's also a python implementation in the GIT. Perhaps we could at least have a USB-device structure before the feature freeze? Can you make the code that we have available? I'd like to see if I can do something with it, instead of having to start from nothing.

I'm working hard to try to get "devicemodel" USB hot-plug working, and that involves getting a forward-compatible structure and everything ready to add PV as an optional protocol.

If things go as planned, then adding PVUSB support should just be a matter of:
* Adding a handler for PVUSB in libxl_usb.c:do_usb_add()
* Adding a command-line option to specify PVUSB even for HVM guests

I should have a rough draft ready for you to try to hack within 24 hours.

-George

#3 lore raw
Quoted 3 lines · jacek burghardt

Opensuse kernel source has patches for kernel that include pvusb pvscsi

Great! But ATM libxl doesn't know how to enable that; so someone's only option is either to use xend (or to connect stuff manually, as Stefan's script does).

-George

author
#4 lore raw
Quoted 8 lines · George Dunlap
Quoted 3 lines · jacek burghardt

Opensuse kernel source has patches for kernel that include pvusb pvscsi

Great! But ATM libxl doesn't know how to enable that; so someone's only option is either to use xend (or to connect stuff manually, as Stefan's script does).

-George

Indeed, as long as pvusb modules are available on both Dom0 and DomU...
The script George mentioned was written before PVUSB was implemented in XM. I found it linked here:
http://wiki.xen.org/wiki/Xen_USB_Passthrough

#5 lore raw

Does xcp supports assignment of USB or xen-api ? I know that spice allows for USB redirection. Also remote desktop supports redirection of devices. I like using android devices with xen hosted servers as remote desktop exports my SD cards to server.

Quoted 12 lines · Stefan
Quoted 10 lines · George Dunlap
Quoted 4 lines · jacek burghardt

Opensuse kernel source has patches for kernel that include pvusb pvscsi

Great! But ATM libxl doesn't know how to enable that; so someone's only option is either to use xend (or to connect stuff manually, as Stefan's script does).

Quoted 7 lines
Quoted 2 lines

-George

Indeed, as long as pvusb modules are available on both Dom0 and DomU... The script George mentioned was written before PVUSB was implemented in XM. I found it linked here:
http://wiki.xen.org/wiki/Xen_**USB_Passthrough<http://wiki.xen.org/wiki/Xen_USB_Passthrough>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel