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 a domain to specify DOMID_SELF to DOM0_GETDOMAININ

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Allow a domain to specify DOMID_SELF to DOM0_GETDOMAININFO dom0_op.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Dec 2005 21:04:06 +0000
Delivery-date: Sun, 18 Dec 2005 21:06:37 +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 381cafbbc3d24b1d6dd9e2fb56aa6d501e6aaac8
# Parent  101ae33a83415a6bf133df61f9ff280fa24e7c2d
Allow a domain to specify DOMID_SELF to DOM0_GETDOMAININFO dom0_op.
This is primarily useful to allow a privileged domain to determine
its domid, where the preferred method of quering xenstore cannot be
used.

Signed-off-by: joseph.cihula@xxxxxxxxx

diff -r 101ae33a8341 -r 381cafbbc3d2 xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c     Sat Dec 17 01:11:54 2005
+++ b/xen/common/dom0_ops.c     Sun Dec 18 19:27:42 2005
@@ -358,12 +358,17 @@
     case DOM0_GETDOMAININFO:
     { 
         struct domain *d;
+        domid_t dom;
+
+        dom = op->u.getdomaininfo.domain;
+        if ( dom == DOMID_SELF )
+            dom = current->domain->domain_id;
 
         read_lock(&domlist_lock);
 
         for_each_domain ( d )
         {
-            if ( d->domain_id >= op->u.getdomaininfo.domain )
+            if ( d->domain_id >= dom )
                 break;
         }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Allow a domain to specify DOMID_SELF to DOM0_GETDOMAININFO dom0_op., Xen patchbot -unstable <=