ia64/xen-unstable

changeset 6893:e78650eb2cf0

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Sep 15 09:21:22 2005 +0000 (2005-09-15)
parents b47c0ff50cdd 19b458d4ba93
children da550f59e971
files tools/libxc/Makefile tools/libxc/xc_vmx_build.c tools/python/xen/xend/image.py
line diff
     2.1 --- a/tools/libxc/xc_vmx_build.c	Thu Sep 15 09:21:10 2005 +0000
     2.2 +++ b/tools/libxc/xc_vmx_build.c	Thu Sep 15 09:21:22 2005 +0000
     2.3 @@ -376,9 +376,21 @@ static int setup_guest(int xc_handle,
     2.4      if ( (mmu = xc_init_mmu_updates(xc_handle, dom)) == NULL )
     2.5          goto error_out;
     2.6  
     2.7 +    /* First allocate page for page dir or pdpt */
     2.8 +    ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT;
     2.9 +    if ( page_array[ppt_alloc] > 0xfffff )
    2.10 +    {
    2.11 +	unsigned long nmfn;
    2.12 +	nmfn = xc_make_page_below_4G( xc_handle, dom, page_array[ppt_alloc] );
    2.13 +	if ( nmfn == 0 )
    2.14 +	{
    2.15 +	    fprintf(stderr, "Couldn't get a page below 4GB :-(\n");
    2.16 +	    goto error_out;
    2.17 +	}
    2.18 +	page_array[ppt_alloc] = nmfn;
    2.19 +    }
    2.20 +
    2.21  #ifdef __i386__
    2.22 -    /* First allocate page for page dir. */
    2.23 -    ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT;
    2.24      l2tab = page_array[ppt_alloc++] << PAGE_SHIFT;
    2.25      ctxt->ctrlreg[3] = l2tab;
    2.26  
    2.27 @@ -414,8 +426,6 @@ static int setup_guest(int xc_handle,
    2.28      munmap(vl1tab, PAGE_SIZE);
    2.29      munmap(vl2tab, PAGE_SIZE);
    2.30  #else
    2.31 -    /* First allocate pdpt */
    2.32 -    ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT;
    2.33      /* here l3tab means pdpt, only 4 entry is used */
    2.34      l3tab = page_array[ppt_alloc++] << PAGE_SHIFT;
    2.35      ctxt->ctrlreg[3] = l3tab;