[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: Mon, 26 Sep 2005 01:24:02 +0900
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sun, 25 Sep 2005 16:21:45 +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=LA2EFlAP12UMDTRKUNdf7kcV9qmP3uWI468wkk7HPxhy+bRu16rvo/WebD3Ielrfl4vLkNEIZmi1TLr7/b4U20AUVqdsE/iyyZmQM9xRbfKiYTmmvQ8CeBe7QOXu7SknSIlyHbj7UllQ6+IbCoXfRqzG9WbbnDHSU3ibH6E5+nA=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 9/25/05, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
>
> On 24 Sep 2005, at 18:40, NAHieu wrote:
>
> > Could you tell me which code in Xen uses the above 1->4 setup
> > procedure? I searched for some examples, but couldnt find any.
>
> There are several examples in the kernel: grep for uses of
> 'alloc_unbound' in every frontend driver and 'bind_interdomain' in
> every backend driver. Unfortunately I think we currently have no
> example of doing this from user space, but the principles are the same!

I am writing a small "virtual" device driver for Xen (virtual means
not "real" device). After looking at those code, I think the steps we
must do to exchange data between dom0 and domU - using backend and
frontend method:

1. domU get the event channel, and write to  xenstore

2. dom0 watches the xenstore (xs_watch) for the event channel of domU,
to detect when domU writes channel value to xenstore. dom0 then bind
to domU's channel (using  bind_evtchn_to_irqhandler())

3. whenever dom0 and domU want to exchange data, they update the
corresponding share-ring/grant-table and then inform the other using
notify_via_evtchn()


- 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?)


- Another question: I found it is difficult to understand
xenbus_driver/xenbus_device architecture. They must be rooted from
Linux architecture? Any good documentation to understand those things,
in order to understand xenbus_device?

Many thanks,
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®.