ia64/xen-unstable
changeset 4441:4cc1f53d83e8
bitkeeper revision 1.1236.1.197 (424e4a83Uiv2R3w5XZIvsLYfRc7fhQ)
[PATCH] [PATCH] tools/libxc/xc_vmx_build.c broken
xc_vmx_build pins the level 2 page table too early so that subsequent maps
(like those in zap_mmio_ranges) fail and consequently xc_vmx_build fails.
To solve this, this patch pins the l2pt at the end of the function when
all memory initializations are finalized.
Signed-off-by: Leendert van Doorn <leendert@watson.ibm.com>
[PATCH] [PATCH] tools/libxc/xc_vmx_build.c broken
xc_vmx_build pins the level 2 page table too early so that subsequent maps
(like those in zap_mmio_ranges) fail and consequently xc_vmx_build fails.
To solve this, this patch pins the l2pt at the end of the function when
all memory initializations are finalized.
Signed-off-by: Leendert van Doorn <leendert@watson.ibm.com>
author | leendert@watson.ibm.com[kaf24] |
---|---|
date | Sat Apr 02 07:32:19 2005 +0000 (2005-04-02) |
parents | 281cdf5f5f64 |
children | 19f7234049f8 |
files | BitKeeper/etc/logging_ok tools/libxc/xc_vmx_build.c |
line diff
1.1 --- a/BitKeeper/etc/logging_ok Fri Apr 01 20:56:01 2005 +0000 1.2 +++ b/BitKeeper/etc/logging_ok Sat Apr 02 07:32:19 2005 +0000 1.3 @@ -52,6 +52,7 @@ kaf24@striker.cl.cam.ac.uk 1.4 kaf24@viper.(none) 1.5 kmacy@shemp.lab.netapp.com 1.6 laudney@eclipse.(none) 1.7 +leendert@watson.ibm.com 1.8 lynx@idefix.cl.cam.ac.uk 1.9 maf46@burn.cl.cam.ac.uk 1.10 mafetter@fleming.research
2.1 --- a/tools/libxc/xc_vmx_build.c Fri Apr 01 20:56:01 2005 +0000 2.2 +++ b/tools/libxc/xc_vmx_build.c Sat Apr 02 07:32:19 2005 +0000 2.3 @@ -329,13 +329,6 @@ static int setup_guest(int xc_handle, 2.4 munmap(vl1tab, PAGE_SIZE); 2.5 munmap(vl2tab, PAGE_SIZE); 2.6 2.7 - /* 2.8 - * Pin down l2tab addr as page dir page - causes hypervisor to provide 2.9 - * correct protection for the page 2.10 - */ 2.11 - if ( pin_table(xc_handle, MMUEXT_PIN_L2_TABLE, l2tab>>PAGE_SHIFT, dom) ) 2.12 - goto error_out; 2.13 - 2.14 if ((boot_paramsp = xc_map_foreign_range( 2.15 xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, 2.16 page_array[(vboot_params_start-dsi.v_start)>>PAGE_SHIFT])) == 0) 2.17 @@ -428,6 +421,13 @@ static int setup_guest(int xc_handle, 2.18 shared_info->vcpu_data[i].evtchn_upcall_mask = 1; 2.19 munmap(shared_info, PAGE_SIZE); 2.20 2.21 + /* 2.22 + * Pin down l2tab addr as page dir page - causes hypervisor to provide 2.23 + * correct protection for the page 2.24 + */ 2.25 + if ( pin_table(xc_handle, MMUEXT_PIN_L2_TABLE, l2tab>>PAGE_SHIFT, dom) ) 2.26 + goto error_out; 2.27 + 2.28 /* Send the page update requests down to the hypervisor. */ 2.29 if ( finish_mmu_updates(xc_handle, mmu) ) 2.30 goto error_out;