ia64/xen-unstable

changeset 4861:9cc14753366a

bitkeeper revision 1.1389.15.21 (4282aa75a-T-dS1Y6SxMFP1eBJkE5w)

Fix the fake e820 map for dom0 and unpriv domains, request certain
resources only when in dom0.

This makes /proc/iomem look "more" normal and makes kernel IO memory
resource tree more accurate.

Signed-off-by: mark.williamson@cl.cam.ac.uk
author mwilli2@equilibrium.research
date Thu May 12 00:59:33 2005 +0000 (2005-05-12)
parents b633f24b48be
children efc62ecb53c6
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Wed May 11 23:27:00 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Thu May 12 00:59:33 2005 +0000
     1.3 @@ -289,6 +289,10 @@ static void __init probe_roms(void)
     1.4  	unsigned char *rom;
     1.5  	int	      i;
     1.6  
     1.7 +        /* Nothing to do if not running in dom0. */
     1.8 +	if ( !(xen_start_info.flags & SIF_INITDOMAIN) )
     1.9 +                return;
    1.10 +
    1.11  	/* video rom */
    1.12  	upper = adapter_rom_resources[0].start;
    1.13  	for (start = video_rom_resource.start; start < upper; start += 2048) {
    1.14 @@ -1213,8 +1217,9 @@ static void __init register_memory(void)
    1.15  	else
    1.16  		legacy_init_iomem_resources(&code_resource, &data_resource);
    1.17  
    1.18 -	/* EFI systems may still have VGA */
    1.19 -	request_resource(&iomem_resource, &video_ram_resource);
    1.20 +	if ( xen_start_info.flags & SIF_INITDOMAIN )
    1.21 +                /* EFI systems may still have VGA */
    1.22 +                request_resource(&iomem_resource, &video_ram_resource);
    1.23  
    1.24  	/* request I/O space for devices used on all i[345]86 PCs */
    1.25  	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
     2.1 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Wed May 11 23:27:00 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h	Thu May 12 00:59:33 2005 +0000
     2.3 @@ -13,7 +13,12 @@ static char * __init machine_specific_me
     2.4  
     2.5  	who = "Xen";
     2.6  
     2.7 -	start_pfn = 0;
     2.8 +        /* In dom0, we have to start the fake e820 map above the first 1MB, in
     2.9 +         * other domains, it can start at 0. */
    2.10 +	if ( xen_start_info.flags & SIF_INITDOMAIN )
    2.11 +                start_pfn = 0x100;
    2.12 +        else
    2.13 +                start_pfn = 0;
    2.14  	max_pfn = xen_start_info.nr_pages;
    2.15  
    2.16  	e820.nr_map = 0;