[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash.
# HG changeset patch # User Keir Fraser <keir@xxxxxxx> # Date 1291889399 0 # Node ID 5ac189556629e2db96196b2556d870f7cefc959f # Parent c9abf5fc5c528d6f40a767fd52114efbd94eaa22 Move IDLE_DOMAIN_ID defn to public header, and change DOMID_INVALID to fix clash. Signed-off-by: Keir Fraser <keir@xxxxxxx> --- xen/arch/ia64/xen/domain.c | 2 +- xen/arch/x86/debug.c | 4 ++-- xen/common/schedule.c | 2 +- xen/include/public/xen.h | 7 +++++-- xen/include/xen/sched.h | 3 +-- xen/xsm/flask/hooks.c | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff -r c9abf5fc5c52 -r 5ac189556629 xen/arch/ia64/xen/domain.c --- a/xen/arch/ia64/xen/domain.c Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/arch/ia64/xen/domain.c Thu Dec 09 10:09:59 2010 +0000 @@ -373,7 +373,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 c9abf5fc5c52 -r 5ac189556629 xen/arch/x86/debug.c --- a/xen/arch/x86/debug.c Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/arch/x86/debug.c Thu Dec 09 10:09:59 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 c9abf5fc5c52 -r 5ac189556629 xen/common/schedule.c --- a/xen/common/schedule.c Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/common/schedule.c Thu Dec 09 10:09:59 2010 +0000 @@ -1276,7 +1276,7 @@ void __init scheduler_init(void) if ( SCHED_OP(&ops, init) ) panic("scheduler returned error on init\n"); - idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0); + idle_domain = domain_create(DOMID_IDLE, 0, 0); BUG_ON(idle_domain == NULL); idle_domain->vcpu = idle_vcpu; idle_domain->max_vcpus = NR_CPUS; diff -r c9abf5fc5c52 -r 5ac189556629 xen/include/public/xen.h --- a/xen/include/public/xen.h Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/include/public/xen.h Thu Dec 09 10:09:59 2010 +0000 @@ -380,8 +380,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 c9abf5fc5c52 -r 5ac189556629 xen/include/xen/sched.h --- a/xen/include/xen/sched.h Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/include/xen/sched.h Thu Dec 09 10:09:59 2010 +0000 @@ -362,8 +362,7 @@ extern rcu_read_lock_t domlist_read_lock extern rcu_read_lock_t domlist_read_lock; 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 c9abf5fc5c52 -r 5ac189556629 xen/xsm/flask/hooks.c --- a/xen/xsm/flask/hooks.c Thu Dec 09 09:57:08 2010 +0000 +++ b/xen/xsm/flask/hooks.c Thu Dec 09 10:09:59 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |