[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] More work on ia64 multiple domains
ChangeSet 1.1305.1.2, 2005/03/14 15:54:43-07:00, djm@xxxxxxxxxxxxxxx More work on ia64 multiple domains arch/ia64/domain.c | 2 - arch/ia64/patch/linux-2.6.7/system.h | 5 --- arch/ia64/process.c | 9 +++-- arch/ia64/regionreg.c | 53 ++++++++++++++++++++--------------- arch/ia64/xenmisc.c | 21 ++++++++----- arch/ia64/xensetup.c | 2 - drivers/char/console.c | 1 include/asm-ia64/config.h | 5 +-- 8 files changed, 56 insertions(+), 42 deletions(-) diff -Nru a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c --- a/xen/arch/ia64/domain.c 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/domain.c 2005-03-25 19:03:04 -05:00 @@ -102,7 +102,7 @@ { /* Just some sanity to ensure that the scheduler is set up okay. */ ASSERT(current->domain == IDLE_DOMAIN_ID); - domain_unpause_by_systemcontroller(current); + domain_unpause_by_systemcontroller(current->domain); __enter_scheduler(); /* diff -Nru a/xen/arch/ia64/patch/linux-2.6.7/system.h b/xen/arch/ia64/patch/linux-2.6.7/system.h --- a/xen/arch/ia64/patch/linux-2.6.7/system.h 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/patch/linux-2.6.7/system.h 2005-03-25 19:03:04 -05:00 @@ -1,5 +1,5 @@ ---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/include/asm-ia64/system.h 2005-01-23 13:23:36.000000000 -0700 -+++ /home/djm/src/xen/xeno-ia64.bk/xen/include/asm-ia64/system.h 2004-09-17 18:27:22.000000000 -0600 +--- ../../linux-2.6.7/include/asm-ia64/system.h 2005-01-31 11:15:23.000000000 -0700 ++++ include/asm-ia64/system.h 2005-03-14 11:31:12.000000000 -0700 @@ -24,8 +24,16 @@ * 0xa000000000000000+2*PERCPU_PAGE_SIZE * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) @@ -35,9 +35,9 @@ #else # define switch_to(prev,next,last) __switch_to(prev, next, last) #endif -+#ifdef XEN -+#undef switch_to -+#endif ++//#ifdef XEN ++//#undef switch_to ++//#endif /* * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch, diff -Nru a/xen/arch/ia64/process.c b/xen/arch/ia64/process.c --- a/xen/arch/ia64/process.c 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/process.c 2005-03-25 19:03:04 -05:00 @@ -148,8 +148,8 @@ vector &= ~0xf; if (vector != IA64_DATA_TLB_VECTOR && vector != IA64_DATA_TLB_VECTOR) { -panic_domain(regs,"psr.ic off, delivering fault=%lx,iip=%p,isr=%p,PSCB.iip=%p\n", - vector,regs->cr_iip,isr,PSCB(ed,iip)); +panic_domain(regs,"psr.ic off, delivering fault=%lx,iip=%p,ifa=%p,isr=%p,PSCB.iip=%p\n", + vector,regs->cr_iip,ifa,isr,PSCB(ed,iip)); } //printf("Delivering NESTED DATA TLB fault\n"); @@ -284,6 +284,9 @@ else { // should never happen. If it does, region 0 addr may // indicate a bad xen pointer + printk("*** xen_handle_domain_access: exception table" + " lookup failed, iip=%p, addr=%p, spinning...\n", + iip,address); panic_domain(regs,"*** xen_handle_domain_access: exception table" " lookup failed, iip=%p, addr=%p, spinning...\n", iip,address); @@ -816,7 +819,7 @@ unsigned long itir = vcpu_get_itir_on_fault(ed,ifa); if (!(psr & IA64_PSR_CPL)) { - panic_domain(regs,"ia64_handle_reflection: reflecting with priv=0!!\n"); + printk("ia64_handle_reflection: reflecting with priv=0!!\n"); } // FIXME: no need to pass itir in to this routine as we need to // compute the virtual itir anyway (based on domain's RR.ps) diff -Nru a/xen/arch/ia64/regionreg.c b/xen/arch/ia64/regionreg.c --- a/xen/arch/ia64/regionreg.c 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/regionreg.c 2005-03-25 19:03:04 -05:00 @@ -262,7 +262,12 @@ newrrv.rrval = 0; newrid = ed->domain->starting_rid + rrv.rid; - if (newrid > ed->domain->ending_rid) return 0; + if (newrid > ed->domain->ending_rid) { + printk("can't set rr%d to %lx, starting_rid=%lx," + "ending_rid=%lx, val=%lx\n", rreg, newrid, + ed->domain->starting_rid,ed->domain->ending_rid,val); + return 0; + } memrrv.rrval = rrv.rrval; if (rreg == 7) { @@ -335,21 +340,21 @@ /* XEN/ia64 INTERNAL ROUTINES */ -unsigned long physicalize_rid(struct exec_domain *ed, unsigned long rid) +unsigned long physicalize_rid(struct exec_domain *ed, unsigned long rrval) { ia64_rr rrv; - rrv.rrval = rid; + rrv.rrval = rrval; rrv.rid += ed->domain->starting_rid; return rrv.rrval; } unsigned long -virtualize_rid(struct exec_domain *ed, unsigned long rid) +virtualize_rid(struct exec_domain *ed, unsigned long rrval) { ia64_rr rrv; - rrv.rrval = rid; + rrv.rrval = rrval; rrv.rid -= ed->domain->starting_rid; return rrv.rrval; } @@ -365,6 +370,7 @@ { unsigned long rr0, rr1,rr2, rr3, rr4, rr5, rr6, rr7; // TODO: These probably should be validated + unsigned long bad = 0; if (ed->vcpu_info->arch.metaphysical_mode) { ia64_rr rrv; @@ -383,25 +389,28 @@ set_rr_no_srlz(0x8000000000000000L, rr4); set_rr_no_srlz(0xa000000000000000L, rr5); set_rr_no_srlz(0xc000000000000000L, rr6); + // skip rr7 when in metaphysical mode } else { - rr0 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[0]); - rr1 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[1]); - rr2 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[2]); - rr3 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[3]); - rr4 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[4]); - rr5 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[5]); - rr6 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[6]); - set_one_rr(0x0000000000000000L, rr0); - set_one_rr(0x2000000000000000L, rr1); - set_one_rr(0x4000000000000000L, rr2); - set_one_rr(0x6000000000000000L, rr3); - set_one_rr(0x8000000000000000L, rr4); - set_one_rr(0xa000000000000000L, rr5); - set_one_rr(0xc000000000000000L, rr6); - ia64_srlz_d(); + rr0 = ed->vcpu_info->arch.rrs[0]; + rr1 = ed->vcpu_info->arch.rrs[1]; + rr2 = ed->vcpu_info->arch.rrs[2]; + rr3 = ed->vcpu_info->arch.rrs[3]; + rr4 = ed->vcpu_info->arch.rrs[4]; + rr5 = ed->vcpu_info->arch.rrs[5]; + rr6 = ed->vcpu_info->arch.rrs[6]; + rr7 = ed->vcpu_info->arch.rrs[7]; + if (!set_one_rr(0x0000000000000000L, rr0)) bad |= 1; + if (!set_one_rr(0x2000000000000000L, rr1)) bad |= 2; + if (!set_one_rr(0x4000000000000000L, rr2)) bad |= 4; + if (!set_one_rr(0x6000000000000000L, rr3)) bad |= 8; + if (!set_one_rr(0x8000000000000000L, rr4)) bad |= 0x10; + if (!set_one_rr(0xa000000000000000L, rr5)) bad |= 0x20; + if (!set_one_rr(0xc000000000000000L, rr6)) bad |= 0x40; + if (!set_one_rr(0xe000000000000000L, rr7)) bad |= 0x80; } - rr7 = physicalize_rid(ed, ed->vcpu_info->arch.rrs[7]); - set_one_rr(0xe000000000000000L, rr7); ia64_srlz_d(); + if (bad) { + panic_domain(0,"load_region_regs: can't set! bad=%lx\n",bad); + } } diff -Nru a/xen/arch/ia64/xenmisc.c b/xen/arch/ia64/xenmisc.c --- a/xen/arch/ia64/xenmisc.c 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/xenmisc.c 2005-03-25 19:03:04 -05:00 @@ -246,12 +246,12 @@ // context_switch void context_switch(struct exec_domain *prev, struct exec_domain *next) { -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); -printk("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); -if (prev->domain->id == 1 && next->domain->id == 0) cs10foo(); -if (prev->domain->id == 0 && next->domain->id == 1) cs01foo(); +//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); +//printk("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); +//if (prev->domain->id == 1 && next->domain->id == 0) cs10foo(); +//if (prev->domain->id == 0 && next->domain->id == 1) cs01foo(); switch_to(prev,next,prev); clear_bit(EDF_RUNNING, &prev->ed_flags); //if (!is_idle_task(next->domain) ) @@ -265,11 +265,16 @@ char buf[128]; struct exec_domain *ed = current; static volatile int test = 1; // so can continue easily in debug + extern spinlock_t console_lock; + unsigned long flags; - printf("$$$$$ PANIC in domain %d:",ed->domain->id); + printf("$$$$$ PANIC in domain %d (k6=%p): ", + ed->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); - while(test); + domain_pause_by_systemcontroller(current->domain); + //while(test); } diff -Nru a/xen/arch/ia64/xensetup.c b/xen/arch/ia64/xensetup.c --- a/xen/arch/ia64/xensetup.c 2005-03-25 19:03:04 -05:00 +++ b/xen/arch/ia64/xensetup.c 2005-03-25 19:03:04 -05:00 @@ -389,7 +389,7 @@ console_endboot(cmdline && strstr(cmdline, "tty0")); #endif - domain_unpause_by_systemcontroller(current); + domain_unpause_by_systemcontroller(current->domain); #ifdef CLONE_DOMAIN0 { int i; diff -Nru a/xen/drivers/char/console.c b/xen/drivers/char/console.c --- a/xen/drivers/char/console.c 2005-03-25 19:03:04 -05:00 +++ b/xen/drivers/char/console.c 2005-03-25 19:03:04 -05:00 @@ -644,3 +644,4 @@ * indent-tabs-mode: nil * End: */ + diff -Nru a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h --- a/xen/include/asm-ia64/config.h 2005-03-25 19:03:04 -05:00 +++ b/xen/include/asm-ia64/config.h 2005-03-25 19:03:04 -05:00 @@ -1,7 +1,6 @@ // control flags for turning on/off features under test -//#undef CLONE_DOMAIN0 -#define CLONE_DOMAIN0 1 -//#undef CLONE_DOMAIN0 +#undef CLONE_DOMAIN0 +//#define CLONE_DOMAIN0 3 #define USER_ACCESS // manufactured from component pieces ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |