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] USB virt port to 2.6 status

I've been working on porting the USB virtualisation code to the 2.6
kernel for a while now.  It took some time to get up to speed with Xen,
Linux 2.6, USB and the existing 2.4 USB virtualisation code but I'm
starting to make progress.

Up until last week I was trying to get the 2.4 code to compile for 2.6
and was eventually successful but in the process discovered just how
much the USB stack and the Linux device model had changed between 2.4
and 2.6---the code resulting from the forward porting effort was not
pretty and simply fixing the compile errors was not sufficient to
integrate into the new linux device model.  I didn't bother testing this
effort as it was obviously not going to work.

This week I started on a rewrite of the usb front end driver based on
the 2.6 infrastructure and have gone with the following approach:

I created a new bus device to represent a virtual bus where each USB
back-end will be represented as a device.

I created a new device for the above bus to represent a USB back-end.

I created a new driver to drive instances of the above devices. The
driver creates a new virtual USB host controller for each device
instance (i.e. one per back-end). The virtual USB host controller is
created using the USB hc_driver interface which is new to 2.6 and
eliminates redundancy in the host controller driver implementations.

This framework is all present in a single loadable module and currently
loads into 2.6, installs the bus and driver and a dummy device, the
driver gets matched to the device and successfully creates a virtual USB
host controller. All the objects appear in sysfs OK.

Next step is to create a test machine with a 2.4 dom0 and working USB
devices and construct the 2.6 front end within the new 2.6 framework by
porting forwards the remaining function from the 2.4 code.
After that I'll work on the 2.6 back end which I expect to be easier.

I'm expecting to have to make changes to this new code for the new
persistent store mechanism for discovery and hotplug. Specifically, I'm
expecting that the new bus device will probably be moved out of the usb
front end driver and made common between all xen virtualised devices and
that this bus will perform discovery using the persistent store.

Once I'm done with both the 2.6 back and front end code I'll look at
commoning up code between the 2.4 and 2.6 drivers.

Any comments on approach etc welcome.

Harry.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>