ia64/xen-unstable
changeset 6890:19b458d4ba93
Like IA32 PAE xenlinux, we also need make VMX guest 1:1 page table PGD
page below 4G.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
page below 4G.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Sep 15 09:12:03 2005 +0000 (2005-09-15) |
parents | 7ce64f021a2c |
children | e78650eb2cf0 |
files | tools/libxc/xc_vmx_build.c |
line diff
1.1 --- a/tools/libxc/xc_vmx_build.c Thu Sep 15 08:59:35 2005 +0000 1.2 +++ b/tools/libxc/xc_vmx_build.c Thu Sep 15 09:12:03 2005 +0000 1.3 @@ -376,9 +376,21 @@ static int setup_guest(int xc_handle, 1.4 if ( (mmu = xc_init_mmu_updates(xc_handle, dom)) == NULL ) 1.5 goto error_out; 1.6 1.7 + /* First allocate page for page dir or pdpt */ 1.8 + ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT; 1.9 + if ( page_array[ppt_alloc] > 0xfffff ) 1.10 + { 1.11 + unsigned long nmfn; 1.12 + nmfn = xc_make_page_below_4G( xc_handle, dom, page_array[ppt_alloc] ); 1.13 + if ( nmfn == 0 ) 1.14 + { 1.15 + fprintf(stderr, "Couldn't get a page below 4GB :-(\n"); 1.16 + goto error_out; 1.17 + } 1.18 + page_array[ppt_alloc] = nmfn; 1.19 + } 1.20 + 1.21 #ifdef __i386__ 1.22 - /* First allocate page for page dir. */ 1.23 - ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT; 1.24 l2tab = page_array[ppt_alloc++] << PAGE_SHIFT; 1.25 ctxt->ctrlreg[3] = l2tab; 1.26 1.27 @@ -414,8 +426,6 @@ static int setup_guest(int xc_handle, 1.28 munmap(vl1tab, PAGE_SIZE); 1.29 munmap(vl2tab, PAGE_SIZE); 1.30 #else 1.31 - /* First allocate pdpt */ 1.32 - ppt_alloc = (vpt_start - dsi.v_start) >> PAGE_SHIFT; 1.33 /* here l3tab means pdpt, only 4 entry is used */ 1.34 l3tab = page_array[ppt_alloc++] << PAGE_SHIFT; 1.35 ctxt->ctrlreg[3] = l3tab;