[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169229510 0
# Node ID d4ed1deee42dab3c2b5da78892cb086a064dbd88
# Parent  0bf0672528cff1dbe666971b99201e3ba89fc286
Allow XS_INTRODUCE to be used for rebinding the xenstore evtchn.
Signed-off-by: Andrei Petrov <andrei.petrov@xxxxxxxxxxxxx>
---
 tools/xenstore/xenstored_domain.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff -r 0bf0672528cf -r d4ed1deee42d tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Fri Jan 19 17:55:29 2007 +0000
+++ b/tools/xenstore/xenstored_domain.c Fri Jan 19 17:58:30 2007 +0000
@@ -343,13 +343,14 @@ void do_introduce(struct connection *con
                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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.