From: kfraser@localhost.localdomain Date: Fri, 19 Jan 2007 17:58:30 +0000 (+0000) Subject: Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15371^2~125^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=61aaed0d584e88a6e0e832e11e76336e1d42a6bf;p=xen.git Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn. Signed-off-by: Andrei Petrov --- 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);