[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix allocation of phys_to_machine_mapping array during



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3eee5653f08b01a310e0a9172a6c0149f16217df
# Parent  9628e7a5766d4205f1588f1975328f245452d5fb
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@xxxxxxxxxxxxx>

diff -r 9628e7a5766d -r 3eee5653f08b 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c        Fri Oct 21 
14:42:26 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c        Fri Oct 21 
15:22:09 2005
@@ -519,7 +519,7 @@
        e820_print_map(who);
 }
 
-#else  /* CONFIX_XEN */
+#else  /* CONFIG_XEN */
 
 extern unsigned long xen_override_max_pfn;
 extern union xen_start_info_union xen_start_info_union;
diff -r 9628e7a5766d -r 3eee5653f08b 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Fri Oct 21 
14:42:26 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Fri Oct 21 
15:22:09 2005
@@ -733,6 +733,7 @@
 #ifdef CONFIG_XEN
        {
                int i, j, k, fpp;
+
                /* Make sure we have a large enough P->M table. */
                phys_to_machine_mapping = alloc_bootmem(
                        end_pfn * sizeof(unsigned long));
@@ -745,6 +746,9 @@
                        __pa(xen_start_info->mfn_list), 
                        PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
                                        sizeof(unsigned long))));
+               make_pages_readonly((void *)xen_start_info->mfn_list,
+                                   PFN_UP(xen_start_info->nr_pages *
+                                          sizeof(unsigned long)));
 
                /* 
                 * Initialise the list of the frames that specify the list of 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.