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);