]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.
authorKeir Fraser <keir@xen.org>
Thu, 9 Dec 2010 10:19:01 +0000 (10:19 +0000)
committerKeir Fraser <keir@xen.org>
Thu, 9 Dec 2010 10:19:01 +0000 (10:19 +0000)
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22472:5ac189556629
xen-unstable ldate:        Thu Dec 09 10:09:59 2010 +0000

xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/xensetup.c
xen/arch/x86/debug.c
xen/arch/x86/setup.c
xen/include/public/xen.h
xen/include/xen/sched.h
xen/xsm/flask/hooks.c

index 9efb79f07fa273dd2ef302e3be2cf5972cbc83ef..743dab7493a3c7a50be5a4c54df148d0a0590bf6 100644 (file)
@@ -372,7 +372,7 @@ static void continue_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();
index da8de417c26657e5d0fcdd37395300ffcdf591c6..84a92eab7a8b67e8b8ca481cad91e0e23df23eeb 100644 (file)
@@ -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;
index 98134b3b67ca92aed1475272727d64db11358ee8..bf5f157e107ce9e92f62af3a45e8032fe074a455 100644 (file)
@@ -230,7 +230,7 @@ dbg_rw_guest_mem(dbgva_t addr, dbgbyte_t *buf, int len, struct domain *dp,
 }
 
 /* 
- * 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, int len, domid_t domid, int toaddr,
            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);
index 33d6d7609410caa205b431761c632ba4f1d0f0b8..553a5f5d250e11d543452f185efc1677925e20fc 100644 (file)
@@ -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;
index 1a5e3e840c76e4082a1e5b5bccd262b35f87ad61..7106257a30f0cafccc0566c6cc984514772d8b01 100644 (file)
@@ -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().
index b04ba4ed5331b05740bdaba08f5242324a51319f..08ce46df810c57313633edfdf2b37ebca79695f7 100644 (file)
@@ -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 */
index 1b36a9e913f017ce477b21a6146e79e188935827..07c75b1c3f67f80ea68b1e0a95dc4dda0397ecfb 100644 (file)
@@ -74,7 +74,7 @@ static int flask_domain_alloc_security(struct domain *d)
 
     dsec->d = d;
 
-    if ( d->domain_id == IDLE_DOMAIN_ID )
+    if ( is_idle_domain(d) )
     {
         dsec->sid = SECINITSID_XEN;
         dsec->create_sid = SECINITSID_DOM0;