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-ppc-devel

[XenPPC] [xenppc-unstable] Fix PAE debug builds to avoid shadowing shado

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] Fix PAE debug builds to avoid shadowing shadow-mode pgdirs below 4GB.
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Jun 2006 17:55:53 +0000
Delivery-date: Fri, 02 Jun 2006 10:57:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0b98fcb98889f556ecb293600abc6f40fe5b2662
# Parent  c43080e63545c2c9ba101fd8864b5aacc5d666e2
Fix PAE debug builds to avoid shadowing shadow-mode pgdirs below 4GB.
The current shadow mode is not aware of this extra level of shadowing
and gets rather confused. Furthermore it *always* ensures that its
PAE pgdirs are below 4GB so there is no need for the extra shadowing
logic to be invoked.

This fixes a bug introduced in changeset 
10177:d5f98d23427a0d256b896fc63ccfd2c1f79e55ba

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -r c43080e63545 -r 0b98fcb98889 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Tue May 30 18:11:34 2006 +0100
+++ b/xen/arch/x86/mm.c Tue May 30 18:47:37 2006 +0100
@@ -266,8 +266,15 @@ void share_xen_page_with_privileged_gues
 /* Only PDPTs above 4GB boundary need to be shadowed in low memory. */
 #define l3tab_needs_shadow(mfn) (mfn >= 0x100000)
 #else
-/* In debug builds we aggressively shadow PDPTs to exercise code paths. */
-#define l3tab_needs_shadow(mfn) ((mfn << PAGE_SHIFT) != __pa(idle_pg_table))
+/*
+ * In debug builds we aggressively shadow PDPTs to exercise code paths.
+ * We cannot safely shadow the idle page table, nor shadow-mode page tables
+ * (detected by lack of an owning domain). Always shadow PDPTs above 4GB.
+ */
+#define l3tab_needs_shadow(mfn)                         \
+    ((((mfn << PAGE_SHIFT) != __pa(idle_pg_table)) &&   \
+      (page_get_owner(mfn_to_page(mfn)) != NULL)) ||    \
+     (mfn >= 0x100000))
 #endif
 
 static l1_pgentry_t *fix_pae_highmem_pl1e;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] Fix PAE debug builds to avoid shadowing shadow-mode pgdirs below 4GB., Xen patchbot-xenppc-unstable <=