WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] USB virtualisation (experimental)

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] USB virtualisation (experimental)
From: Mark Williamson <Mark.Williamson@xxxxxxxxxxxx>
Date: Mon, 10 Jan 2005 17:03:43 +0000
Delivery-date: Mon, 10 Jan 2005 17:12:28 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.7.1
Hi all,

A number of people have expressed interest in the USB virtualisation code.  
I'm making a patch against 2.0-testing available for those who wish to have a 
play with it.

Description:
USB virtualisation allows otherwise unprivileged domains to be given control 
of a USB port on the host.  The unprivileged domain sees a virtual USB host 
controller with only the ports it has been granted access to.  For instance, 
you might dedicate a USB webcam to one domain, a USB pendrive to another 
domain and a USB CD-burner to another.

This patch includes the kernel modifications (backend and frontend drivers) to 
2.4.28 and modifications to the userspace toolset.  This is sufficient to set 
up USB virtualisation for 2.4.28 on xen-2.0-testing.

There are still a few sticky bugs that are really annoying me at the moment 
but it is possible to mount USB flash drives, capture realtime video from a 
webcam, etc. in a domU by virtualising through dom0.

Disclaimers:
* Don't use it on production systems
* Don't trust it with data you care about
* Some USB device drivers may need tweaking - if you have problems with a 
device, let me know
* YMMV but it works for me ;-)

Installation:
1) download the patch from
http://www.cambridge.intel-research.net/~mwilli2/xen-2.0-testing-usb.patch
2) apply to a fresh xen-2.0-testing.bk using
patch -p1 < xen-2.0-testing-usb.patch
(say yes to all the SCCS checkouts)
3) set up some appropriate kernel configs in 
install/boot/config-2.4.28-xen{0,U}.  You should enable 
CONFIG_XEN_USB_FRONTEND, CONFIG_USB in the configuration for any devices you 
want to run.
Don't (!) build drivers for devices you want to virtualise into dom0's kernel, 
or dom0 will grab the device before the backend gets a chance to export it.
4) build & install the updated kernel & tools on your test machine.  Note 
again you _have_ to use the 2.4 kernels, 2.6 isn't supported (yet).
5) for frontend domains, add a
usb = [ 'port_number', 'port_number', ... ]
to the config file to give a domain control of those physical USB ports.  You 
can specify ports on a hub by giving the path through the device tree e.g. 
'1/2' = second port on the hub plugged into the first port on the host.

Any questions, comments, problems, success reports - let us know!

Cheers,
Mark


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel