[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [IA64] remove CLONE_DOMAIN0 and DOMU_AUTO_RESTART for simplicity.



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 9c6cd777259b388a58c7f506c5f176707ddac43b
# Parent  535d29342e423070f5be31ddf28ac3ffd27068bf
[IA64] remove CLONE_DOMAIN0 and DOMU_AUTO_RESTART for simplicity.

These were used only for debugging in early stage and aren't used now.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 535d29342e42 -r 9c6cd777259b xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Feb  9 15:51:29 2006
+++ b/xen/arch/ia64/xen/domain.c        Thu Feb  9 19:59:50 2006
@@ -655,15 +655,9 @@
        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_maddr(p));
-#endif
                if (filesz > 0) {
                        if (filesz >= PAGE_SIZE)
                                copy_memory(dom_imva,elfaddr,PAGE_SIZE);
@@ -792,12 +786,10 @@
 
 //printf("construct_dom0: starting\n");
 
-#ifndef CLONE_DOMAIN0
        /* Sanity! */
        BUG_ON(d != dom0);
        BUG_ON(d->vcpu[0] == NULL);
        BUG_ON(test_bit(_VCPUF_initialised, &v->vcpu_flags));
-#endif
 
        memset(&dsi, 0, sizeof(struct domain_setup_info));
 
@@ -962,9 +954,6 @@
        sync_split_caches();
 
        // FIXME: Hack for keyboard input
-#ifdef CLONE_DOMAIN0
-if (d == dom0)
-#endif
        serial_input_init();
        if (d == dom0) {
                VCPU(v, delivery_mask[0]) = -1L;
@@ -977,65 +966,6 @@
        return 0;
 }
 
-// FIXME: When dom0 can construct domains, this goes away (or is rewritten)
-int construct_domU(struct domain *d,
-                  unsigned long image_start, unsigned long image_len,
-                  unsigned long initrd_start, unsigned long initrd_len,
-                  char *cmdline)
-{
-       int i, rc;
-       struct vcpu *v = d->vcpu[0];
-       unsigned long pkern_entry;
-
-#ifndef DOMU_AUTO_RESTART
-       BUG_ON(test_bit(_VCPUF_initialised, &v->vcpu_flags));
-#endif
-
-       printk("*** LOADING DOMAIN %d ***\n",d->domain_id);
-
-       d->max_pages = dom0_size/PAGE_SIZE;     // FIXME: use dom0 size
-       // FIXME: use domain0 command line
-       rc = parsedomainelfimage(image_start, image_len, &pkern_entry);
-       printk("parsedomainelfimage returns %d\n",rc);
-       if ( rc != 0 ) return rc;
-
-       /* Mask all upcalls... */
-       for ( i = 0; i < MAX_VIRT_CPUS; i++ )
-               d->shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
-
-       /* Copy the OS image. */
-       printk("calling loaddomainelfimage(%p,%p)\n",d,image_start);
-       loaddomainelfimage(d,image_start);
-       printk("loaddomainelfimage returns\n");
-
-       set_bit(_VCPUF_initialised, &v->vcpu_flags);
-
-       printk("calling new_thread, entry=%p\n",pkern_entry);
-#ifdef DOMU_AUTO_RESTART
-       v->domain->arch.image_start = image_start;
-       v->domain->arch.image_len = image_len;
-       v->domain->arch.entry = pkern_entry;
-#endif
-       new_thread(v, pkern_entry, 0, 0);
-       printk("new_thread returns\n");
-       sync_split_caches();
-       __set_bit(0x30, VCPU(v, delivery_mask));
-
-       return 0;
-}
-
-#ifdef DOMU_AUTO_RESTART
-void reconstruct_domU(struct vcpu *v)
-{
-       /* re-copy the OS image to reset data values to original */
-       printk("reconstruct_domU: restarting domain %d...\n",
-               v->domain->domain_id);
-       loaddomainelfimage(v->domain,v->domain->arch.image_start);
-       new_thread(v, v->domain->arch.entry, 0, 0);
-       sync_split_caches();
-}
-#endif
-
 void machine_restart(char * __unused)
 {
        if (platform_is_hp_ski()) dummy();
diff -r 535d29342e42 -r 9c6cd777259b xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Thu Feb  9 15:51:29 2006
+++ b/xen/arch/ia64/xen/hypercall.c     Thu Feb  9 19:59:50 2006
@@ -131,15 +131,8 @@
                        printf("(by dom0)\n ");
                        (*efi.reset_system)(EFI_RESET_WARM,0,0,NULL);
                }
-#ifdef DOMU_AUTO_RESTART
-               else {
-                       reconstruct_domU(current);
-                       return 0;  // don't increment ip!
-               }
-#else  
                printf("(not supported for non-0 domain)\n");
                regs->r8 = EFI_UNSUPPORTED;
-#endif
                break;
            case FW_HYPERCALL_EFI_GET_TIME:
                tv = vcpu_get_gr(v,32);
diff -r 535d29342e42 -r 9c6cd777259b xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Thu Feb  9 15:51:29 2006
+++ b/xen/arch/ia64/xen/xensetup.c      Thu Feb  9 19:59:50 2006
@@ -31,9 +31,6 @@
 
 cpumask_t cpu_present_map;
 
-#ifdef CLONE_DOMAIN0
-struct domain *clones[CLONE_DOMAIN0];
-#endif
 extern unsigned long domain0_ready;
 
 int find_max_pfn (unsigned long, unsigned long, void *);
@@ -342,16 +339,6 @@
 printk("About to call domain_create()\n");
     dom0 = domain_create(0, 0);
 
-#ifdef CLONE_DOMAIN0
-    {
-    int i;
-    for (i = 0; i < CLONE_DOMAIN0; i++) {
-       clones[i] = domain_create(i+1, 0);
-        if ( clones[i] == NULL )
-            panic("Error creating domain0 clone %d\n",i);
-    }
-    }
-#endif
     if ( dom0 == NULL )
         panic("Error creating domain 0\n");
 
@@ -376,22 +363,6 @@
     /* PIN domain0 on CPU 0.  */
     dom0->vcpu[0]->cpu_affinity = cpumask_of_cpu(0);
 
-#ifdef CLONE_DOMAIN0
-    {
-    int i;
-    dom0_memory_start = __va(ia64_boot_param->domain_start);
-    dom0_memory_size = ia64_boot_param->domain_size;
-
-    for (i = 0; i < CLONE_DOMAIN0; i++) {
-      printk("CONSTRUCTING DOMAIN0 CLONE #%d\n",i+1);
-      if ( construct_domU(clones[i], dom0_memory_start, dom0_memory_size,
-                         dom0_initrd_start,dom0_initrd_size,
-                         0) != 0)
-            panic("Could not set up DOM0 clone %d\n",i);
-    }
-    }
-#endif
-
     /* The stash space for the initial kernel image can now be freed up. */
     init_domheap_pages(ia64_boot_param->domain_start,
                        ia64_boot_param->domain_size);
@@ -412,13 +383,6 @@
     console_endboot(cmdline && strstr(cmdline, "tty0"));
 #endif
 
-#ifdef CLONE_DOMAIN0
-    {
-    int i;
-    for (i = 0; i < CLONE_DOMAIN0; i++)
-       domain_unpause_by_systemcontroller(clones[i]);
-    }
-#endif
     domain0_ready = 1;
 
     local_irq_enable();
diff -r 535d29342e42 -r 9c6cd777259b xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Thu Feb  9 15:51:29 2006
+++ b/xen/include/asm-ia64/config.h     Thu Feb  9 19:59:50 2006
@@ -3,11 +3,8 @@
 
 #undef USE_PAL_EMULATOR
 // control flags for turning on/off features under test
-#undef CLONE_DOMAIN0
-//#define CLONE_DOMAIN0 1
 #undef DOMU_BUILD_STAGING
 #define VHPT_GLOBAL
-#define DOMU_AUTO_RESTART
 
 #undef DEBUG_PFMON
 
diff -r 535d29342e42 -r 9c6cd777259b xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h     Thu Feb  9 15:51:29 2006
+++ b/xen/include/asm-ia64/domain.h     Thu Feb  9 19:59:50 2006
@@ -32,11 +32,6 @@
     u64 xen_vastart;
     u64 xen_vaend;
     u64 shared_info_va;
-#ifdef DOMU_AUTO_RESTART
-    u64 image_start;
-    u64 image_len;
-    u64 entry;
-#endif
     unsigned long initrd_start;
     unsigned long initrd_len;
     char *cmdline;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.