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] Re: [Qemu-devel] [PATCH 1/7] xen: groundwork for xen sup

To: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH 1/7] xen: groundwork for xen support
From: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Date: Tue, 29 Jul 2008 16:32:39 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Daniel P. Berrange" <berrange@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
Delivery-date: Tue, 29 Jul 2008 07:52:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <488F1BDB.90702@xxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1217251078-6591-1-git-send-email-kraxel@xxxxxxxxxx> <1217251078-6591-2-git-send-email-kraxel@xxxxxxxxxx> <488DD206.8040404@xxxxxxxxxxxxx> <488DDD2C.10308@xxxxxxxxxx> <20080729081034.GG32498@xxxxxxxxxx> <488F1BDB.90702@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (X11/20080501)
Anthony Liguori wrote:
> Daniel P. Berrange wrote:
>> This is something I originally added to QEMU in Xen's tree. The basic
>> idea is that the 'xenpv' macjine is a machine which /only/ provides the
>> paravirtualized Xen backends drivers. The 'xenfv' machine type is just
>> the same as the 'pc' machine type, but with the /addition/ of the Xen
>> paravirtualized backends. Perhaps the latter could be thought of as
>> more of a 'xenpc' (cf 'pc' and 'isapc') becasue its a variation on the
>> regular PC machine type. Annoying that all the acronyms I come up with
>> only differ by one letter :-)
> 
> Why wouldn't the Xen backends be added by appropriate -net or -drive
> options?  For instance, qemu -drive file=foo.img,if=xen -net nic,model=xen

They can and I plan to support exactly that syntax ;)


Lets us step back a bit.  xenbus handles all the device discovery.
xenstore holds (among other things) all the information xenbus needs to
discover devices.

The xen frontend devices (guest side of the split drivers) have the
configuration information in this xenstore path:

  /local/domain/$domid/device/$type/$nr/

The xen backend devices (host side of the split drivers) have the
configuration information in this path:

  /local/domain/$domid/backend/$type/$domid/$nr/

where the first domid is where the backend runs in (which is Domain-0
unless you are using driver domains).  The second domid is the guest
domain.  The $type doesn't need to be identical, so you can have
different backend drivers serving the same frontend driver.  Which
actually is the case for block devices (blkback & blktap).


The frontend and backend drivers usually scan their xenstore directories
on initialization and install xenstore watches to see devices come and go.

What needs to be done to create a xenbus device is create those two
directories (one frontend, one backend) and populate the nodes therein
with the information required (some generic, some device specific).


All the backend drivers in my patch series are using xenstore/xenbus for
device discovery as usual.  The last patch (#7) actually winds up
command line support: you can specify xen nics and disks then with the
syntax listed above, and qemu will go and create the xenstore
directories for backend and frontend.  It could also be someone else
creating them (xend, xenner), that will work equally well.

cheers,
  Gerd

-- 
http://kraxel.fedorapeople.org/xenner/

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

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