From: NAHieu <nahieu@gmail.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: back/frontend drivers HelloWorld
Date: Mon, 26 Sep 2005 01:24:02 +0900 [thread overview]
Message-ID: <5d7aca95050925092427b30189@mail.gmail.com> (raw)
In-Reply-To: <1d35e5803140b27e1535e7c1c146d5c4@cl.cam.ac.uk>
On 9/25/05, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> 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
next prev parent reply other threads:[~2005-09-25 16:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-22 13:46 back/frontend drivers HelloWorld Anton Korenyushkin
2005-09-22 14:18 ` Keir Fraser
2005-09-23 9:53 ` NAHieu
2005-09-23 10:00 ` Keir Fraser
2005-09-23 11:37 ` NAHieu
2005-09-23 11:54 ` Keir Fraser
2005-09-23 12:37 ` NAHieu
2005-09-23 13:40 ` Keir Fraser
2005-09-24 17:40 ` NAHieu
2005-09-24 19:31 ` Keir Fraser
2005-09-25 16:24 ` NAHieu [this message]
2005-09-25 18:56 ` Keir Fraser
2005-09-26 1:38 ` NAHieu
2005-09-26 7:19 ` Keir Fraser
2005-09-22 16:04 ` Mark Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d7aca95050925092427b30189@mail.gmail.com \
--to=nahieu@gmail.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.