WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[PATCH] remove CLONE_DOMAIN0 and DOMU_AUTO_RESTART for simplicity (was R

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [PATCH] remove CLONE_DOMAIN0 and DOMU_AUTO_RESTART for simplicity (was Re: [Xen-ia64-devel] CLONE_DOMAIN0 and DOMU_AUTO_RESTART)
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 25 Jan 2006 13:03:46 +0900
Delivery-date: Wed, 25 Jan 2006 04:12:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060125022418.GA13489@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060125022418.GA13489@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Here is the patch.

# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Node ID 5cb69109d5b2278500fe9703af93dacd0ed25456
# Parent  cfa3b96b056debee0d86249bd74fb717b43ea84b
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 cfa3b96b056d -r 5cb69109d5b2 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri Jan 13 14:58:41 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c        Wed Jan 25 12:58:20 2006 +0900
@@ -658,15 +658,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_phys(p));
-#endif
                if (filesz > 0) {
                        if (filesz >= PAGE_SIZE)
                                copy_memory(dom_imva,elfaddr,PAGE_SIZE);
@@ -795,12 +789,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));
 
@@ -965,9 +957,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;
@@ -980,65 +969,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 cfa3b96b056d -r 5cb69109d5b2 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c     Fri Jan 13 14:58:41 2006 -0600
+++ b/xen/arch/ia64/xen/hypercall.c     Wed Jan 25 12:58:20 2006 +0900
@@ -93,15 +93,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 cfa3b96b056d -r 5cb69109d5b2 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Fri Jan 13 14:58:41 2006 -0600
+++ b/xen/arch/ia64/xen/xensetup.c      Wed Jan 25 12:58:20 2006 +0900
@@ -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 do_createdomain()\n");
     dom0 = do_createdomain(0, 0);
 
-#ifdef CLONE_DOMAIN0
-    {
-    int i;
-    for (i = 0; i < CLONE_DOMAIN0; i++) {
-       clones[i] = do_createdomain(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 cfa3b96b056d -r 5cb69109d5b2 xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Fri Jan 13 14:58:41 2006 -0600
+++ b/xen/include/asm-ia64/config.h     Wed Jan 25 12:58:20 2006 +0900
@@ -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 cfa3b96b056d -r 5cb69109d5b2 xen/include/asm-ia64/domain.h
--- a/xen/include/asm-ia64/domain.h     Fri Jan 13 14:58:41 2006 -0600
+++ b/xen/include/asm-ia64/domain.h     Wed Jan 25 12:58:20 2006 +0900
@@ -33,11 +33,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;


-- 
yamahata

Attachment: 8603:5cb69109d5b2.patch
Description: Text document

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>