WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Allow interdomain channels to bind DOMID_SELF to DOMID_S

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Allow interdomain channels to bind DOMID_SELF to DOMID_SELF.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Oct 2005 12:08:18 +0000
Delivery-date: Wed, 19 Oct 2005 12:06:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID eea0e77b768350bd98038dd7260af2ce86b51c36
# Parent  76a413a8eef04505632ccd18cdf78001dfacc73b
Allow interdomain channels to bind DOMID_SELF to DOMID_SELF.
Signed-off-by: Steve King <steven.r.king@xxxxxxxxx>

diff -r 76a413a8eef0 -r eea0e77b7683 xen/common/event_channel.c
--- a/xen/common/event_channel.c        Tue Oct 18 09:53:30 2005
+++ b/xen/common/event_channel.c        Tue Oct 18 10:04:48 2005
@@ -89,7 +89,8 @@
     chn = evtchn_from_port(d, port);
 
     chn->state = ECS_UNBOUND;
-    chn->u.unbound.remote_domid = alloc->remote_dom;
+    if ( (chn->u.unbound.remote_domid = alloc->remote_dom) == DOMID_SELF )
+        chn->u.unbound.remote_domid = current->domain->domain_id;
 
     alloc->port = port;
 
@@ -107,9 +108,13 @@
     struct evtchn *lchn, *rchn;
     struct domain *ld = current->domain, *rd;
     int            lport, rport = bind->remote_port;
+    domid_t        rdom = bind->remote_dom;
     long           rc = 0;
 
-    if ( (rd = find_domain_by_id(bind->remote_dom)) == NULL )
+    if ( rdom == DOMID_SELF )
+        rdom = current->domain->domain_id;
+
+    if ( (rd = find_domain_by_id(rdom)) == NULL )
         return -ESRCH;
 
     /* Avoid deadlock by first acquiring lock of domain with smaller id. */
diff -r 76a413a8eef0 -r eea0e77b7683 xen/include/public/event_channel.h
--- a/xen/include/public/event_channel.h        Tue Oct 18 09:53:30 2005
+++ b/xen/include/public/event_channel.h        Tue Oct 18 10:04:48 2005
@@ -15,6 +15,7 @@
  * is allocated in <dom> and returned as <port>.
  * NOTES:
  *  1. If the caller is unprivileged then <dom> must be DOMID_SELF.
+ *  2. <rdom> may be DOMID_SELF, allowing loopback connections.
  */
 #define EVTCHNOP_alloc_unbound    6
 typedef struct evtchn_alloc_unbound {
@@ -30,6 +31,8 @@
  * a port that is unbound and marked as accepting bindings from the calling
  * domain. A fresh port is allocated in the calling domain and returned as
  * <local_port>.
+ * NOTES:
+ *  2. <remote_dom> may be DOMID_SELF, allowing loopback connections.
  */
 #define EVTCHNOP_bind_interdomain 0
 typedef struct evtchn_bind_interdomain {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Allow interdomain channels to bind DOMID_SELF to DOMID_SELF., Xen patchbot -unstable <=