[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] back/frontend drivers HelloWorld


  • To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.