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] back/frontend drivers HelloWorld

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] back/frontend drivers HelloWorld
From: NAHieu <nahieu@xxxxxxxxx>
Date: Sun, 25 Sep 2005 18:38:51 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 26 Sep 2005 01:36:31 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mw2g11p+5V3pIOyDKBTKzm1fPpCb7fEonB4zcZMKVdRRBpYKc69kY/GVNc6xJfcu/oCAXNLZ2kexeb93Xfd07qbzvfDVEA86a0dQbvtPdY9vB6Cholko5jmVpWLfibhi/4UX0O0E5WXv7c16GPrgSjx/XWR/+vaxDsdIOoIyTck=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <dfdb6eb4c09cf3dab069335441690858@xxxxxxxxxxxx>
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: <200509221746.32758.tiger@xxxxxxxxxxxxxx> <fca75d25983158236837abcbeb5c6af7@xxxxxxxxxxxx> <5d7aca9505092302532b4e88eb@xxxxxxxxxxxxxx> <766473d1a313531c949034405df37ec5@xxxxxxxxxxxx> <5d7aca9505092410405b07022@xxxxxxxxxxxxxx> <1d35e5803140b27e1535e7c1c146d5c4@xxxxxxxxxxxx> <5d7aca95050925092427b30189@xxxxxxxxxxxxxx> <dfdb6eb4c09cf3dab069335441690858@xxxxxxxxxxxx>
Reply-to: NAHieu <nahieu@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 9/25/05, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
>
> On 25 Sep 2005, at 17:24, NAHieu wrote:
>
> > - Is that correct? ( I have some doubts about (2), as I see that the
> > drivers available in xen uses xenbus_driver.probe to detect domU's
> > driver?)
>
> All correct, but you skip a few details.
>
> In step 1, domU gets the event channel port via EVTCHNOP_alloc_unbound.
> It then writes that port value to xenstore.
>
> In step 2, dom0 binds to the remote event-channel port via
> EVTCHNOP_bind_interdomain. This returns the allocated local port which
> is what is passed to bind_evtchn_to_irqhandler().
> See code in drivers/xen/blkback/interface.c for a precise example of
> doing this -- probably best to steal that portion of code as a
> template.
>
> Also, you can find code in blkfront/blkback to allocate a shared page
> in blkfront, allocate a grant reference for it, pass that to blkback
> and map the page thru the grant reference.
>

I looked at some frontend code, and they all exploit the xenbus_driver
(and the needed common fields are .ids, .probe and .remove ). So it is
mandatory for all backend/frontend (regardless of real or virtual
device) to do like that ?

Keir, thank you a lot.
Hieu

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