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] [xen-4.0-testing] Move IDLE_DOMAIN_ID defn to public hea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Dec 2010 02:00:44 -0800
Delivery-date: Fri, 10 Dec 2010 02:02:58 -0800
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir@xxxxxxx>
# Date 1291889941 0
# Node ID 1501a7887a3b9c2738d13af0f2067387f6783a3d
# Parent  dc4b845d600aecb47e04f96da63bb237fe2719d9
Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix 
clash.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   22472:5ac189556629
xen-unstable ldate:        Thu Dec 09 10:09:59 2010 +0000
---
 xen/arch/ia64/xen/domain.c   |    2 +-
 xen/arch/ia64/xen/xensetup.c |    2 +-
 xen/arch/x86/debug.c         |    4 ++--
 xen/arch/x86/setup.c         |    2 +-
 xen/include/public/xen.h     |    7 +++++--
 xen/include/xen/sched.h      |    3 +--
 xen/xsm/flask/hooks.c        |    2 +-
 7 files changed, 12 insertions(+), 10 deletions(-)

diff -r dc4b845d600a -r 1501a7887a3b xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/arch/ia64/xen/domain.c        Thu Dec 09 10:19:01 2010 +0000
@@ -372,7 +372,7 @@ void startup_cpu_idle_loop(void)
 void startup_cpu_idle_loop(void)
 {
        /* Just some sanity to ensure that the scheduler is set up okay. */
-       ASSERT(current->domain->domain_id == IDLE_DOMAIN_ID);
+       ASSERT(is_idle_vcpu(current));
        raise_softirq(SCHEDULE_SOFTIRQ);
 
        continue_cpu_idle_loop();
diff -r dc4b845d600a -r 1501a7887a3b xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/arch/ia64/xen/xensetup.c      Thu Dec 09 10:19:01 2010 +0000
@@ -567,7 +567,7 @@ skip_move:
 
     scheduler_init();
     idle_vcpu[0] = (struct vcpu*) ia64_r13;
-    idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0);
+    idle_domain = domain_create(DOMID_IDLE, 0, 0);
     if ( idle_domain == NULL )
         BUG();
     idle_domain->vcpu = idle_vcpu;
diff -r dc4b845d600a -r 1501a7887a3b xen/arch/x86/debug.c
--- a/xen/arch/x86/debug.c      Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/arch/x86/debug.c      Thu Dec 09 10:19:01 2010 +0000
@@ -230,7 +230,7 @@ dbg_rw_guest_mem(dbgva_t addr, dbgbyte_t
 }
 
 /* 
- * addr is hypervisor addr if domid == IDLE_DOMAIN_ID, else it's guest addr
+ * addr is hypervisor addr if domid == DOMID_IDLE, else it's guest addr
  * buf is debugger buffer.
  * if toaddr, then addr = buf (write to addr), else buf = addr (rd from guest)
  * pgd3: value of init_mm.pgd[3] in guest. see above.
@@ -241,7 +241,7 @@ dbg_rw_mem(dbgva_t addr, dbgbyte_t *buf,
            uint64_t pgd3)
 {
     struct domain *dp = get_domain_by_id(domid);
-    int hyp = (domid == IDLE_DOMAIN_ID);
+    int hyp = (domid == DOMID_IDLE);
 
     DBGP2("gmem:addr:%lx buf:%p len:$%d domid:%x toaddr:%x dp:%p\n", 
           addr, buf, len, domid, toaddr, dp);
diff -r dc4b845d600a -r 1501a7887a3b xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/arch/x86/setup.c      Thu Dec 09 10:19:01 2010 +0000
@@ -245,7 +245,7 @@ static void __init init_idle_domain(void
     /* Domain creation requires that scheduler structures are initialised. */
     scheduler_init();
 
-    idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0);
+    idle_domain = domain_create(DOMID_IDLE, 0, 0);
     if ( idle_domain == NULL )
         BUG();
     idle_domain->vcpu = idle_vcpu;
diff -r dc4b845d600a -r 1501a7887a3b xen/include/public/xen.h
--- a/xen/include/public/xen.h  Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/include/public/xen.h  Thu Dec 09 10:19:01 2010 +0000
@@ -370,8 +370,11 @@ typedef uint16_t domid_t;
  * DOMID_COW is used as the owner of sharable pages */
 #define DOMID_COW  (0x7FF3U)
 
-/* DOMID_INVALID is used to identity invalid domid */
-#define DOMID_INVALID (0x7FFFU)
+/* DOMID_INVALID is used to identify pages with unknown owner. */
+#define DOMID_INVALID (0x7FF4U)
+
+/* Idle domain. */
+#define DOMID_IDLE (0x7FFFU)
 
 /*
  * Send an array of these to HYPERVISOR_mmu_update().
diff -r dc4b845d600a -r 1501a7887a3b xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/include/xen/sched.h   Thu Dec 09 10:19:01 2010 +0000
@@ -326,8 +326,7 @@ struct domain_setup_info
 };
 
 extern struct vcpu *idle_vcpu[NR_CPUS];
-#define IDLE_DOMAIN_ID   (0x7FFFU)
-#define is_idle_domain(d) ((d)->domain_id == IDLE_DOMAIN_ID)
+#define is_idle_domain(d) ((d)->domain_id == DOMID_IDLE)
 #define is_idle_vcpu(v)   (is_idle_domain((v)->domain))
 
 #define DOMAIN_DESTROYED (1<<31) /* assumes atomic_t is >= 32 bits */
diff -r dc4b845d600a -r 1501a7887a3b xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Thu Dec 09 10:16:34 2010 +0000
+++ b/xen/xsm/flask/hooks.c     Thu Dec 09 10:19:01 2010 +0000
@@ -74,7 +74,7 @@ static int flask_domain_alloc_security(s
 
     dsec->d = d;
 
-    if ( d->domain_id == IDLE_DOMAIN_ID )
+    if ( is_idle_domain(d) )
     {
         dsec->sid = SECINITSID_XEN;
         dsec->create_sid = SECINITSID_DOM0;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash., Xen patchbot-4.0-testing <=