ia64/xen-unstable

changeset 8777:9c6cd777259b

[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@valinux.co.jp>
author awilliam@xenbuild.aw
date Thu Feb 09 12:59:50 2006 -0700 (2006-02-09)
parents 535d29342e42
children 9eb9fa8a9933
files xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/hypercall.c xen/arch/ia64/xen/xensetup.c xen/include/asm-ia64/config.h xen/include/asm-ia64/domain.h
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Thu Feb 09 08:51:29 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Thu Feb 09 12:59:50 2006 -0700
     1.3 @@ -655,15 +655,9 @@ void loaddomainelfimage(struct domain *d
     1.4  	else
     1.5  #endif
     1.6  	while (memsz > 0) {
     1.7 -#ifdef DOMU_AUTO_RESTART
     1.8 -		pteval = lookup_domain_mpa(d,dom_mpaddr);
     1.9 -		if (pteval) dom_imva = __va(pteval & _PFN_MASK);
    1.10 -		else { printf("loaddomainelfimage: BAD!\n"); while(1); }
    1.11 -#else
    1.12  		p = map_new_domain_page(d,dom_mpaddr);
    1.13  		if (unlikely(!p)) BUG();
    1.14  		dom_imva = __va(page_to_maddr(p));
    1.15 -#endif
    1.16  		if (filesz > 0) {
    1.17  			if (filesz >= PAGE_SIZE)
    1.18  				copy_memory(dom_imva,elfaddr,PAGE_SIZE);
    1.19 @@ -792,12 +786,10 @@ int construct_dom0(struct domain *d,
    1.20  
    1.21  //printf("construct_dom0: starting\n");
    1.22  
    1.23 -#ifndef CLONE_DOMAIN0
    1.24  	/* Sanity! */
    1.25  	BUG_ON(d != dom0);
    1.26  	BUG_ON(d->vcpu[0] == NULL);
    1.27  	BUG_ON(test_bit(_VCPUF_initialised, &v->vcpu_flags));
    1.28 -#endif
    1.29  
    1.30  	memset(&dsi, 0, sizeof(struct domain_setup_info));
    1.31  
    1.32 @@ -962,9 +954,6 @@ int construct_dom0(struct domain *d,
    1.33  	sync_split_caches();
    1.34  
    1.35  	// FIXME: Hack for keyboard input
    1.36 -#ifdef CLONE_DOMAIN0
    1.37 -if (d == dom0)
    1.38 -#endif
    1.39  	serial_input_init();
    1.40  	if (d == dom0) {
    1.41  		VCPU(v, delivery_mask[0]) = -1L;
    1.42 @@ -977,65 +966,6 @@ if (d == dom0)
    1.43  	return 0;
    1.44  }
    1.45  
    1.46 -// FIXME: When dom0 can construct domains, this goes away (or is rewritten)
    1.47 -int construct_domU(struct domain *d,
    1.48 -		   unsigned long image_start, unsigned long image_len,
    1.49 -	           unsigned long initrd_start, unsigned long initrd_len,
    1.50 -	           char *cmdline)
    1.51 -{
    1.52 -	int i, rc;
    1.53 -	struct vcpu *v = d->vcpu[0];
    1.54 -	unsigned long pkern_entry;
    1.55 -
    1.56 -#ifndef DOMU_AUTO_RESTART
    1.57 -	BUG_ON(test_bit(_VCPUF_initialised, &v->vcpu_flags));
    1.58 -#endif
    1.59 -
    1.60 -	printk("*** LOADING DOMAIN %d ***\n",d->domain_id);
    1.61 -
    1.62 -	d->max_pages = dom0_size/PAGE_SIZE;	// FIXME: use dom0 size
    1.63 -	// FIXME: use domain0 command line
    1.64 -	rc = parsedomainelfimage(image_start, image_len, &pkern_entry);
    1.65 -	printk("parsedomainelfimage returns %d\n",rc);
    1.66 -	if ( rc != 0 ) return rc;
    1.67 -
    1.68 -	/* Mask all upcalls... */
    1.69 -	for ( i = 0; i < MAX_VIRT_CPUS; i++ )
    1.70 -		d->shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
    1.71 -
    1.72 -	/* Copy the OS image. */
    1.73 -	printk("calling loaddomainelfimage(%p,%p)\n",d,image_start);
    1.74 -	loaddomainelfimage(d,image_start);
    1.75 -	printk("loaddomainelfimage returns\n");
    1.76 -
    1.77 -	set_bit(_VCPUF_initialised, &v->vcpu_flags);
    1.78 -
    1.79 -	printk("calling new_thread, entry=%p\n",pkern_entry);
    1.80 -#ifdef DOMU_AUTO_RESTART
    1.81 -	v->domain->arch.image_start = image_start;
    1.82 -	v->domain->arch.image_len = image_len;
    1.83 -	v->domain->arch.entry = pkern_entry;
    1.84 -#endif
    1.85 -	new_thread(v, pkern_entry, 0, 0);
    1.86 -	printk("new_thread returns\n");
    1.87 -	sync_split_caches();
    1.88 -	__set_bit(0x30, VCPU(v, delivery_mask));
    1.89 -
    1.90 -	return 0;
    1.91 -}
    1.92 -
    1.93 -#ifdef DOMU_AUTO_RESTART
    1.94 -void reconstruct_domU(struct vcpu *v)
    1.95 -{
    1.96 -	/* re-copy the OS image to reset data values to original */
    1.97 -	printk("reconstruct_domU: restarting domain %d...\n",
    1.98 -		v->domain->domain_id);
    1.99 -	loaddomainelfimage(v->domain,v->domain->arch.image_start);
   1.100 -	new_thread(v, v->domain->arch.entry, 0, 0);
   1.101 -	sync_split_caches();
   1.102 -}
   1.103 -#endif
   1.104 -
   1.105  void machine_restart(char * __unused)
   1.106  {
   1.107  	if (platform_is_hp_ski()) dummy();
     2.1 --- a/xen/arch/ia64/xen/hypercall.c	Thu Feb 09 08:51:29 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/hypercall.c	Thu Feb 09 12:59:50 2006 -0700
     2.3 @@ -131,15 +131,8 @@ ia64_hypercall (struct pt_regs *regs)
     2.4  			printf("(by dom0)\n ");
     2.5  			(*efi.reset_system)(EFI_RESET_WARM,0,0,NULL);
     2.6  		}
     2.7 -#ifdef DOMU_AUTO_RESTART
     2.8 -		else {
     2.9 -			reconstruct_domU(current);
    2.10 -			return 0;  // don't increment ip!
    2.11 -		}
    2.12 -#else	
    2.13  		printf("(not supported for non-0 domain)\n");
    2.14  		regs->r8 = EFI_UNSUPPORTED;
    2.15 -#endif
    2.16  		break;
    2.17  	    case FW_HYPERCALL_EFI_GET_TIME:
    2.18  		tv = vcpu_get_gr(v,32);
     3.1 --- a/xen/arch/ia64/xen/xensetup.c	Thu Feb 09 08:51:29 2006 -0700
     3.2 +++ b/xen/arch/ia64/xen/xensetup.c	Thu Feb 09 12:59:50 2006 -0700
     3.3 @@ -31,9 +31,6 @@ struct vcpu *idle_vcpu[NR_CPUS];
     3.4  
     3.5  cpumask_t cpu_present_map;
     3.6  
     3.7 -#ifdef CLONE_DOMAIN0
     3.8 -struct domain *clones[CLONE_DOMAIN0];
     3.9 -#endif
    3.10  extern unsigned long domain0_ready;
    3.11  
    3.12  int find_max_pfn (unsigned long, unsigned long, void *);
    3.13 @@ -342,16 +339,6 @@ printk("About to call sort_main_extable(
    3.14  printk("About to call domain_create()\n");
    3.15      dom0 = domain_create(0, 0);
    3.16  
    3.17 -#ifdef CLONE_DOMAIN0
    3.18 -    {
    3.19 -    int i;
    3.20 -    for (i = 0; i < CLONE_DOMAIN0; i++) {
    3.21 -	clones[i] = domain_create(i+1, 0);
    3.22 -        if ( clones[i] == NULL )
    3.23 -            panic("Error creating domain0 clone %d\n",i);
    3.24 -    }
    3.25 -    }
    3.26 -#endif
    3.27      if ( dom0 == NULL )
    3.28          panic("Error creating domain 0\n");
    3.29  
    3.30 @@ -376,22 +363,6 @@ printk("About to call domain_create()\n"
    3.31      /* PIN domain0 on CPU 0.  */
    3.32      dom0->vcpu[0]->cpu_affinity = cpumask_of_cpu(0);
    3.33  
    3.34 -#ifdef CLONE_DOMAIN0
    3.35 -    {
    3.36 -    int i;
    3.37 -    dom0_memory_start = __va(ia64_boot_param->domain_start);
    3.38 -    dom0_memory_size = ia64_boot_param->domain_size;
    3.39 -
    3.40 -    for (i = 0; i < CLONE_DOMAIN0; i++) {
    3.41 -      printk("CONSTRUCTING DOMAIN0 CLONE #%d\n",i+1);
    3.42 -      if ( construct_domU(clones[i], dom0_memory_start, dom0_memory_size,
    3.43 -			  dom0_initrd_start,dom0_initrd_size,
    3.44 -			  0) != 0)
    3.45 -            panic("Could not set up DOM0 clone %d\n",i);
    3.46 -    }
    3.47 -    }
    3.48 -#endif
    3.49 -
    3.50      /* The stash space for the initial kernel image can now be freed up. */
    3.51      init_domheap_pages(ia64_boot_param->domain_start,
    3.52                         ia64_boot_param->domain_size);
    3.53 @@ -412,13 +383,6 @@ printk("About to call init_trace_bufs()\
    3.54      console_endboot(cmdline && strstr(cmdline, "tty0"));
    3.55  #endif
    3.56  
    3.57 -#ifdef CLONE_DOMAIN0
    3.58 -    {
    3.59 -    int i;
    3.60 -    for (i = 0; i < CLONE_DOMAIN0; i++)
    3.61 -	domain_unpause_by_systemcontroller(clones[i]);
    3.62 -    }
    3.63 -#endif
    3.64      domain0_ready = 1;
    3.65  
    3.66      local_irq_enable();
     4.1 --- a/xen/include/asm-ia64/config.h	Thu Feb 09 08:51:29 2006 -0700
     4.2 +++ b/xen/include/asm-ia64/config.h	Thu Feb 09 12:59:50 2006 -0700
     4.3 @@ -3,11 +3,8 @@
     4.4  
     4.5  #undef USE_PAL_EMULATOR
     4.6  // control flags for turning on/off features under test
     4.7 -#undef CLONE_DOMAIN0
     4.8 -//#define CLONE_DOMAIN0 1
     4.9  #undef DOMU_BUILD_STAGING
    4.10  #define VHPT_GLOBAL
    4.11 -#define DOMU_AUTO_RESTART
    4.12  
    4.13  #undef DEBUG_PFMON
    4.14  
     5.1 --- a/xen/include/asm-ia64/domain.h	Thu Feb 09 08:51:29 2006 -0700
     5.2 +++ b/xen/include/asm-ia64/domain.h	Thu Feb 09 12:59:50 2006 -0700
     5.3 @@ -32,11 +32,6 @@ struct arch_domain {
     5.4      u64 xen_vastart;
     5.5      u64 xen_vaend;
     5.6      u64 shared_info_va;
     5.7 -#ifdef DOMU_AUTO_RESTART
     5.8 -    u64 image_start;
     5.9 -    u64 image_len;
    5.10 -    u64 entry;
    5.11 -#endif
    5.12      unsigned long initrd_start;
    5.13      unsigned long initrd_len;
    5.14      char *cmdline;