ia64/xen-unstable

changeset 13537:d4ed1deee42d

Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn.
Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
author kfraser@localhost.localdomain
date Fri Jan 19 17:58:30 2007 +0000 (2007-01-19)
parents 0bf0672528cf
children 701afa77106a
files tools/xenstore/xenstored_domain.c
line diff
     1.1 --- a/tools/xenstore/xenstored_domain.c	Fri Jan 19 17:55:29 2007 +0000
     1.2 +++ b/tools/xenstore/xenstored_domain.c	Fri Jan 19 17:58:30 2007 +0000
     1.3 @@ -343,13 +343,14 @@ void do_introduce(struct connection *con
     1.4  		fire_watches(conn, "@introduceDomain", false);
     1.5  	}
     1.6  	else {
     1.7 -		/* Check that the given details match the ones we have
     1.8 -		   previously recorded. */
     1.9 -		if (port != domain->remote_port ||
    1.10 -		    mfn != domain->mfn) {
    1.11 -			send_error(conn, EINVAL);
    1.12 -			return;
    1.13 -		}
    1.14 +		int rc;
    1.15 +
    1.16 +		/* Use XS_INTRODUCE for recreating the xenbus event-channel. */
    1.17 +		if (domain->port)
    1.18 +			xc_evtchn_unbind(xce_handle, domain->port);
    1.19 +		rc = xc_evtchn_bind_interdomain(xce_handle, domid, port);
    1.20 +		domain->port = (rc == -1) ? 0 : rc;
    1.21 +		domain->remote_port = port;
    1.22  	}
    1.23  
    1.24  	send_ack(conn, XS_INTRODUCE);