ia64/xen-unstable

changeset 12377:25e6a17e82f0

Revert 12361:32f7b40ace426d3acdf26c21c20cb6b4562d9f10.
We should support the XENMEM_memory_map hypercall properly
to fix this issue.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Nov 10 14:53:00 2006 +0000 (2006-11-10)
parents bff7dde40467
children d19deb173503
files linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c	Fri Nov 10 14:26:14 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c	Fri Nov 10 14:53:00 2006 +0000
     1.3 @@ -583,20 +583,15 @@ void __init setup_memory_region(void)
     1.4  	 * the boot process we know we have plenty slack space.
     1.5  	 */
     1.6  	struct e820entry map[E820MAX];
     1.7 -	unsigned long arg = DOMID_SELF;
     1.8  
     1.9  	memmap.nr_entries = E820MAX;
    1.10  	set_xen_guest_handle(memmap.buffer, map);
    1.11  
    1.12  	rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap);
    1.13 -	if (rc == -ENOSYS) {
    1.14 +	if ( rc == -ENOSYS ) {
    1.15  		memmap.nr_entries = 1;
    1.16  		map[0].addr = 0ULL;
    1.17 -		rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &arg);
    1.18 -		if (rc < 0)
    1.19 -			map[0].size = xen_start_info->nr_pages << PAGE_SHIFT;
    1.20 -		else
    1.21 -			map[0].size = rc << PAGE_SHIFT;
    1.22 +		map[0].size = xen_start_info->nr_pages << PAGE_SHIFT;
    1.23  		/* 8MB slack (to balance backend allocations). */
    1.24  		map[0].size += 8 << 20;
    1.25  		map[0].type = E820_RAM;
     2.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Fri Nov 10 14:26:14 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h	Fri Nov 10 14:53:00 2006 +0000
     2.3 @@ -13,7 +13,6 @@ static char * __init machine_specific_me
     2.4  {
     2.5  	int rc;
     2.6  	struct xen_memory_map memmap;
     2.7 -	unsigned long arg = DOMID_SELF;
     2.8  	/*
     2.9  	 * This is rather large for a stack variable but this early in
    2.10  	 * the boot process we know we have plenty slack space.
    2.11 @@ -24,14 +23,9 @@ static char * __init machine_specific_me
    2.12  	set_xen_guest_handle(memmap.buffer, map);
    2.13  
    2.14  	rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap);
    2.15 -	if (rc == -ENOSYS) {
    2.16 +	if ( rc == -ENOSYS ) {
    2.17  		memmap.nr_entries = 1;
    2.18  		map[0].addr = 0ULL;
    2.19 -		rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &arg);
    2.20 -		if (rc < 0)
    2.21 -			map[0].size = PFN_PHYS(xen_start_info->nr_pages);
    2.22 -		else
    2.23 -			map[0].size = PFN_PHYS(rc);
    2.24  		map[0].size = PFN_PHYS(xen_start_info->nr_pages);
    2.25  		/* 8MB slack (to balance backend allocations). */
    2.26  		map[0].size += 8ULL << 20;