mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn.
Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
This commit is contained in:
1 parent
bbb6a715dc
commit
61aaed0d58
1 file changed
+8
-7
@@ -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);
|
||||
|
||||