[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] More descriptive 'flags' and 'id' field names for exec_domain/domain
ChangeSet 1.1433, 2005/05/12 14:58:47+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx More descriptive 'flags' and 'id' field names for exec_domain/domain structures seems a good idea after all. At the same time, I've renamed the flag macros to be a bit neater and more descriptive, and more in keeping with the style of such definitions in asm/mm.h, for example. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> arch/ia64/domain.c | 18 ++--- arch/ia64/idle0_task.c | 4 - arch/ia64/patch/linux-2.6.7/init_task.h | 2 arch/ia64/process.c | 2 arch/ia64/xenmisc.c | 18 ++--- arch/ia64/xensetup.c | 2 arch/x86/audit.c | 58 +++++++++--------- arch/x86/dom0_ops.c | 2 arch/x86/domain.c | 20 +++--- arch/x86/domain_build.c | 6 - arch/x86/i387.c | 6 - arch/x86/idle0_task.c | 4 - arch/x86/mm.c | 28 ++++---- arch/x86/physdev.c | 2 arch/x86/setup.c | 2 arch/x86/shadow.c | 21 +++--- arch/x86/smpboot.c | 2 arch/x86/traps.c | 16 ++--- arch/x86/vmx.c | 8 +- arch/x86/vmx_vmcs.c | 2 common/dom0_ops.c | 30 ++++----- common/dom_mem_ops.c | 6 - common/domain.c | 38 ++++++------ common/event_channel.c | 14 ++-- common/grant_table.c | 30 +++++---- common/keyhandler.c | 8 +- common/page_alloc.c | 8 +- common/sched_bvt.c | 21 +++--- common/sched_sedf.c | 84 +++++++++++++------------- common/schedule.c | 44 ++++++------- drivers/char/console.c | 2 include/asm-x86/config.h | 4 - include/asm-x86/debugger.h | 4 - include/asm-x86/i387.h | 6 - include/asm-x86/shadow.h | 15 ++-- include/xen/event.h | 6 - include/xen/sched.h | 101 ++++++++++++++++++++++---------- 37 files changed, 343 insertions(+), 301 deletions(-) diff -Nru a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c --- a/xen/arch/ia64/domain.c 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/ia64/domain.c 2005-05-12 10:04:21 -04:00 @@ -626,7 +626,7 @@ #ifndef CLONE_DOMAIN0 if ( d != dom0 ) BUG(); - if ( test_bit(DF_CONSTRUCTED, &d->flags) ) + if ( test_bit(_DOMF_constructed, &d->domain_flags) ) BUG(); #endif @@ -753,7 +753,7 @@ #endif console_endboot(strstr(cmdline, "tty0") != NULL); - set_bit(DF_CONSTRUCTED, &d->flags); + set_bit(_DOMF_constructed, &d->domain_flags); new_thread(ed, pkern_entry, 0, 0); // FIXME: Hack for keyboard input @@ -783,10 +783,10 @@ unsigned long pkern_entry; #ifndef DOMU_AUTO_RESTART - if ( test_bit(DF_CONSTRUCTED, &d->flags) ) BUG(); + if ( test_bit(_DOMF_constructed, &d->domain_flags) ) BUG(); #endif - printk("*** LOADING DOMAIN %d ***\n",d->id); + printk("*** LOADING DOMAIN %d ***\n",d->domain_id); d->max_pages = dom0_size/PAGE_SIZE; // FIXME: use dom0 size // FIXME: use domain0 command line @@ -796,13 +796,13 @@ d->arch.mm = xmalloc(struct mm_struct); if (unlikely(!d->arch.mm)) { - printk("Can't allocate mm_struct for domain %d\n",d->id); + printk("Can't allocate mm_struct for domain %d\n",d->domain_id); return -ENOMEM; } memset(d->arch.mm, 0, sizeof(*d->arch.mm)); d->arch.mm->pgd = pgd_alloc(d->arch.mm); if (unlikely(!d->arch.mm->pgd)) { - printk("Can't allocate pgd for domain %d\n",d->id); + printk("Can't allocate pgd for domain %d\n",d->domain_id); return -ENOMEM; } @@ -816,7 +816,7 @@ loaddomainelfimage(d,image_start); printk("loaddomainelfimage returns\n"); - set_bit(DF_CONSTRUCTED, &d->flags); + set_bit(_DOMF_constructed, &d->domain_flags); printk("calling new_thread, entry=%p\n",pkern_entry); #ifdef DOMU_AUTO_RESTART @@ -836,7 +836,7 @@ { /* re-copy the OS image to reset data values to original */ printk("reconstruct_domU: restarting domain %d...\n", - ed->domain->id); + ed->domain->domain_id); loaddomainelfimage(ed->domain,ed->domain->arch.image_start); new_thread(ed, ed->domain->arch.entry, 0, 0); } @@ -859,7 +859,7 @@ else next++; if (construct_domU(d, (unsigned long)domU_staging_area, size,0,0,0)) { printf("launch_domainU: couldn't construct(id=%d,%lx,%lx)\n", - d->id,domU_staging_area,size); + d->domain_id,domU_staging_area,size); return 2; } domain_unpause_by_systemcontroller(d); diff -Nru a/xen/arch/ia64/idle0_task.c b/xen/arch/ia64/idle0_task.c --- a/xen/arch/ia64/idle0_task.c 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/ia64/idle0_task.c 2005-05-12 10:04:21 -04:00 @@ -21,8 +21,8 @@ #define IDLE0_DOMAIN(_t) \ { \ - id: IDLE_DOMAIN_ID, \ - flags: 1<<DF_IDLETASK, \ + domain_id: IDLE_DOMAIN_ID, \ + domain_flags:DOMF_idle_domain, \ refcnt: ATOMIC_INIT(1) \ } diff -Nru a/xen/arch/ia64/patch/linux-2.6.7/init_task.h b/xen/arch/ia64/patch/linux-2.6.7/init_task.h --- a/xen/arch/ia64/patch/linux-2.6.7/init_task.h 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/ia64/patch/linux-2.6.7/init_task.h 2005-05-12 10:04:21 -04:00 @@ -35,8 +35,8 @@ +#define INIT_TASK(tsk) \ +{ \ + /*processor: 0,*/ \ -+ /*id: IDLE_DOMAIN_ID,*/ \ -+ /*flags: 1<<DF_IDLETASK,*/ \ ++ /*domain_id: IDLE_DOMAIN_ID,*/ \ ++ /*domain_flags: DOMF_idle_domain,*/ \ + refcnt: ATOMIC_INIT(1) \ +} +#else diff -Nru a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c --- a/xen/arch/ia64/process.c 2005-05-12 10:04:22 -04:00 +++ b/xen/arch/ia64/process.c 2005-05-12 10:04:22 -04:00 @@ -214,7 +214,7 @@ if (vcpu_deliverable_interrupts(ed)) { unsigned long isr = regs->cr_ipsr & IA64_PSR_RI; if (vcpu_timer_pending_early(ed)) -printf("*#*#*#* about to deliver early timer to domain %d!!!\n",ed->domain->id); +printf("*#*#*#* about to deliver early timer to domain %d!!!\n",ed->domain->domain_id); reflect_interruption(0,isr,0,regs,IA64_EXTINT_VECTOR); } } diff -Nru a/xen/arch/ia64/xenmisc.c b/xen/arch/ia64/xenmisc.c --- a/xen/arch/ia64/xenmisc.c 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/ia64/xenmisc.c 2005-05-12 10:04:21 -04:00 @@ -234,21 +234,21 @@ { //printk("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); //printk("@@@@@@ context switch from domain %d (%x) to domain %d (%x)\n", -//prev->domain->id,(long)prev&0xffffff,next->domain->id,(long)next&0xffffff); -//if (prev->domain->id == 1 && next->domain->id == 0) cs10foo(); -//if (prev->domain->id == 0 && next->domain->id == 1) cs01foo(); -//printk("@@sw %d->%d\n",prev->domain->id,next->domain->id); +//prev->domain->domain_id,(long)prev&0xffffff,next->domain->domain_id,(long)next&0xffffff); +//if (prev->domain->domain_id == 1 && next->domain->domain_id == 0) cs10foo(); +//if (prev->domain->domain_id == 0 && next->domain->domain_id == 1) cs01foo(); +//printk("@@sw %d->%d\n",prev->domain->domain_id,next->domain->domain_id); switch_to(prev,next,prev); // leave this debug for now: it acts as a heartbeat when more than // one domain is active { static long cnt[16] = { 50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50}; static int i = 100; -int id = ((struct exec_domain *)current)->domain->id & 0xf; +int id = ((struct exec_domain *)current)->domain->domain_id & 0xf; if (!cnt[id]--) { printk("%x",id); cnt[id] = 50; } if (!i--) { printk("+",id); cnt[id] = 100; } } - clear_bit(EDF_RUNNING, &prev->flags); + clear_bit(_VCPUF_running, &prev->vcpu_flags); //if (!is_idle_task(next->domain) ) //send_guest_virq(next, VIRQ_TIMER); load_region_regs(current); @@ -271,15 +271,15 @@ loop: printf("$$$$$ PANIC in domain %d (k6=%p): ", - ed->domain->id, ia64_get_kr(IA64_KR_CURRENT)); + ed->domain->domain_id, ia64_get_kr(IA64_KR_CURRENT)); va_start(args, fmt); (void)vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); printf(buf); if (regs) show_registers(regs); domain_pause_by_systemcontroller(current->domain); - set_bit(DF_CRASHED, ed->domain->flags); - if (ed->domain->id == 0) { + set_bit(_DOMF_crashed, ed->domain->domain_flags); + if (ed->domain->domain_id == 0) { int i = 1000000000L; // if domain0 crashes, just periodically print out panic // message to make post-mortem easier diff -Nru a/xen/arch/ia64/xensetup.c b/xen/arch/ia64/xensetup.c --- a/xen/arch/ia64/xensetup.c 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/ia64/xensetup.c 2005-05-12 10:04:21 -04:00 @@ -262,7 +262,7 @@ if ( dom0 == NULL ) panic("Error creating domain 0\n"); - set_bit(DF_PRIVILEGED, &dom0->flags); + set_bit(_DOMF_privileged, &dom0->domain_flags); /* * We're going to setup domain0 using the module(s) that we stashed safely diff -Nru a/xen/arch/x86/audit.c b/xen/arch/x86/audit.c --- a/xen/arch/x86/audit.c 2005-05-12 10:04:21 -04:00 +++ b/xen/arch/x86/audit.c 2005-05-12 10:04:21 -04:00 @@ -74,7 +74,7 @@ { APRINTK("Audit %d: type count went below zero " "mfn=%lx t=%x ot=%x", - d->id, page_to_pfn(page), + d->domain_id, page_to_pfn(page), page->u.inuse.type_info, page->tlbflush_timestamp); errors++; @@ -83,7 +83,7 @@ { APRINTK("Audit %d: type count overflowed " "mfn=%lx t=%x ot=%x", - d->id, page_to_pfn(page), + d->domain_id, page_to_pfn(page), page->u.inuse.type_info, page->tlbflush_timestamp); errors++; @@ -102,7 +102,7 @@ { APRINTK("Audit %d: general count went below zero " "mfn=%lx t=%x ot=%x", - d->id, page_to_pfn(page), + d->domain_id, page_to_pfn(page), page->u.inuse.type_info, page->tlbflush_timestamp); errors++; @@ -111,7 +111,7 @@ { APRINTK("Audit %d: general count overflowed " "mfn=%lx t=%x ot=%x", - d->id, page_to_pfn(page), + d->domain_id, page_to_pfn(page), page->u.inuse.type_info, page->tlbflush_timestamp); errors++; @@ -142,7 +142,7 @@ "belonging to a domain %p (id=%d)\n", l1mfn, page_get_owner(l1page), - page_get_owner(l1page)->id); + page_get_owner(l1page)->domain_id); errors++; continue; } @@ -153,7 +153,7 @@ { printk("Audit %d: [Shadow L2 mfn=%lx i=%x] " "Expected Shadow L1 t=%x mfn=%lx\n", - d->id, mfn, i, + d->domain_id, mfn, i, l1page->u.inuse.type_info, l1mfn); errors++; } @@ -167,7 +167,7 @@ l1mfn, page_get_owner(l1page), (page_get_owner(l1page) - ? page_get_owner(l1page)->id + ? page_get_owner(l1page)->domain_id : -1)); errors++; continue; @@ -179,14 +179,14 @@ { printk("Audit %d: [%x] Found %s Linear PT " "t=%x mfn=%lx\n", - d->id, i, (l1mfn==mfn) ? "Self" : "Other", _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |