[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Merge http://djm@xxxxxxxxxxxxxxxxxxx//home/djm/xeno-unstable-ia64.bk
ChangeSet 1.1277.1.2, 2005/04/11 15:04:58-06:00, djm@djmnc4000.(none) Merge http://djm@xxxxxxxxxxxxxxxxxxx//home/djm/xeno-unstable-ia64.bk into djmnc4000.(none):/home/djm/src/xen/test2611.bk arch/ia64/domain.c | 31 ++++++++++++++++++++++++++++--- arch/ia64/xenmisc.c | 9 ++++++++- include/asm-ia64/config.h | 3 ++- 3 files changed, 38 insertions(+), 5 deletions(-) diff -Nru a/xen/arch/ia64/domain.c b/xen/arch/ia64/domain.c --- a/xen/arch/ia64/domain.c 2005-04-20 05:03:06 -04:00 +++ b/xen/arch/ia64/domain.c 2005-04-20 05:03:06 -04:00 @@ -258,8 +258,8 @@ sw->ar_pfs = 0; sw->ar_bspstore = new_rbs; //regs->r13 = (unsigned long) ed; -printf("new_thread: ed=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n", -ed,regs,sw,new_rbs,IA64_STK_OFFSET,®s->r8); +printf("new_thread: ed=%p, start_pc=%p, regs=%p, sw=%p, new_rbs=%p, IA64_STK_OFFSET=%p, &r8=%p\n", +ed,start_pc,regs,sw,new_rbs,IA64_STK_OFFSET,®s->r8); sw->b0 = (unsigned long) &ia64_ret_from_clone; ed->thread.ksp = (unsigned long) sw - 16; //ed->thread_info->flags = 0; @@ -437,6 +437,7 @@ int h, filesz, memsz, paddr; unsigned long elfaddr, dom_mpaddr, dom_imva; struct page *p; + unsigned long pteval; copy_memory(&ehdr,image_start,sizeof(Elf_Ehdr)); for ( h = 0; h < ehdr.e_phnum; h++ ) { @@ -465,9 +466,15 @@ else #endif while (memsz > 0) { +#ifdef DOMU_AUTO_RESTART + pteval = lookup_domain_mpa(d,dom_mpaddr); + if (pteval) dom_imva = __va(pteval & _PFN_MASK); + else { printf("loaddomainelfimage: BAD!\n"); while(1); } +#else p = map_new_domain_page(d,dom_mpaddr); if (unlikely(!p)) BUG(); dom_imva = __va(page_to_phys(p)); +#endif if (filesz > 0) { if (filesz >= PAGE_SIZE) copy_memory(dom_imva,elfaddr,PAGE_SIZE); @@ -783,7 +790,9 @@ struct exec_domain *ed = d->exec_domain[0]; unsigned long pkern_entry; +#ifndef DOMU_AUTO_RESTART if ( test_bit(DF_CONSTRUCTED, &d->d_flags) ) BUG(); +#endif printk("*** LOADING DOMAIN %d ***\n",d->id); @@ -817,13 +826,29 @@ set_bit(DF_CONSTRUCTED, &d->d_flags); - printk("calling new_thread\n"); + printk("calling new_thread, entry=%p\n",pkern_entry); +#ifdef DOMU_AUTO_RESTART + ed->domain->arch.image_start = image_start; + ed->domain->arch.image_len = image_len; + ed->domain->arch.entry = pkern_entry; +#endif new_thread(ed, pkern_entry, 0, 0); printk("new_thread returns\n"); __set_bit(0x30,ed->vcpu_info->arch.delivery_mask); return 0; } + +#ifdef DOMU_AUTO_RESTART +void reconstruct_domU(struct exec_domain *ed) +{ + /* re-copy the OS image to reset data values to original */ + printk("reconstruct_domU: restarting domain %d...\n", + ed->domain->id); + loaddomainelfimage(ed->domain,ed->domain->arch.image_start); + new_thread(ed, ed->domain->arch.entry, 0, 0); +} +#endif // FIXME: When dom0 can construct domains, this goes away (or is rewritten) int launch_domainU(unsigned long size) diff -Nru a/xen/arch/ia64/xenmisc.c b/xen/arch/ia64/xenmisc.c --- a/xen/arch/ia64/xenmisc.c 2005-04-20 05:03:06 -04:00 +++ b/xen/arch/ia64/xenmisc.c 2005-04-20 05:03:06 -04:00 @@ -287,6 +287,7 @@ extern spinlock_t console_lock; unsigned long flags; +loop: printf("$$$$$ PANIC in domain %d (k6=%p): ", ed->domain->id, ia64_get_kr(IA64_KR_CURRENT)); va_start(args, fmt); @@ -296,5 +297,11 @@ if (regs) show_registers(regs); domain_pause_by_systemcontroller(current->domain); set_bit(DF_CRASHED, ed->domain->d_flags); - //while(test); + if (ed->domain->id == 0) { + int i = 1000000000L; + // if domain0 crashes, just periodically print out panic + // message to make post-mortem easier + while(i--); + goto loop; + } } diff -Nru a/xen/include/asm-ia64/config.h b/xen/include/asm-ia64/config.h --- a/xen/include/asm-ia64/config.h 2005-04-20 05:03:06 -04:00 +++ b/xen/include/asm-ia64/config.h 2005-04-20 05:03:06 -04:00 @@ -1,8 +1,9 @@ // control flags for turning on/off features under test #undef CLONE_DOMAIN0 -//#define CLONE_DOMAIN0 5 +//#define CLONE_DOMAIN0 1 #define DOMU_BUILD_STAGING #define VHPT_GLOBAL +#define DOMU_AUTO_RESTART // manufactured from component pieces _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |