ia64/xen-unstable
changeset 7475:3eee5653f08b
Fix allocation of phys_to_machine_mapping array during
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
x86/64 linux boot. The original builder-provided array
must be made read-only in the initial mapping.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Fri Oct 21 16:22:09 2005 +0100 (2005-10-21) |
parents | 9628e7a5766d |
children | 8eaaa622db81 |
files | linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Fri Oct 21 15:42:26 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Fri Oct 21 16:22:09 2005 +0100 1.3 @@ -519,7 +519,7 @@ void __init setup_memory_region(void) 1.4 e820_print_map(who); 1.5 } 1.6 1.7 -#else /* CONFIX_XEN */ 1.8 +#else /* CONFIG_XEN */ 1.9 1.10 extern unsigned long xen_override_max_pfn; 1.11 extern union xen_start_info_union xen_start_info_union;
2.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Fri Oct 21 15:42:26 2005 +0100 2.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Fri Oct 21 16:22:09 2005 +0100 2.3 @@ -733,6 +733,7 @@ void __init setup_arch(char **cmdline_p) 2.4 #ifdef CONFIG_XEN 2.5 { 2.6 int i, j, k, fpp; 2.7 + 2.8 /* Make sure we have a large enough P->M table. */ 2.9 phys_to_machine_mapping = alloc_bootmem( 2.10 end_pfn * sizeof(unsigned long)); 2.11 @@ -745,6 +746,9 @@ void __init setup_arch(char **cmdline_p) 2.12 __pa(xen_start_info->mfn_list), 2.13 PFN_PHYS(PFN_UP(xen_start_info->nr_pages * 2.14 sizeof(unsigned long)))); 2.15 + make_pages_readonly((void *)xen_start_info->mfn_list, 2.16 + PFN_UP(xen_start_info->nr_pages * 2.17 + sizeof(unsigned long))); 2.18 2.19 /* 2.20 * Initialise the list of the frames that specify the list of