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

[Xen-changelog] [linux-2.6.18-xen] linux/x86-64: (re-)add warning to set_pte_phys_ma()



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216819318 -3600
# Node ID d25b46565529413906d33e1f9bba3b452a8ead86
# Parent  2b60a0b5432ea3d58cc756a8730a1e9ae372eb8c
linux/x86-64: (re-)add warning to set_pte_phys_ma()

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

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/x86_64/mm/init-xen.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 2b60a0b5432e -r d25b46565529 arch/x86_64/mm/init-xen.c
--- a/arch/x86_64/mm/init-xen.c Wed Jul 23 14:21:16 2008 +0100
+++ b/arch/x86_64/mm/init-xen.c Wed Jul 23 14:21:58 2008 +0100
@@ -325,6 +325,14 @@ static __init void set_pte_phys_ma(unsig
        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-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®.