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

[Xen-devel] [PATCH] linux/x86-64: (re-)add warning to set_pte_phys_ma()



.. as a similar one exists in set_pte_phys() (and also in native).

As usual, written and tested on 2.6.26 and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-07-21/arch/x86_64/mm/init-xen.c
===================================================================
--- head-2008-07-21.orig/arch/x86_64/mm/init-xen.c      2008-07-22 
18:12:09.000000000 +0200
+++ head-2008-07-21/arch/x86_64/mm/init-xen.c   2008-07-22 18:12:57.000000000 
+0200
@@ -325,6 +325,14 @@ set_pte_phys_ma(unsigned long vaddr, uns
        new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
 
        pte = pte_offset_kernel(pmd, vaddr);
+       if (!pte_none(*pte) &&
+#ifdef CONFIG_ACPI
+           /* __acpi_map_table() fails to properly call clear_fixmap() */
+           (vaddr < __fix_to_virt(FIX_ACPI_END) ||
+            vaddr > __fix_to_virt(FIX_ACPI_BEGIN)) &&
+#endif
+           __pte_val(*pte) != (__pte_val(new_pte) & __supported_pte_mask))
+               pte_ERROR(*pte);
        set_pte(pte, new_pte);
 
        /*




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


 


Rackspace

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