ia64/xen-unstable

changeset 6636:79658ef58925

Keep start_info in page provided by domain builder instead of making a copy.
- page is moved next to store/console pages -- these are never put in the
free page pool by the domain
- xen_start_info is now a pointer to the original page instead of the copy
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Sep 05 14:04:36 2005 +0000 (2005-09-05)
parents 85aca042b802
children cd5d566e1d54
files linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-xen/hypervisor.h tools/libxc/xc_linux_build.c xen/arch/x86/domain_build.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c	Mon Sep 05 08:23:05 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c	Mon Sep 05 14:04:36 2005 +0000
     1.3 @@ -147,7 +147,7 @@ static int __init mtrr_init(void)
     1.4  {
     1.5  	struct cpuinfo_x86 *c = &boot_cpu_data;
     1.6  
     1.7 -	if (!(xen_start_info.flags & SIF_PRIVILEGED))
     1.8 +	if (!(xen_start_info->flags & SIF_PRIVILEGED))
     1.9  		return -ENODEV;
    1.10  
    1.11  	if ((!cpu_has(c, X86_FEATURE_MTRR)) &&
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S	Mon Sep 05 08:23:05 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S	Mon Sep 05 14:04:36 2005 +0000
     2.3 @@ -38,17 +38,13 @@
     2.4  #define X86_VENDOR_ID	new_cpu_data+CPUINFO_x86_vendor_id
     2.5  
     2.6  ENTRY(startup_32)
     2.7 -	cld
     2.8 -
     2.9 -	/* Copy the necessary stuff from xen_start_info structure. */
    2.10 -	mov  $xen_start_info_union,%edi
    2.11 -	mov  $512,%ecx
    2.12 -	rep movsl
    2.13 +	movl %esi,xen_start_info
    2.14  
    2.15  #ifdef CONFIG_SMP
    2.16  ENTRY(startup_32_smp)
    2.17 +#endif /* CONFIG_SMP */
    2.18 +
    2.19  	cld
    2.20 -#endif /* CONFIG_SMP */
    2.21  
    2.22  	/* Set up the stack pointer */
    2.23  	lss stack_start,%esp
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c	Mon Sep 05 08:23:05 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c	Mon Sep 05 14:04:36 2005 +0000
     3.3 @@ -289,7 +289,7 @@ static void __init probe_roms(void)
     3.4  	int	      i;
     3.5  
     3.6  	/* Nothing to do if not running in dom0. */
     3.7 -	if (!(xen_start_info.flags & SIF_INITDOMAIN))
     3.8 +	if (!(xen_start_info->flags & SIF_INITDOMAIN))
     3.9  		return;
    3.10  
    3.11  	/* video rom */
    3.12 @@ -363,7 +363,7 @@ unsigned int *phys_to_machine_mapping, *
    3.13  EXPORT_SYMBOL(phys_to_machine_mapping);
    3.14  
    3.15  /* Raw start-of-day parameters from the hypervisor. */
    3.16 -union xen_start_info_union xen_start_info_union;
    3.17 +start_info_t *xen_start_info;
    3.18  
    3.19  static void __init limit_regions(unsigned long long size)
    3.20  {
    3.21 @@ -703,7 +703,7 @@ static void __init parse_cmdline_early (
    3.22  
    3.23  	if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
    3.24  		max_cmdline = COMMAND_LINE_SIZE;
    3.25 -	memcpy(saved_command_line, xen_start_info.cmd_line, max_cmdline);
    3.26 +	memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
    3.27  	/* Save unparsed command line copy for /proc/cmdline */
    3.28  	saved_command_line[max_cmdline-1] = '\0';
    3.29  
    3.30 @@ -934,8 +934,8 @@ void __init find_max_pfn(void)
    3.31  /* We don't use the fake e820 because we need to respond to user override. */
    3.32  void __init find_max_pfn(void)
    3.33  {
    3.34 -	if ( xen_override_max_pfn < xen_start_info.nr_pages )
    3.35 -		xen_override_max_pfn = xen_start_info.nr_pages;
    3.36 +	if ( xen_override_max_pfn < xen_start_info->nr_pages )
    3.37 +		xen_override_max_pfn = xen_start_info->nr_pages;
    3.38  	max_pfn = xen_override_max_pfn;
    3.39  }
    3.40  #endif /* XEN */
    3.41 @@ -1082,8 +1082,8 @@ static unsigned long __init setup_memory
    3.42  	 * partially used pages are not usable - thus
    3.43  	 * we are rounding upwards:
    3.44  	 */
    3.45 - 	min_low_pfn = PFN_UP(__pa(xen_start_info.pt_base)) +
    3.46 -		xen_start_info.nr_pt_frames;
    3.47 + 	min_low_pfn = PFN_UP(__pa(xen_start_info->pt_base)) +
    3.48 +		xen_start_info->nr_pt_frames;
    3.49  
    3.50  	find_max_pfn();
    3.51  
    3.52 @@ -1189,7 +1189,7 @@ void __init setup_bootmem_allocator(void
    3.53  #endif /* !CONFIG_XEN */
    3.54  
    3.55  #ifdef CONFIG_BLK_DEV_INITRD
    3.56 -	if (xen_start_info.mod_start) {
    3.57 +	if (xen_start_info->mod_start) {
    3.58  		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
    3.59  			/*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
    3.60  			initrd_start = INITRD_START + PAGE_OFFSET;
    3.61 @@ -1206,7 +1206,7 @@ void __init setup_bootmem_allocator(void
    3.62  	}
    3.63  #endif
    3.64  
    3.65 -	phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
    3.66 +	phys_to_machine_mapping = (unsigned int *)xen_start_info->mfn_list;
    3.67  }
    3.68  
    3.69  /*
    3.70 @@ -1280,7 +1280,7 @@ static void __init register_memory(void)
    3.71  	else
    3.72  		legacy_init_iomem_resources(&code_resource, &data_resource);
    3.73  
    3.74 -	if (xen_start_info.flags & SIF_INITDOMAIN)
    3.75 +	if (xen_start_info->flags & SIF_INITDOMAIN)
    3.76  		/* EFI systems may still have VGA */
    3.77  		request_resource(&iomem_resource, &video_ram_resource);
    3.78  
    3.79 @@ -1536,8 +1536,8 @@ void __init setup_arch(char **cmdline_p)
    3.80  	init_mm.start_code = (unsigned long) _text;
    3.81  	init_mm.end_code = (unsigned long) _etext;
    3.82  	init_mm.end_data = (unsigned long) _edata;
    3.83 -	init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) +
    3.84 -		       xen_start_info.nr_pt_frames) << PAGE_SHIFT;
    3.85 +	init_mm.brk = (PFN_UP(__pa(xen_start_info->pt_base)) +
    3.86 +		       xen_start_info->nr_pt_frames) << PAGE_SHIFT;
    3.87  
    3.88  	/* XEN: This is nonsense: kernel may not even be contiguous in RAM. */
    3.89  	/*code_resource.start = virt_to_phys(_text);*/
    3.90 @@ -1574,37 +1574,37 @@ void __init setup_arch(char **cmdline_p)
    3.91  #endif
    3.92  
    3.93  	/* Make sure we have a correctly sized P->M table. */
    3.94 -	if (max_pfn != xen_start_info.nr_pages) {
    3.95 +	if (max_pfn != xen_start_info->nr_pages) {
    3.96  		phys_to_machine_mapping = alloc_bootmem_low_pages(
    3.97  			max_pfn * sizeof(unsigned int));
    3.98  
    3.99 -		if (max_pfn > xen_start_info.nr_pages) {
   3.100 +		if (max_pfn > xen_start_info->nr_pages) {
   3.101  			/* set to INVALID_P2M_ENTRY */
   3.102  			memset(phys_to_machine_mapping, ~0,
   3.103  				max_pfn * sizeof(unsigned int));
   3.104  			memcpy(phys_to_machine_mapping,
   3.105 -				(unsigned int *)xen_start_info.mfn_list,
   3.106 -				xen_start_info.nr_pages * sizeof(unsigned int));
   3.107 +				(unsigned int *)xen_start_info->mfn_list,
   3.108 +				xen_start_info->nr_pages * sizeof(unsigned int));
   3.109  		} else {
   3.110  			struct xen_memory_reservation reservation = {
   3.111 -				.extent_start = (unsigned long *)xen_start_info.mfn_list + max_pfn,
   3.112 -				.nr_extents   = xen_start_info.nr_pages - max_pfn,
   3.113 +				.extent_start = (unsigned long *)xen_start_info->mfn_list + max_pfn,
   3.114 +				.nr_extents   = xen_start_info->nr_pages - max_pfn,
   3.115  				.extent_order = 0,
   3.116  				.domid        = DOMID_SELF
   3.117  			};
   3.118  
   3.119  			memcpy(phys_to_machine_mapping,
   3.120 -				(unsigned int *)xen_start_info.mfn_list,
   3.121 +				(unsigned int *)xen_start_info->mfn_list,
   3.122  				max_pfn * sizeof(unsigned int));
   3.123  			/* N.B. below relies on sizeof(int) == sizeof(long). */
   3.124  			BUG_ON(HYPERVISOR_memory_op(
   3.125  				XENMEM_decrease_reservation,
   3.126  				&reservation) !=
   3.127 -			    (xen_start_info.nr_pages - max_pfn));
   3.128 +			    (xen_start_info->nr_pages - max_pfn));
   3.129  		}
   3.130  		free_bootmem(
   3.131 -			__pa(xen_start_info.mfn_list), 
   3.132 -			PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
   3.133 +			__pa(xen_start_info->mfn_list), 
   3.134 +			PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
   3.135  			sizeof(unsigned int))));
   3.136  	}
   3.137  
   3.138 @@ -1633,7 +1633,7 @@ void __init setup_arch(char **cmdline_p)
   3.139  	}
   3.140  #endif
   3.141  
   3.142 -	if (xen_start_info.flags & SIF_INITDOMAIN)
   3.143 +	if (xen_start_info->flags & SIF_INITDOMAIN)
   3.144  		dmi_scan_machine();
   3.145  
   3.146  #ifdef CONFIG_X86_GENERICARCH
   3.147 @@ -1647,7 +1647,7 @@ void __init setup_arch(char **cmdline_p)
   3.148  	HYPERVISOR_physdev_op(&op);
   3.149  
   3.150  #ifdef CONFIG_ACPI_BOOT
   3.151 -	if (!(xen_start_info.flags & SIF_INITDOMAIN)) {
   3.152 +	if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
   3.153  		printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
   3.154  		acpi_disabled = 1;
   3.155  		acpi_ht = 0;
   3.156 @@ -1673,8 +1673,8 @@ void __init setup_arch(char **cmdline_p)
   3.157  
   3.158  	register_memory();
   3.159  
   3.160 -	if (xen_start_info.flags & SIF_INITDOMAIN) {
   3.161 -		if (!(xen_start_info.flags & SIF_PRIVILEGED))
   3.162 +	if (xen_start_info->flags & SIF_INITDOMAIN) {
   3.163 +		if (!(xen_start_info->flags & SIF_PRIVILEGED))
   3.164  			panic("Xen granted us console access "
   3.165  			      "but not privileged status");
   3.166  
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Mon Sep 05 08:23:05 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c	Mon Sep 05 14:04:36 2005 +0000
     4.3 @@ -181,7 +181,7 @@ swiotlb_init(void)
     4.4           * Otherwise, enable for domain 0 if the machine has 'lots of memory',
     4.5           * which we take to mean more than 2GB.
     4.6           */
     4.7 -	if (xen_start_info.flags & SIF_INITDOMAIN) {
     4.8 +	if (xen_start_info->flags & SIF_INITDOMAIN) {
     4.9  		dom0_op_t op;
    4.10  		op.cmd = DOM0_PHYSINFO;
    4.11  		if ((HYPERVISOR_dom0_op(&op) == 0) &&
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Mon Sep 05 08:23:05 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Mon Sep 05 14:04:36 2005 +0000
     5.3 @@ -445,7 +445,7 @@ int do_settimeofday(struct timespec *tv)
     5.4  	sec = tv->tv_sec;
     5.5  	__normalize_time(&sec, &nsec);
     5.6  
     5.7 -	if ((xen_start_info.flags & SIF_INITDOMAIN) &&
     5.8 +	if ((xen_start_info->flags & SIF_INITDOMAIN) &&
     5.9  	    !independent_wallclock) {
    5.10  		op.cmd = DOM0_SETTIME;
    5.11  		op.u.settime.secs        = sec;
    5.12 @@ -476,7 +476,7 @@ static int set_rtc_mmss(unsigned long no
    5.13  
    5.14  	WARN_ON(irqs_disabled());
    5.15  
    5.16 -	if (!(xen_start_info.flags & SIF_INITDOMAIN))
    5.17 +	if (!(xen_start_info->flags & SIF_INITDOMAIN))
    5.18  		return 0;
    5.19  
    5.20  	/* gets recalled with irq locally disabled */
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Mon Sep 05 08:23:05 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Mon Sep 05 14:04:36 2005 +0000
     6.3 @@ -159,7 +159,7 @@ static void __init kernel_physical_mappi
     6.4  	pte_t *pte;
     6.5  	int pgd_idx, pmd_idx, pte_ofs;
     6.6  
     6.7 -	unsigned long max_ram_pfn = xen_start_info.nr_pages;
     6.8 +	unsigned long max_ram_pfn = xen_start_info->nr_pages;
     6.9  	if (max_ram_pfn > max_low_pfn)
    6.10  		max_ram_pfn = max_low_pfn;
    6.11  
    6.12 @@ -317,7 +317,7 @@ void __init one_highpage_init(struct pag
    6.13  		ClearPageReserved(page);
    6.14  		set_bit(PG_highmem, &page->flags);
    6.15  		set_page_count(page, 1);
    6.16 -		if (pfn < xen_start_info.nr_pages)
    6.17 +		if (pfn < xen_start_info->nr_pages)
    6.18  			__free_page(page);
    6.19  		totalhigh_pages++;
    6.20  	} else
    6.21 @@ -356,7 +356,7 @@ pgd_t *swapper_pg_dir;
    6.22  static void __init pagetable_init (void)
    6.23  {
    6.24  	unsigned long vaddr;
    6.25 -	pgd_t *pgd_base = (pgd_t *)xen_start_info.pt_base;
    6.26 +	pgd_t *pgd_base = (pgd_t *)xen_start_info->pt_base;
    6.27  	int i;
    6.28  
    6.29  	swapper_pg_dir = pgd_base;
    6.30 @@ -535,14 +535,14 @@ void __init paging_init(void)
    6.31  	kmap_init();
    6.32  
    6.33  	/* Switch to the real shared_info page, and clear the dummy page. */
    6.34 -	set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
    6.35 +	set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    6.36  	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    6.37  	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    6.38  
    6.39  #ifdef CONFIG_XEN_PHYSDEV_ACCESS
    6.40  	/* Setup mapping of lower 1st MB */
    6.41  	for (i = 0; i < NR_FIX_ISAMAPS; i++)
    6.42 -		if (xen_start_info.flags & SIF_PRIVILEGED)
    6.43 +		if (xen_start_info->flags & SIF_PRIVILEGED)
    6.44  			set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    6.45  		else
    6.46  			__set_fixmap(FIX_ISAMAP_BEGIN - i,
    6.47 @@ -639,7 +639,7 @@ void __init mem_init(void)
    6.48  	/* this will put all low memory onto the freelists */
    6.49  	totalram_pages += free_all_bootmem();
    6.50  	/* XEN: init and count low-mem pages outside initial allocation. */
    6.51 -	for (pfn = xen_start_info.nr_pages; pfn < max_low_pfn; pfn++) {
    6.52 +	for (pfn = xen_start_info->nr_pages; pfn < max_low_pfn; pfn++) {
    6.53  		ClearPageReserved(&mem_map[pfn]);
    6.54  		set_page_count(&mem_map[pfn], 1);
    6.55  		totalram_pages++;
     7.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Mon Sep 05 08:23:05 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c	Mon Sep 05 14:04:36 2005 +0000
     7.3 @@ -178,7 +178,7 @@ void __iomem * __ioremap(unsigned long p
     7.4  	/*
     7.5  	 * Don't remap the low PCI/ISA area, it's always mapped..
     7.6  	 */
     7.7 -	if (xen_start_info.flags & SIF_PRIVILEGED &&
     7.8 +	if (xen_start_info->flags & SIF_PRIVILEGED &&
     7.9  	    phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
    7.10  		return (void __iomem *) isa_bus_to_virt(phys_addr);
    7.11  
    7.12 @@ -332,7 +332,7 @@ void __init *bt_ioremap(unsigned long ph
    7.13  	/*
    7.14  	 * Don't remap the low PCI/ISA area, it's always mapped..
    7.15  	 */
    7.16 -	if (xen_start_info.flags & SIF_PRIVILEGED &&
    7.17 +	if (xen_start_info->flags & SIF_PRIVILEGED &&
    7.18  	    phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
    7.19  		return isa_bus_to_virt(phys_addr);
    7.20  
     8.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c	Mon Sep 05 08:23:05 2005 +0000
     8.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c	Mon Sep 05 14:04:36 2005 +0000
     8.3 @@ -483,7 +483,7 @@ void ctrl_if_resume(void)
     8.4  {
     8.5      control_if_t *ctrl_if = get_ctrl_if();
     8.6  
     8.7 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
     8.8 +    if ( xen_start_info->flags & SIF_INITDOMAIN )
     8.9      {
    8.10          /*
    8.11           * The initial domain must create its own domain-controller link.
    8.12 @@ -500,7 +500,7 @@ void ctrl_if_resume(void)
    8.13          op.u.bind_interdomain.port2 = 0;
    8.14          if ( HYPERVISOR_event_channel_op(&op) != 0 )
    8.15              BUG();
    8.16 -        xen_start_info.domain_controller_evtchn = op.u.bind_interdomain.port1;
    8.17 +        xen_start_info->domain_controller_evtchn = op.u.bind_interdomain.port1;
    8.18          initdom_ctrlif_domcontroller_port   = op.u.bind_interdomain.port2;
    8.19  	bind_evtchn_to_cpu(op.u.bind_interdomain.port1, 0);
    8.20      }
    8.21 @@ -509,7 +509,7 @@ void ctrl_if_resume(void)
    8.22      FRONT_RING_ATTACH(&ctrl_if_tx_ring, &ctrl_if->tx_ring, CONTROL_RING_MEM);
    8.23      BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring, CONTROL_RING_MEM);
    8.24  
    8.25 -    ctrl_if_evtchn = xen_start_info.domain_controller_evtchn;
    8.26 +    ctrl_if_evtchn = xen_start_info->domain_controller_evtchn;
    8.27      ctrl_if_irq    = bind_evtchn_to_irq(ctrl_if_evtchn);
    8.28  
    8.29      memset(&ctrl_if_irq_action, 0, sizeof(ctrl_if_irq_action));
     9.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Mon Sep 05 08:23:05 2005 +0000
     9.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Mon Sep 05 14:04:36 2005 +0000
     9.3 @@ -185,8 +185,8 @@ static int __do_suspend(void *ignore)
     9.4      HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
     9.5      clear_fixmap(FIX_SHARED_INFO);
     9.6  
     9.7 -    memcpy(&suspend_record->resume_info, &xen_start_info,
     9.8 -           sizeof(xen_start_info));
     9.9 +    memcpy(&suspend_record->resume_info, xen_start_info,
    9.10 +           sizeof(*xen_start_info));
    9.11  
    9.12      /* We'll stop somewhere inside this hypercall.  When it returns,
    9.13         we'll start resuming after the restore. */
    9.14 @@ -194,10 +194,10 @@ static int __do_suspend(void *ignore)
    9.15  
    9.16      shutting_down = SHUTDOWN_INVALID; 
    9.17  
    9.18 -    memcpy(&xen_start_info, &suspend_record->resume_info,
    9.19 -           sizeof(xen_start_info));
    9.20 +    memcpy(xen_start_info, &suspend_record->resume_info,
    9.21 +           sizeof(*xen_start_info));
    9.22  
    9.23 -    set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
    9.24 +    set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
    9.25  
    9.26      HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    9.27  
    10.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c	Mon Sep 05 08:23:05 2005 +0000
    10.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c	Mon Sep 05 14:04:36 2005 +0000
    10.3 @@ -524,7 +524,7 @@ extern union xen_start_info_union xen_st
    10.4   */
    10.5  unsigned long __init e820_end_of_ram(void)
    10.6  {
    10.7 -        unsigned long max_end_pfn = xen_start_info.nr_pages;
    10.8 +        unsigned long max_end_pfn = xen_start_info->nr_pages;
    10.9  
   10.10  	if ( xen_override_max_pfn <  max_end_pfn)
   10.11  		xen_override_max_pfn = max_end_pfn;
    11.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S	Mon Sep 05 08:23:05 2005 +0000
    11.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S	Mon Sep 05 14:04:36 2005 +0000
    11.3 @@ -40,16 +40,13 @@
    11.4  	.globl startup_64
    11.5  startup_64:
    11.6  ENTRY(_start)
    11.7 -        cld                
    11.8 -	/* Copy the necessary stuff from xen_start_info structure. */
    11.9 -	movq  $xen_start_info_union,%rdi
   11.10 -	movq  $256,%rcx
   11.11 -	rep movsq
   11.12 +	movq %rsi,xen_start_info(%rip)
   11.13  
   11.14  #ifdef CONFIG_SMP
   11.15 -        ENTRY(startup_64_smp)
   11.16 +ENTRY(startup_64_smp)
   11.17 +#endif /* CONFIG_SMP */
   11.18 +
   11.19  	cld
   11.20 -#endif /* CONFIG_SMP */
   11.21  
   11.22  	movq init_rsp(%rip),%rsp
   11.23  	/* zero EFLAGS after setting rsp */
    12.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c	Mon Sep 05 08:23:05 2005 +0000
    12.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c	Mon Sep 05 14:04:36 2005 +0000
    12.3 @@ -90,8 +90,9 @@ void __init x86_64_start_kernel(char * r
    12.4  {
    12.5  	int i;
    12.6  
    12.7 -        phys_to_machine_mapping = (u32 *)xen_start_info.mfn_list;
    12.8 -        start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) +  xen_start_info.nr_pt_frames;
    12.9 +        phys_to_machine_mapping = (u32 *)xen_start_info->mfn_list;
   12.10 +        start_pfn = (__pa(xen_start_info->pt_base) >> PAGE_SHIFT) + 
   12.11 +		xen_start_info->nr_pt_frames;
   12.12  
   12.13  	for (i = 0; i < 256; i++)
   12.14  		set_intr_gate(i, early_idt_handler);
    13.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Mon Sep 05 08:23:05 2005 +0000
    13.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Mon Sep 05 14:04:36 2005 +0000
    13.3 @@ -84,7 +84,7 @@ DEFINE_PER_CPU(multicall_entry_t, multic
    13.4  DEFINE_PER_CPU(int, nr_multicall_ents);
    13.5  
    13.6  /* Raw start-of-day parameters from the hypervisor. */
    13.7 -union xen_start_info_union xen_start_info_union;
    13.8 +start_info_t *xen_start_info;
    13.9  #endif
   13.10  
   13.11  /*
   13.12 @@ -314,7 +314,7 @@ static __init void parse_cmdline_early (
   13.13  	
   13.14  	if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
   13.15  		max_cmdline = COMMAND_LINE_SIZE;
   13.16 -	memcpy(saved_command_line, xen_start_info.cmd_line, max_cmdline);
   13.17 +	memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
   13.18  	saved_command_line[max_cmdline-1] = '\0';
   13.19  #else
   13.20  	memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
   13.21 @@ -687,7 +687,7 @@ void __init setup_arch(char **cmdline_p)
   13.22  #endif
   13.23  #ifdef CONFIG_XEN
   13.24  #ifdef CONFIG_BLK_DEV_INITRD
   13.25 -	if (xen_start_info.mod_start) {
   13.26 +	if (xen_start_info->mod_start) {
   13.27  		if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
   13.28  			/*reserve_bootmem_generic(INITRD_START, INITRD_SIZE);*/
   13.29  			initrd_start = INITRD_START + PAGE_OFFSET;
   13.30 @@ -732,17 +732,17 @@ void __init setup_arch(char **cmdline_p)
   13.31  	{
   13.32  		int i, j;
   13.33  		/* Make sure we have a large enough P->M table. */
   13.34 -		if (end_pfn > xen_start_info.nr_pages) {
   13.35 +		if (end_pfn > xen_start_info->nr_pages) {
   13.36  			phys_to_machine_mapping = alloc_bootmem(
   13.37  				end_pfn * sizeof(u32));
   13.38  			memset(phys_to_machine_mapping, ~0,
   13.39  			       end_pfn * sizeof(u32));
   13.40  			memcpy(phys_to_machine_mapping,
   13.41 -			       (u32 *)xen_start_info.mfn_list,
   13.42 -			       xen_start_info.nr_pages * sizeof(u32));
   13.43 +			       (u32 *)xen_start_info->mfn_list,
   13.44 +			       xen_start_info->nr_pages * sizeof(u32));
   13.45  			free_bootmem(
   13.46 -				__pa(xen_start_info.mfn_list), 
   13.47 -				PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
   13.48 +				__pa(xen_start_info->mfn_list), 
   13.49 +				PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
   13.50  						sizeof(u32))));
   13.51  		}
   13.52  
   13.53 @@ -814,8 +814,8 @@ void __init setup_arch(char **cmdline_p)
   13.54  	       op.u.set_iopl.iopl = 1;
   13.55  	       HYPERVISOR_physdev_op(&op);
   13.56  
   13.57 -	       if (xen_start_info.flags & SIF_INITDOMAIN) {
   13.58 -		       if (!(xen_start_info.flags & SIF_PRIVILEGED))
   13.59 +	       if (xen_start_info->flags & SIF_INITDOMAIN) {
   13.60 +		       if (!(xen_start_info->flags & SIF_PRIVILEGED))
   13.61  			       panic("Xen granted us console access "
   13.62  				     "but not privileged status");
   13.63  		       
    14.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Mon Sep 05 08:23:05 2005 +0000
    14.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Mon Sep 05 14:04:36 2005 +0000
    14.3 @@ -423,7 +423,7 @@ static inline int make_readonly(unsigned
    14.4  	int readonly = 0;
    14.5  
    14.6  	/* Make old and new page tables read-only. */
    14.7 -	if ((paddr >= (xen_start_info.pt_base - __START_KERNEL_map))
    14.8 +	if ((paddr >= (xen_start_info->pt_base - __START_KERNEL_map))
    14.9  	    && (paddr < ((table_start << PAGE_SHIFT) + tables_space)))
   14.10  		readonly = 1;
   14.11  	/*
   14.12 @@ -474,8 +474,8 @@ static void __init phys_pud_init(pud_t *
   14.13                          pte_save = pte;
   14.14                          for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr += PTE_SIZE) {
   14.15                                  if ((paddr >= end) ||
   14.16 -                                    ((paddr >> PAGE_SHIFT)
   14.17 -                                     >= xen_start_info.nr_pages)) { 
   14.18 +                                    ((paddr >> PAGE_SHIFT) >=
   14.19 +                                     xen_start_info->nr_pages)) { 
   14.20                                          __set_pte(pte, __pte(0)); 
   14.21                                          continue;
   14.22                                  }
   14.23 @@ -522,7 +522,7 @@ void __init xen_init_pt(void)
   14.24  	memset((void *)level2_kernel_pgt, 0, PAGE_SIZE);
   14.25  
   14.26  	/* Find the initial pte page that was built for us. */
   14.27 -	page = (unsigned long *)xen_start_info.pt_base;
   14.28 +	page = (unsigned long *)xen_start_info->pt_base;
   14.29  	addr = page[pgd_index(__START_KERNEL_map)];
   14.30  	addr_to_page(addr, page);
   14.31  	addr = page[pud_index(__START_KERNEL_map)];
   14.32 @@ -671,7 +671,7 @@ void __init paging_init(void)
   14.33  		free_area_init(zones_size);
   14.34  	}
   14.35  
   14.36 -        set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
   14.37 +        set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);
   14.38          HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
   14.39  
   14.40          memset(empty_zero_page, 0, sizeof(empty_zero_page));
   14.41 @@ -682,7 +682,7 @@ void __init paging_init(void)
   14.42  		int i;
   14.43          /* Setup mapping of lower 1st MB */
   14.44  		for (i = 0; i < NR_FIX_ISAMAPS; i++)
   14.45 -			if (xen_start_info.flags & SIF_PRIVILEGED)
   14.46 +			if (xen_start_info->flags & SIF_PRIVILEGED)
   14.47  				set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
   14.48  			else
   14.49  				__set_fixmap(FIX_ISAMAP_BEGIN - i,
    15.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Mon Sep 05 08:23:05 2005 +0000
    15.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Mon Sep 05 14:04:36 2005 +0000
    15.3 @@ -402,7 +402,7 @@ static int __init balloon_init(void)
    15.4  
    15.5  	IPRINTK("Initialising balloon driver.\n");
    15.6  
    15.7 -	current_pages = min(xen_start_info.nr_pages, max_pfn);
    15.8 +	current_pages = min(xen_start_info->nr_pages, max_pfn);
    15.9  	target_pages  = current_pages;
   15.10  	balloon_low   = 0;
   15.11  	balloon_high  = 0;
   15.12 @@ -422,7 +422,7 @@ static int __init balloon_init(void)
   15.13  	balloon_pde->write_proc = balloon_write;
   15.14      
   15.15  	/* Initialise the balloon with excess memory space. */
   15.16 -	for (pfn = xen_start_info.nr_pages; pfn < max_pfn; pfn++) {
   15.17 +	for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) {
   15.18  		page = &mem_map[pfn];
   15.19  		if (!PageReserved(page))
   15.20  			balloon_append(page);
    16.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Mon Sep 05 08:23:05 2005 +0000
    16.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Mon Sep 05 14:04:36 2005 +0000
    16.3 @@ -504,8 +504,8 @@ static int __init blkif_init(void)
    16.4      int i;
    16.5      struct page *page;
    16.6  
    16.7 -    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
    16.8 -         !(xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
    16.9 +    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
   16.10 +         !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
   16.11          return 0;
   16.12  
   16.13      blkif_interface_init();
    17.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Sep 05 08:23:05 2005 +0000
    17.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Sep 05 14:04:36 2005 +0000
    17.3 @@ -757,8 +757,8 @@ static int wait_for_blkif(void)
    17.4  
    17.5  static int __init xlblk_init(void)
    17.6  {
    17.7 -	if ((xen_start_info.flags & SIF_INITDOMAIN)
    17.8 -	    || (xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
    17.9 +	if ((xen_start_info->flags & SIF_INITDOMAIN) ||
   17.10 +	    (xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
   17.11  		return 0;
   17.12  
   17.13  	IPRINTK("Initialising virtual block device driver\n");
    18.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Sep 05 08:23:05 2005 +0000
    18.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c	Mon Sep 05 14:04:36 2005 +0000
    18.3 @@ -873,8 +873,8 @@ static int __init blkif_init(void)
    18.4      int i, j, err;
    18.5      struct page *page;
    18.6  /*
    18.7 -    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
    18.8 -         !(xen_start_info.flags & SIF_BLK_BE_DOMAIN) )
    18.9 +    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
   18.10 +         !(xen_start_info->flags & SIF_BLK_BE_DOMAIN) )
   18.11          return 0;
   18.12  */
   18.13      blkif_interface_init();
    19.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Sep 05 08:23:05 2005 +0000
    19.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Mon Sep 05 14:04:36 2005 +0000
    19.3 @@ -195,7 +195,7 @@ static int __init xen_console_init(void)
    19.4  void xen_console_init(void)
    19.5  #endif
    19.6  {
    19.7 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
    19.8 +    if ( xen_start_info->flags & SIF_INITDOMAIN )
    19.9      {
   19.10          if ( xc_mode == XC_DEFAULT )
   19.11              xc_mode = XC_SERIAL;
   19.12 @@ -266,7 +266,7 @@ void xencons_force_flush(void)
   19.13      int        sz;
   19.14  
   19.15      /* Emergency console is synchronous, so there's nothing to flush. */
   19.16 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
   19.17 +    if ( xen_start_info->flags & SIF_INITDOMAIN )
   19.18          return;
   19.19  
   19.20  
   19.21 @@ -342,7 +342,7 @@ static void __xencons_tx_flush(void)
   19.22  {
   19.23      int        sz, work_done = 0;
   19.24  
   19.25 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
   19.26 +    if ( xen_start_info->flags & SIF_INITDOMAIN )
   19.27      {
   19.28          if ( x_char )
   19.29          {
   19.30 @@ -770,7 +770,7 @@ static int __init xencons_init(void)
   19.31      tty_register_device(xencons_driver, 0, NULL);
   19.32  #endif
   19.33  
   19.34 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
   19.35 +    if ( xen_start_info->flags & SIF_INITDOMAIN )
   19.36      {
   19.37          xencons_priv_irq = bind_virq_to_irq(VIRQ_CONSOLE);
   19.38          (void)request_irq(xencons_priv_irq,
    20.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c	Mon Sep 05 08:23:05 2005 +0000
    20.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c	Mon Sep 05 14:04:36 2005 +0000
    20.3 @@ -36,12 +36,12 @@ struct ring_head
    20.4  
    20.5  static inline struct ring_head *outring(void)
    20.6  {
    20.7 -	return machine_to_virt(xen_start_info.console_mfn << PAGE_SHIFT);
    20.8 +	return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT);
    20.9  }
   20.10  
   20.11  static inline struct ring_head *inring(void)
   20.12  {
   20.13 -	return machine_to_virt(xen_start_info.console_mfn << PAGE_SHIFT)
   20.14 +	return machine_to_virt(xen_start_info->console_mfn << PAGE_SHIFT)
   20.15  		+ PAGE_SIZE/2;
   20.16  }
   20.17  
   20.18 @@ -68,7 +68,7 @@ int xencons_ring_send(const char *data, 
   20.19  	int sent = 0;
   20.20  	
   20.21  	sent = __xencons_ring_send(out, data, len);
   20.22 -	notify_via_evtchn(xen_start_info.console_evtchn);
   20.23 +	notify_via_evtchn(xen_start_info->console_evtchn);
   20.24  	return sent;
   20.25  
   20.26  }	
   20.27 @@ -98,10 +98,10 @@ int xencons_ring_init(void)
   20.28  {
   20.29  	int err;
   20.30  
   20.31 -	if (!xen_start_info.console_evtchn)
   20.32 +	if (!xen_start_info->console_evtchn)
   20.33  		return 0;
   20.34  
   20.35 -	err = bind_evtchn_to_irqhandler(xen_start_info.console_evtchn,
   20.36 +	err = bind_evtchn_to_irqhandler(xen_start_info->console_evtchn,
   20.37  					handle_input, 0, "xencons", inring());
   20.38  	if (err) {
   20.39  		xprintk("XEN console request irq failed %i\n", err);
   20.40 @@ -114,10 +114,11 @@ int xencons_ring_init(void)
   20.41  void xencons_suspend(void)
   20.42  {
   20.43  
   20.44 -	if (!xen_start_info.console_evtchn)
   20.45 +	if (!xen_start_info->console_evtchn)
   20.46  		return;
   20.47  
   20.48 -	unbind_evtchn_from_irqhandler(xen_start_info.console_evtchn, inring());
   20.49 +	unbind_evtchn_from_irqhandler(xen_start_info->console_evtchn,
   20.50 +				      inring());
   20.51  }
   20.52  
   20.53  void xencons_resume(void)
    21.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Mon Sep 05 08:23:05 2005 +0000
    21.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Mon Sep 05 14:04:36 2005 +0000
    21.3 @@ -940,8 +940,8 @@ static int __init netback_init(void)
    21.4      int i;
    21.5      struct page *page;
    21.6  
    21.7 -    if ( !(xen_start_info.flags & SIF_NET_BE_DOMAIN) &&
    21.8 -         !(xen_start_info.flags & SIF_INITDOMAIN) )
    21.9 +    if ( !(xen_start_info->flags & SIF_NET_BE_DOMAIN) &&
   21.10 +         !(xen_start_info->flags & SIF_INITDOMAIN) )
   21.11          return 0;
   21.12  
   21.13      IPRINTK("Initialising Xen netif backend.\n");
    22.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Mon Sep 05 08:23:05 2005 +0000
    22.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Mon Sep 05 14:04:36 2005 +0000
    22.3 @@ -1369,7 +1369,7 @@ static int __init netif_init(void)
    22.4  {
    22.5      int err = 0;
    22.6  
    22.7 -    if (xen_start_info.flags & SIF_INITDOMAIN)
    22.8 +    if (xen_start_info->flags & SIF_INITDOMAIN)
    22.9          return 0;
   22.10  
   22.11      if ((err = xennet_proc_init()) != 0)
    23.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Sep 05 08:23:05 2005 +0000
    23.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Mon Sep 05 14:04:36 2005 +0000
    23.3 @@ -205,8 +205,8 @@ static int privcmd_ioctl(struct inode *i
    23.4          extern int do_xenbus_probe(void*);
    23.5          unsigned long page;
    23.6  
    23.7 -        if (xen_start_info.store_evtchn != 0) {
    23.8 -            ret = xen_start_info.store_mfn;
    23.9 +        if (xen_start_info->store_evtchn != 0) {
   23.10 +            ret = xen_start_info->store_mfn;
   23.11              break;
   23.12          }
   23.13  
   23.14 @@ -222,10 +222,10 @@ static int privcmd_ioctl(struct inode *i
   23.15          SetPageReserved(virt_to_page(page));
   23.16  
   23.17          /* Initial connect. Setup channel and page. */
   23.18 -        xen_start_info.store_evtchn = data;
   23.19 -        xen_start_info.store_mfn = pfn_to_mfn(virt_to_phys((void *)page) >>
   23.20 +        xen_start_info->store_evtchn = data;
   23.21 +        xen_start_info->store_mfn = pfn_to_mfn(virt_to_phys((void *)page) >>
   23.22                                                PAGE_SHIFT);
   23.23 -        ret = xen_start_info.store_mfn;
   23.24 +        ret = xen_start_info->store_mfn;
   23.25  
   23.26          /* We'll return then this will wait for daemon to answer */
   23.27          kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
    24.1 --- a/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Sep 05 08:23:05 2005 +0000
    24.2 +++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c	Mon Sep 05 14:04:36 2005 +0000
    24.3 @@ -1047,8 +1047,8 @@ static int __init
    24.4  tpmback_init(void)
    24.5  {
    24.6  	int rc;
    24.7 -	if (!(xen_start_info.flags & SIF_TPM_BE_DOMAIN) &&
    24.8 -	    !(xen_start_info.flags & SIF_INITDOMAIN)) {
    24.9 +	if (!(xen_start_info->flags & SIF_TPM_BE_DOMAIN) &&
   24.10 +	    !(xen_start_info->flags & SIF_INITDOMAIN)) {
   24.11  	    	printk(KERN_ALERT "Neither TPM-BE Domain nor INIT domain!\n");
   24.12  		return 0;
   24.13  	}
    25.1 --- a/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c	Mon Sep 05 08:23:05 2005 +0000
    25.2 +++ b/linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c	Mon Sep 05 14:04:36 2005 +0000
    25.3 @@ -1029,8 +1029,8 @@ static int __init usbif_init(void)
    25.4      int i;
    25.5      struct page *page;
    25.6  
    25.7 -    if ( !(xen_start_info.flags & SIF_INITDOMAIN) &&
    25.8 -         !(xen_start_info.flags & SIF_USB_BE_DOMAIN) )
    25.9 +    if ( !(xen_start_info->flags & SIF_INITDOMAIN) &&
   25.10 +         !(xen_start_info->flags & SIF_USB_BE_DOMAIN) )
   25.11          return 0;
   25.12  
   25.13      page = balloon_alloc_empty_page_range(MMAP_PAGES);
    26.1 --- a/linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c	Mon Sep 05 08:23:05 2005 +0000
    26.2 +++ b/linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c	Mon Sep 05 14:04:36 2005 +0000
    26.3 @@ -1675,8 +1675,8 @@ static int __init xhci_hcd_init(void)
    26.4  {
    26.5  	int retval = -ENOMEM, i;
    26.6  
    26.7 -	if ( (xen_start_info.flags & SIF_INITDOMAIN)
    26.8 -	     || (xen_start_info.flags & SIF_USB_BE_DOMAIN) )
    26.9 +	if ( (xen_start_info->flags & SIF_INITDOMAIN) ||
   26.10 +	     (xen_start_info->flags & SIF_USB_BE_DOMAIN) )
   26.11                  return 0;
   26.12  
   26.13  	info(DRIVER_DESC " " DRIVER_VERSION);
    27.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Mon Sep 05 08:23:05 2005 +0000
    27.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c	Mon Sep 05 14:04:36 2005 +0000
    27.3 @@ -48,12 +48,12 @@ DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
    27.4  
    27.5  static inline struct ringbuf_head *outbuf(void)
    27.6  {
    27.7 -	return mfn_to_virt(xen_start_info.store_mfn);
    27.8 +	return mfn_to_virt(xen_start_info->store_mfn);
    27.9  }
   27.10  
   27.11  static inline struct ringbuf_head *inbuf(void)
   27.12  {
   27.13 -	return mfn_to_virt(xen_start_info.store_mfn) + PAGE_SIZE/2;
   27.14 +	return mfn_to_virt(xen_start_info->store_mfn) + PAGE_SIZE/2;
   27.15  }
   27.16  
   27.17  static irqreturn_t wake_waiting(int irq, void *unused, struct pt_regs *regs)
   27.18 @@ -145,7 +145,7 @@ int xb_write(const void *data, unsigned 
   27.19  		data += avail;
   27.20  		len -= avail;
   27.21  		update_output_chunk(out, avail);
   27.22 -		notify_via_evtchn(xen_start_info.store_evtchn);
   27.23 +		notify_via_evtchn(xen_start_info->store_evtchn);
   27.24  	} while (len != 0);
   27.25  
   27.26  	return 0;
   27.27 @@ -190,7 +190,7 @@ int xb_read(void *data, unsigned len)
   27.28  		pr_debug("Finished read of %i bytes (%i to go)\n", avail, len);
   27.29  		/* If it was full, tell them we've taken some. */
   27.30  		if (was_full)
   27.31 -			notify_via_evtchn(xen_start_info.store_evtchn);
   27.32 +			notify_via_evtchn(xen_start_info->store_evtchn);
   27.33  	}
   27.34  
   27.35  	/* If we left something, wake watch thread to deal with it. */
   27.36 @@ -205,20 +205,20 @@ int xb_init_comms(void)
   27.37  {
   27.38  	int err;
   27.39  
   27.40 -	if (!xen_start_info.store_evtchn)
   27.41 +	if (!xen_start_info->store_evtchn)
   27.42  		return 0;
   27.43  
   27.44  	err = bind_evtchn_to_irqhandler(
   27.45 -		xen_start_info.store_evtchn, wake_waiting,
   27.46 +		xen_start_info->store_evtchn, wake_waiting,
   27.47  		0, "xenbus", &xb_waitq);
   27.48  	if (err) {
   27.49  		printk(KERN_ERR "XENBUS request irq failed %i\n", err);
   27.50 -		unbind_evtchn_from_irq(xen_start_info.store_evtchn);
   27.51 +		unbind_evtchn_from_irq(xen_start_info->store_evtchn);
   27.52  		return err;
   27.53  	}
   27.54  
   27.55  	/* FIXME zero out page -- domain builder should probably do this*/
   27.56 -	memset(mfn_to_virt(xen_start_info.store_mfn), 0, PAGE_SIZE);
   27.57 +	memset(mfn_to_virt(xen_start_info->store_mfn), 0, PAGE_SIZE);
   27.58  
   27.59  	return 0;
   27.60  }
   27.61 @@ -226,8 +226,8 @@ int xb_init_comms(void)
   27.62  void xb_suspend_comms(void)
   27.63  {
   27.64  
   27.65 -	if (!xen_start_info.store_evtchn)
   27.66 +	if (!xen_start_info->store_evtchn)
   27.67  		return;
   27.68  
   27.69 -	unbind_evtchn_from_irqhandler(xen_start_info.store_evtchn, &xb_waitq);
   27.70 +	unbind_evtchn_from_irqhandler(xen_start_info->store_evtchn, &xb_waitq);
   27.71  }
    28.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Sep 05 08:23:05 2005 +0000
    28.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Mon Sep 05 14:04:36 2005 +0000
    28.3 @@ -621,7 +621,7 @@ int register_xenstore_notifier(struct no
    28.4  
    28.5  	down(&xenbus_lock);
    28.6  
    28.7 -	if (xen_start_info.store_evtchn) {
    28.8 +	if (xen_start_info->store_evtchn) {
    28.9  		ret = nb->notifier_call(nb, 0, NULL);
   28.10  	} else {
   28.11  		notifier_chain_register(&xenstore_chain, nb);
   28.12 @@ -647,7 +647,7 @@ int do_xenbus_probe(void *unused)
   28.13  	int err = 0;
   28.14  
   28.15  	/* Initialize xenstore comms unless already done. */
   28.16 -	printk("store_evtchn = %i\n", xen_start_info.store_evtchn);
   28.17 +	printk("store_evtchn = %i\n", xen_start_info->store_evtchn);
   28.18  	err = xs_init();
   28.19  	if (err) {
   28.20  		printk("XENBUS: Error initializing xenstore comms:"
   28.21 @@ -675,7 +675,7 @@ static int __init xenbus_probe_init(void
   28.22  	device_register(&xenbus_frontend.dev);
   28.23  	device_register(&xenbus_backend.dev);
   28.24  
   28.25 -	if (!xen_start_info.store_evtchn)
   28.26 +	if (!xen_start_info->store_evtchn)
   28.27  		return 0;
   28.28  
   28.29  	do_xenbus_probe(NULL);
    29.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Mon Sep 05 08:23:05 2005 +0000
    29.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Mon Sep 05 14:04:36 2005 +0000
    29.3 @@ -8,7 +8,7 @@
    29.4  
    29.5  static char * __init machine_specific_memory_setup(void)
    29.6  {
    29.7 -	unsigned long max_pfn = xen_start_info.nr_pages;
    29.8 +	unsigned long max_pfn = xen_start_info->nr_pages;
    29.9  
   29.10  	e820.nr_map = 0;
   29.11  	add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
   29.12 @@ -23,7 +23,7 @@ void __init machine_specific_modify_cpu_
   29.13  	clear_bit(X86_FEATURE_PSE, c->x86_capability);
   29.14  	clear_bit(X86_FEATURE_PGE, c->x86_capability);
   29.15  	clear_bit(X86_FEATURE_SEP, c->x86_capability);
   29.16 -	if (!(xen_start_info.flags & SIF_PRIVILEGED))
   29.17 +	if (!(xen_start_info->flags & SIF_PRIVILEGED))
   29.18  		clear_bit(X86_FEATURE_MTRR, c->x86_capability);
   29.19  }
   29.20  
    30.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/setup.h	Mon Sep 05 08:23:05 2005 +0000
    30.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/setup.h	Mon Sep 05 14:04:36 2005 +0000
    30.3 @@ -53,8 +53,8 @@ extern unsigned char boot_params[PARAM_S
    30.4  #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
    30.5  #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
    30.6  #define KERNEL_START (*(unsigned long *) (PARAM+0x214))
    30.7 -#define INITRD_START (__pa(xen_start_info.mod_start))
    30.8 -#define INITRD_SIZE (xen_start_info.mod_len)
    30.9 +#define INITRD_START (__pa(xen_start_info->mod_start))
   30.10 +#define INITRD_SIZE (xen_start_info->mod_len)
   30.11  #define EDID_INFO   (*(struct edid_info *) (PARAM+0x440))
   30.12  #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
   30.13  #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
    31.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h	Mon Sep 05 08:23:05 2005 +0000
    31.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h	Mon Sep 05 14:04:36 2005 +0000
    31.3 @@ -25,8 +25,8 @@ extern char x86_boot_params[BOOT_PARAM_S
    31.4  #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
    31.5  #define KERNEL_START (*(unsigned int *) (PARAM+0x214))
    31.6  
    31.7 -#define INITRD_START (__pa(xen_start_info.mod_start))
    31.8 -#define INITRD_SIZE (xen_start_info.mod_len)
    31.9 +#define INITRD_START (__pa(xen_start_info->mod_start))
   31.10 +#define INITRD_SIZE (xen_start_info->mod_len)
   31.11  #define EDID_INFO   (*(struct edid_info *) (PARAM+0x440))
   31.12  
   31.13  #define EDD_NR     (*(unsigned char *) (PARAM+EDDNR))
    32.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h	Mon Sep 05 08:23:05 2005 +0000
    32.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h	Mon Sep 05 14:04:36 2005 +0000
    32.3 @@ -14,7 +14,7 @@ static char * __init machine_specific_me
    32.4  	who = "Xen";
    32.5  
    32.6  	start_pfn = 0;
    32.7 -	max_pfn = xen_start_info.nr_pages;
    32.8 +	max_pfn = xen_start_info->nr_pages;
    32.9  
   32.10  	e820.nr_map = 0;
   32.11  	add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
   32.12 @@ -29,7 +29,7 @@ void __init machine_specific_modify_cpu_
   32.13  	clear_bit(X86_FEATURE_PSE, c->x86_capability);
   32.14  	clear_bit(X86_FEATURE_PGE, c->x86_capability);
   32.15  	clear_bit(X86_FEATURE_SEP, c->x86_capability);
   32.16 -	if (!(xen_start_info.flags & SIF_PRIVILEGED))
   32.17 +	if (!(xen_start_info->flags & SIF_PRIVILEGED))
   32.18  		clear_bit(X86_FEATURE_MTRR, c->x86_capability);
   32.19  }
   32.20  
    33.1 --- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Mon Sep 05 08:23:05 2005 +0000
    33.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h	Mon Sep 05 14:04:36 2005 +0000
    33.3 @@ -52,13 +52,7 @@
    33.4  #endif
    33.5  
    33.6  /* arch/xen/i386/kernel/setup.c */
    33.7 -union xen_start_info_union
    33.8 -{
    33.9 -    start_info_t xen_start_info;
   33.10 -    char padding[2048];
   33.11 -};
   33.12 -extern union xen_start_info_union xen_start_info_union;
   33.13 -#define xen_start_info (xen_start_info_union.xen_start_info)
   33.14 +extern start_info_t *xen_start_info;
   33.15  
   33.16  /* arch/xen/kernel/evtchn.c */
   33.17  /* Force a proper event-channel callback from Xen. */
    34.1 --- a/tools/libxc/xc_linux_build.c	Mon Sep 05 08:23:05 2005 +0000
    34.2 +++ b/tools/libxc/xc_linux_build.c	Mon Sep 05 14:04:36 2005 +0000
    34.3 @@ -395,18 +395,18 @@ static int setup_guest(int xc_handle,
    34.4      vinitrd_end      = vinitrd_start + initrd_len;
    34.5      vphysmap_start   = round_pgup(vinitrd_end);
    34.6      vphysmap_end     = vphysmap_start + (nr_pages * sizeof(unsigned long));
    34.7 -    vstoreinfo_start = round_pgup(vphysmap_end);
    34.8 +    vstartinfo_start = round_pgup(vphysmap_end);
    34.9 +    vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
   34.10 +    vstoreinfo_start = vstartinfo_end;
   34.11      vstoreinfo_end   = vstoreinfo_start + PAGE_SIZE;
   34.12      vconsole_start   = vstoreinfo_end;
   34.13 -    vconsole_end     = vstoreinfo_end + PAGE_SIZE;
   34.14 +    vconsole_end     = vconsole_start + PAGE_SIZE;
   34.15      vpt_start        = vconsole_end; 
   34.16  
   34.17      for ( nr_pt_pages = 2; ; nr_pt_pages++ )
   34.18      {
   34.19          vpt_end          = vpt_start + (nr_pt_pages * PAGE_SIZE);
   34.20 -        vstartinfo_start = vpt_end;
   34.21 -        vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
   34.22 -        vstack_start     = vstartinfo_end;
   34.23 +        vstack_start     = vpt_end;
   34.24          vstack_end       = vstack_start + PAGE_SIZE;
   34.25          v_end            = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1);
   34.26          if ( (v_end - vstack_end) < (512UL << 10) )
   34.27 @@ -442,19 +442,19 @@ static int setup_guest(int xc_handle,
   34.28             " Loaded kernel: %p->%p\n"
   34.29             " Init. ramdisk: %p->%p\n"
   34.30             " Phys-Mach map: %p->%p\n"
   34.31 +           " Start info:    %p->%p\n"
   34.32             " Store page:    %p->%p\n"
   34.33             " Console page:  %p->%p\n"
   34.34             " Page tables:   %p->%p\n"
   34.35 -           " Start info:    %p->%p\n"
   34.36             " Boot stack:    %p->%p\n"
   34.37             " TOTAL:         %p->%p\n",
   34.38             _p(dsi.v_kernstart), _p(dsi.v_kernend), 
   34.39             _p(vinitrd_start), _p(vinitrd_end),
   34.40             _p(vphysmap_start), _p(vphysmap_end),
   34.41 +           _p(vstartinfo_start), _p(vstartinfo_end),
   34.42             _p(vstoreinfo_start), _p(vstoreinfo_end),
   34.43             _p(vconsole_start), _p(vconsole_end),
   34.44             _p(vpt_start), _p(vpt_end),
   34.45 -           _p(vstartinfo_start), _p(vstartinfo_end),
   34.46             _p(vstack_start), _p(vstack_end),
   34.47             _p(dsi.v_start), _p(v_end));
   34.48      printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));
    35.1 --- a/xen/arch/x86/domain_build.c	Mon Sep 05 08:23:05 2005 +0000
    35.2 +++ b/xen/arch/x86/domain_build.c	Mon Sep 05 14:04:36 2005 +0000
    35.3 @@ -219,13 +219,13 @@ int construct_dom0(struct domain *d,
    35.4      vinitrd_end      = vinitrd_start + initrd_len;
    35.5      vphysmap_start   = round_pgup(vinitrd_end);
    35.6      vphysmap_end     = vphysmap_start + (nr_pages * sizeof(u32));
    35.7 -    vpt_start        = round_pgup(vphysmap_end);
    35.8 +    vstartinfo_start = round_pgup(vphysmap_end);
    35.9 +    vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
   35.10 +    vpt_start        = vstartinfo_end;
   35.11      for ( nr_pt_pages = 2; ; nr_pt_pages++ )
   35.12      {
   35.13          vpt_end          = vpt_start + (nr_pt_pages * PAGE_SIZE);
   35.14 -        vstartinfo_start = vpt_end;
   35.15 -        vstartinfo_end   = vstartinfo_start + PAGE_SIZE;
   35.16 -        vstack_start     = vstartinfo_end;
   35.17 +        vstack_start     = vpt_end;
   35.18          vstack_end       = vstack_start + PAGE_SIZE;
   35.19          v_end            = (vstack_end + (1UL<<22)-1) & ~((1UL<<22)-1);
   35.20          if ( (v_end - vstack_end) < (512UL << 10) )
   35.21 @@ -272,15 +272,15 @@ int construct_dom0(struct domain *d,
   35.22             " Loaded kernel: %p->%p\n"
   35.23             " Init. ramdisk: %p->%p\n"
   35.24             " Phys-Mach map: %p->%p\n"
   35.25 +           " Start info:    %p->%p\n"
   35.26             " Page tables:   %p->%p\n"
   35.27 -           " Start info:    %p->%p\n"
   35.28             " Boot stack:    %p->%p\n"
   35.29             " TOTAL:         %p->%p\n",
   35.30             _p(dsi.v_kernstart), _p(dsi.v_kernend), 
   35.31             _p(vinitrd_start), _p(vinitrd_end),
   35.32             _p(vphysmap_start), _p(vphysmap_end),
   35.33 +           _p(vstartinfo_start), _p(vstartinfo_end),
   35.34             _p(vpt_start), _p(vpt_end),
   35.35 -           _p(vstartinfo_start), _p(vstartinfo_end),
   35.36             _p(vstack_start), _p(vstack_end),
   35.37             _p(dsi.v_start), _p(v_end));
   35.38      printk(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));