All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: xen-devel@lists.xensource.com, linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] Re: Error recovery in Xen's paravirtualizing USB driver for Linux
Date: Wed, 07 Dec 2005 23:25:06 +0000	[thread overview]
Message-ID: <1133997906.5004.63.camel@localhost> (raw)
In-Reply-To: <20051207150029.48d3a125.zaitcev@redhat.com>

On Wed, 2005-12-07 at 15:00 -0800, Pete Zaitcev wrote:
> On Wed, 07 Dec 2005 18:31:17 +0000, harry <harry@hebutterworth.freeserve.co.uk> 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@hebutterworth.freeserve.co.uk>

      reply	other threads:[~2005-12-07 23:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07 18:31 Error recovery in Xen's paravirtualizing USB driver for Linux harry
2005-12-07 19:35 ` Alan Stern
2005-12-07 22:15   ` [linux-usb-devel] " Harry Butterworth
2005-12-08 15:20     ` Alan Stern
2005-12-08 15:59       ` [linux-usb-devel] " Harry Butterworth
2005-12-08 16:20         ` Alan Stern
2005-12-08 17:41           ` [linux-usb-devel] " Harry Butterworth
2005-12-08 18:53             ` Alan Stern
2005-12-08 22:24               ` [linux-usb-devel] " Harry Butterworth
2005-12-09  0:44           ` Greg KH
2005-12-09 11:03             ` [linux-usb-devel] " Harry Butterworth
2005-12-09 16:11             ` Alan Stern
2005-12-09 18:50               ` Harry Butterworth
2005-12-09 19:02                 ` Alan Stern
2005-12-10  4:10               ` Greg KH
2005-12-07 23:00 ` Pete Zaitcev
2005-12-07 23:25   ` Harry Butterworth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1133997906.5004.63.camel@localhost \
    --to=harry@hebutterworth.freeserve.co.uk \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=xen-devel@lists.xensource.com \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.