aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_domain.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-19 17:58:30 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-19 17:58:30 +0000
commit61aaed0d584e88a6e0e832e11e76336e1d42a6bf (patch)
tree0b1025472776e00951204c17f84e3f5f493f556b /tools/xenstore/xenstored_domain.c
parentbbb6a715dc15f4fd9c320998384e60e032b4250f (diff)
downloadxen-61aaed0d584e88a6e0e832e11e76336e1d42a6bf.tar.gz
xen-61aaed0d584e88a6e0e832e11e76336e1d42a6bf.tar.bz2
xen-61aaed0d584e88a6e0e832e11e76336e1d42a6bf.zip
Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn.
Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstored_domain.c')
-rw-r--r--tools/xenstore/xenstored_domain.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index 115a1f75da..68f0816230 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -343,13 +343,14 @@ void do_introduce(struct connection *conn, struct buffered_data *in)
fire_watches(conn, "@introduceDomain", false);
}
else {
- /* Check that the given details match the ones we have
- previously recorded. */
- if (port != domain->remote_port ||
- mfn != domain->mfn) {
- send_error(conn, EINVAL);
- return;
- }
+ int rc;
+
+ /* Use XS_INTRODUCE for recreating the xenbus event-channel. */
+ if (domain->port)
+ xc_evtchn_unbind(xce_handle, domain->port);
+ rc = xc_evtchn_bind_interdomain(xce_handle, domid, port);
+ domain->port = (rc == -1) ? 0 : rc;
+ domain->remote_port = port;
}
send_ack(conn, XS_INTRODUCE);