From: Linda <lindaj@jma3.com>
To: Ian Campbell <ian.campbell@citrix.com>, Wei Liu <wei.liu2@citrix.com>
Cc: julien.grall@citrix.com, xen-devel@lists.xenproject.org,
lars.kurth.xen@gmail.com
Subject: Re: grant tables and driver handshaking
Date: Thu, 11 Jun 2015 11:11:37 -0600 [thread overview]
Message-ID: <5579C149.5080401@jma3.com> (raw)
In-Reply-To: <1434040684.30003.179.camel@citrix.com>
On 6/11/2015 10:38 AM, Ian Campbell wrote:
> On Thu, 2015-06-11 at 17:24 +0100, Wei Liu wrote:
>>> Since the backend is in DOM0, and is around longer than the DOMUs, this
>>> happens first. It's that interaction that I'd like a little more text on.
>>> If it exists.
>> I'm not completely sure what you're referring to. That probably only
>> exists in code. The interaction between backend and frontend is very
>> driver specific.
> Most front and backend pairs follow a similar pattern though, and it is
> best not to reinvent the wheel completely, even if some of the details
> differ.
>
> In general everything is driven from a pair of "state" nodes in
> xenstore, one in the frontend dir and one in the backend dir.
>
> These contain the enum xenbus_state from xen/include/public/io/xenbus.h
> (as %d formatted integers). In general both front and backend start in
> state 1 (XenbusStateInitialising) and each has a watch on the other end.
> Things generally start with the backend moving to state 2
> (XenbusStateInitWait) and from there they progress n lockstep through
> the stages until they both reach state 4 (XenbusStateConnected), then
> you are up and running.
>
> On teardown one end goes to 5 (XenbusStateClosing) and the other
> follows.
Thanks, Ian. This helped a lot.
And thanks for the links, below.
Linda
> In Linux the place to look is the various "otherend_changed" hooks in
> the front and back drivers, usually the backend half is in a xenbus.c
> file (e.g. netback and blkback).
>
> blkif.h has a description of the states in that case.
> http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,io,blkif.h.html
>
> I'm not aware of any particular docs on the general case, or at least I
> can't find the ones I thought we had.
>
> Ian
>
>
prev parent reply other threads:[~2015-06-11 17:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 17:02 [PATCH v7] libxl: provide libxl_bitmap_{or,and} Linda Jacobson
2015-04-16 14:34 ` Ian Campbell
2015-04-16 14:40 ` Linda
2015-04-16 14:45 ` Wei Liu
2015-04-16 16:49 ` Linda
2015-04-22 14:21 ` Ian Campbell
2015-06-03 15:24 ` clarification of xen Wiki article Linda
2015-06-04 9:58 ` Ian Campbell
2015-06-04 10:35 ` Wei Liu
2015-06-04 11:31 ` Wei Liu
2015-06-04 11:35 ` Ian Campbell
2015-06-04 11:46 ` Wei Liu
2015-06-04 11:15 ` Linda
2015-06-11 1:45 ` grant tables and driver handshaking Linda
2015-06-11 10:43 ` Wei Liu
2015-06-11 12:32 ` Linda
2015-06-11 16:24 ` Wei Liu
2015-06-11 16:38 ` Ian Campbell
2015-06-11 17:11 ` Linda [this message]
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=5579C149.5080401@jma3.com \
--to=lindaj@jma3.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=lars.kurth.xen@gmail.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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.