From: Olaf Hering <olaf@aepfle.de>
To: Keir Fraser <keir.xen@gmail.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Jan Beulich <JBeulich@novell.com>
Subject: Re: [PATCH 2/6] xen/hvm kexec: unregister shutdown+sysrq watches during reboot
Date: Thu, 28 Jul 2011 21:50:29 +0200 [thread overview]
Message-ID: <20110728195029.GA18283@aepfle.de> (raw)
In-Reply-To: <CA572D06.1EB2F%keir.xen@gmail.com>
On Thu, Jul 28, Keir Fraser wrote:
> On 28/07/2011 15:07, "Olaf Hering" <olaf@aepfle.de> wrote:
>
> > On Thu, Jul 28, Ian Campbell wrote:
> >
> >>> Are you suggesting that there have to be ways for a domU to query the
> >>> state of its registered watches and shut them all down during very early
> >>> boot?
> >>
> >> Perhaps the xenstore protocol could be enhanced with a mechanism to
> >> clear all existing watches? A kernel could call that at start of day.
> >
> > I poked around in the xenstore sources, there is appearently nothing
> > that can be used to shutdown all. Or would calling XS_RELEASE do the trick?
>
> XS_INTRODUCE
Unfortunately do_introduce() is not preprared for that.
On enter, conn->id contains the domain_id, so it errors out early.
Later it compares domain->conn != conn and does not enter the correct path.
If I remove both checks the kexec appears to work ok.
Is it save to remove both checks?
The only issue I havent figured out:
How to get the domid from within the kernel?
Olaf
diff -r 42edf1481c57 tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -326,7 +326,7 @@ void do_introduce(struct connection *con
return;
}
- if (conn->id != 0 || !conn->can_write) {
+ if (!conn->can_write) {
send_error(conn, EACCES);
return;
}
@@ -365,7 +365,7 @@ void do_introduce(struct connection *con
talloc_steal(domain->conn, domain);
fire_watches(NULL, "@introduceDomain", false);
- } else if ((domain->mfn == mfn) && (domain->conn != conn)) {
+ } else if (domain->mfn == mfn) {
/* Use XS_INTRODUCE for recreating the xenbus event-channel. */
if (domain->port)
xc_evtchn_unbind(xce_handle, domain->port);
next prev parent reply other threads:[~2011-07-28 19:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 23:13 [PATCH 2/6] xen/hvm kexec: unregister shutdown+sysrq watches during reboot Jan Beulich
2011-07-28 5:25 ` Olaf Hering
2011-07-28 10:52 ` Ian Campbell
2011-07-28 11:00 ` Keir Fraser
2011-07-28 12:52 ` Ian Campbell
2011-07-28 11:02 ` Olaf Hering
2011-07-28 12:56 ` Ian Campbell
2011-07-28 14:07 ` Olaf Hering
2011-07-28 14:13 ` Keir Fraser
2011-07-28 19:50 ` Olaf Hering [this message]
2011-07-28 20:30 ` Keir Fraser
2011-08-01 13:01 ` Olaf Hering
2011-08-01 14:35 ` Keir Fraser
2011-07-28 16:09 ` Jan Beulich
2011-07-28 11:37 ` Stefano Stabellini
-- strict thread matches above, loose matches on Subject: below --
2011-07-26 11:52 [PATCH 0/6] misc changes for kexec in pv-on-hvm guests Olaf Hering
2011-07-26 11:52 ` [PATCH 2/6] xen/hvm kexec: unregister shutdown+sysrq watches during reboot Olaf Hering
2011-07-26 14:17 ` Konrad Rzeszutek Wilk
2011-07-26 14:28 ` Olaf Hering
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=20110728195029.GA18283@aepfle.de \
--to=olaf@aepfle.de \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@novell.com \
--cc=keir.xen@gmail.com \
--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.