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] Re: [linux-usb-devel] Re: Error recovery in Xen's paravirtua

To: Pete Zaitcev <zaitcev@xxxxxxxxxx>
Subject: [Xen-devel] Re: [linux-usb-devel] Re: Error recovery in Xen's paravirtualizing USB driver for Linux
From: Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Dec 2005 23:25:06 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 Dec 2005 23:21:26 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051207150029.48d3a125.zaitcev@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1133980277.14981.65.camel@xxxxxxxxxxxxxxxxxxxxx> <20051207150029.48d3a125.zaitcev@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2005-12-07 at 15:00 -0800, Pete Zaitcev wrote:
> On Wed, 07 Dec 2005 18:31:17 +0000, harry 
> <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> >     This 'USB split driver' has a 'front-end' in the Linux kernel
> > running in a guest domain of the hypervisor and a 'back-end' in the
> > Linux kernel running in a device driver domain (usually the special
> > privilidged domain 0).
> 
> Why don't you just let guest 0 to own the controller? This is what
> the guest 0 is for, as far as I know.

Guest 0 normally owns the controller.  Xen also has a concept of driver
domains where you give a PCI device to a privileged guest other than 0
and run the driver in that guest.  This is useful for driver development
amongst other things.


> 
> If you create special stub drivers in the hypervisor, you might as
> well create virtual USB controllers for nonzero guests.

The stub drivers are not in the hypervisor but are for the Linux kernels
run in the hypervisor virtual machines (domains).
Yes, the front-end driver in the non-zero guest creates a virtual USB
controller.

> 
> > o - The back-end uses usb_register to register itself as a driver
> > matching all USB IDs so it gets probed for every USB device that is
> > connected.  When a USB device is probed for a configured port, the
> > driver claims all the interfaces for the device.
> 
> Ewww! Ewww!

What should I be doing?

> 
> You are just going to hit all the difficulties the vmware guy hit,

What were they?

> perhaps minus the size limitation in usbfs since you are bypassing it.
> 
> I would expect that the scheme you're proposing were employed to
> let non-zero guests to drive some virtualized devices, but not for
> the guest zero.

Yes, it's for letting non-zero guest domains run USB drivers for devices
attached to ports on USB controllers which are driven by domain 0.

So, for example you can have one physical USB port, plug in a four port
USB HUB and then map one port on the HUB to each of four guest domains.
Any device plugged into the port mapped to a given guest domain will
appear attached to a port on the virtual USB controller in the guest
domain.

USB devices in domain zero are just driven by the normal USB driver
code.  My split driver is not involved.  Sorry for not being clear.

Harry.

-- 
Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel