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

[Xen-changelog] [xen-unstable] [XEN][PAE] Always enable non-debug version of l3tab_needs_shadow()



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 06afd218b3b78c291fb7b18fa3076293c0689700
# Parent  1507021dccdfb2fb0af8c129298348050be4654b
[XEN][PAE] Always enable non-debug version of l3tab_needs_shadow()
as there is some suspicion that it leads to crashes on PAE hosts.
Also: improve bracketing in the macros, for safety.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 1507021dccdf -r 06afd218b3b7 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Jun 19 16:47:21 2006 +0100
+++ b/xen/arch/x86/mm.c Mon Jun 19 17:26:54 2006 +0100
@@ -268,9 +268,9 @@ void share_xen_page_with_privileged_gues
 
 #if defined(CONFIG_X86_PAE)
 
-#ifdef NDEBUG
+#if 1 /*def NDEBUG*/ /* KAF: Non-debug case is suspect: let's always use it. */
 /* Only PDPTs above 4GB boundary need to be shadowed in low memory. */
-#define l3tab_needs_shadow(mfn) (mfn >= 0x100000)
+#define l3tab_needs_shadow(mfn) ((mfn) >= 0x100000)
 #else
 /*
  * In debug builds we aggressively shadow PDPTs to exercise code paths.
@@ -278,9 +278,9 @@ void share_xen_page_with_privileged_gues
  * (detected by lack of an owning domain). Always shadow PDPTs above 4GB.
  */
 #define l3tab_needs_shadow(mfn)                         \
-    ((((mfn << PAGE_SHIFT) != __pa(idle_pg_table)) &&   \
+    (((((mfn) << PAGE_SHIFT) != __pa(idle_pg_table)) && \
       (page_get_owner(mfn_to_page(mfn)) != NULL)) ||    \
-     (mfn >= 0x100000))
+     ((mfn) >= 0x100000))
 #endif
 
 static l1_pgentry_t *fix_pae_highmem_pl1e;

_______________________________________________
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®.