WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86-64: (re-)add warning to set_pte_phys_ma()
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 23 Jul 2008 14:17:50 +0100
Delivery-date: Wed, 23 Jul 2008 06:17:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
.. 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86-64: (re-)add warning to set_pte_phys_ma(), Jan Beulich <=