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

Re: [Xen-devel] run real drivers in differnt domains

To: "Ian Campbell" <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] run real drivers in differnt domains
From: "Phani Babu Giddi" <phanig@xxxxxxxxx>
Date: Thu, 13 Dec 2007 07:08:08 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 13 Dec 2007 07:08:41 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=X1VoXr5E/L2rEMjet9HdzSVdohUK6mpf5zjBMJyKKvQ=; b=txzYs0e8/qjO+pQkGmTvTvxLEEU60XgIxvbfXl+mTBfMrhmFQTPGPOUaZJPW1ZJaSuFjeqZRR6Rj67MDIAdOIc+Ri/xnpCtqpu+s/6PNj7SEUCa5I8atVD6xXWiR4xLxYsdbQwtnZp8bwziJIuD2lcXQ0BND/BJptHx0Bix5Ogk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=bauheHg9voUJV9eQz3jM5gQnAycQbg6K9eht8mLftDRyK3AiUaeGC/brhLKN9EZPa3bkCuNQ3zfAl4DfYM8zEr98VuIGCupen2F0W4DfTr8FJNTkGaEMGaWC60Vr1+D5RMsGWA5mFXugJd6+eOyTgpUCeOJN19os6JphxB4JVrE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1197539028.16562.149.camel@xxxxxxxxxxxxxxxxxxxxx>
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: <b61da340712122039v37f9aecak2b2682938552d131@xxxxxxxxxxxxxx> <1197539028.16562.149.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ian,
 
Looks like this pass-through will work for devices on the PCI bus. But what about devices that are not on the PCI bus. I was going through one of the threads which talks about differences between xen 1.2 and 2.0 drivers. Where it mentions it possible to have such drivers. Is this possible with Xen 3.0 also ?
 
Regards,
Phani

Re: Xen 1.2 vs 2.0 device drivers

Subject: Re: Xen 1.2 vs 2.0 device drivers
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
>Hi, looking at the 2004-xen-ols-pdf papers's xen 2.0 Architecture fig 
>vs. the 1.2 fig, what is the
>differences between the 

device drivers? It seems like the drivers for 
>1.2 is ported to function in the
>paravirtual environment, but what is the deal with the 2.0 Front-end 
>and Vanilla device drivers?
>
>Fig 2.0 also has three red arrows, one from the 2.4 kernel to the HW 
>layer and two from the 

domain 0. What does
>this mean in contrast to fig. 1.2 ?

In 1.2, the "real" device drivers were part of Xen. Device drivers in 
guest OSes were 'virtual' device drivers that actually just talked to 
Xen to get anything done. 

In 2.0, the "real" device drivers run in one or more privileged guest 
OSes. Xen only deals with the timer (APIC) 

hardware, the low-level 
parts of interrupt dispatch, and some parts of the device probing 
functionality. Essentially linux device drivers (or BSD ones for that
matter) can run unmodified in a guest OS which, among other things, gives
us a lot more device support. 

Many devices (especially network and disk) are shared between guest OSes
but there is only ever one "real" device driver. To make this sharing 
work, a privileged guest also includes a "back-end" driver for every real
hardware device. All unprivileged guests wishing to share the device 
include a "front-end" driver. Both of these "drivers" are actually virtual; 
they do not directly talk to the hardware. Instead they are connected 
together using a device channel -- essentially a general means of communication
between different 

virtual machines
. 

So if e.g. an unprivileged dom1 wants to share a real e1000 network card, 
the setup might be: 

     dom1 front-end driver -> dom0 back-end driver -> dom0 e1000 driver. 

The last driver is a "vanilla" linux device driver meaning that it's 


source code is identical to that in the regular linux kernel. The front-end
and back-end drivers are new. 

The lines in the figure connecting domains together represent the 
device channels that allow domains to talk to one another. 

The lines in the figure going from a domain 'through' xen represent the
way in which a suitably privileged domain can be given direct access to
[a subset of] the real hardware. 


You may find the our "Reconstructing I/O" paper gives a clearer description
of all of this. 


cheers,

S.




On Dec 13, 2007 1:43 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:

On Wed, 2007-12-12 at 20:39 -0800, Phani Babu Giddi wrote:
> Hello All,
>
> I want to run 'real device drivers' I mean native drivers (ofcourse
> recompiled for xen) as part of the two guests (Linux OS). These
> drivers will be accessing seperate devices and will not be shared by
> guests. Do you think this configuration is possible ? I am referring
> to a system with just PV and no HVM.

Sounds like you need the PV PCI pass-through functionality
(pcifront/pciback). This will allow you to assign a PCI device to a domU
instead of dom0.

http://www.wlug.org.nz/XenPciPassthrough looks like a reasonable doc,
you should also search the list archives.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>