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-changelog

[Xen-changelog] [xen-unstable] x86 shadow: Cleanup for early-unshadow co

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 shadow: Cleanup for early-unshadow code.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Feb 2008 06:30:13 -0800
Delivery-date: Mon, 04 Feb 2008 06:30:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202133077 0
# Node ID 7e6a705e8ec521f538519ca62ca5b7b59b45c36f
# Parent  4e9b5427f2d83c3cccd18c9262b6126fc61f1191
x86 shadow: Cleanup for early-unshadow code.

The unhooking of toplevel shadow entries has been removed; the rest of
the early-unshadow code needs to reflect that.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/multi.c   |   16 +++-------------
 xen/arch/x86/mm/shadow/private.h |    3 ---
 2 files changed, 3 insertions(+), 16 deletions(-)

diff -r 4e9b5427f2d8 -r 7e6a705e8ec5 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Mon Feb 04 13:44:29 2008 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Mon Feb 04 13:51:17 2008 +0000
@@ -2588,19 +2588,15 @@ sh_map_and_validate_gl1e(struct vcpu *v,
  * easier. */
 
 /* Look to see if this is the second emulated write in a row to this
- * page, and unshadow/unhook if it is */
+ * page, and unshadow if it is */
 static inline void check_for_early_unshadow(struct vcpu *v, mfn_t gmfn)
 {
 #if SHADOW_OPTIMIZATIONS & SHOPT_EARLY_UNSHADOW
     if ( v->arch.paging.shadow.last_emulated_mfn == mfn_x(gmfn) &&
          sh_mfn_is_a_page_table(gmfn) )
     {
-        u32 flags = mfn_to_page(gmfn)->shadow_flags;
-        if ( !(flags & (SHF_L2_32|SHF_L2_PAE|SHF_L2H_PAE|SHF_L4_64)) )
-        {
-            perfc_incr(shadow_early_unshadow);
-            sh_remove_shadows(v, gmfn, 1, 0 /* Fast, can fail to unshadow */ );
-        } 
+        perfc_incr(shadow_early_unshadow);
+        sh_remove_shadows(v, gmfn, 1, 0 /* Fast, can fail to unshadow */ );
     }
     v->arch.paging.shadow.last_emulated_mfn = mfn_x(gmfn);
 #endif
@@ -3487,12 +3483,6 @@ sh_set_toplevel_shadow(struct vcpu *v,
     }
     ASSERT(mfn_valid(smfn));
     
-#if SHADOW_OPTIMIZATIONS & SHOPT_EARLY_UNSHADOW
-    /* Once again OK to unhook entries from this table if we see fork/exit */
-    ASSERT(sh_mfn_is_a_page_table(gmfn));
-    mfn_to_page(gmfn)->shadow_flags &= ~SHF_unhooked_mappings;
-#endif
-
     /* Pin the shadow and put it (back) on the list of pinned shadows */
     if ( sh_pin(v, smfn) == 0 )
     {
diff -r 4e9b5427f2d8 -r 7e6a705e8ec5 xen/arch/x86/mm/shadow/private.h
--- a/xen/arch/x86/mm/shadow/private.h  Mon Feb 04 13:44:29 2008 +0000
+++ b/xen/arch/x86/mm/shadow/private.h  Mon Feb 04 13:51:17 2008 +0000
@@ -334,9 +334,6 @@ static inline int sh_type_is_pinnable(st
 #define SHF_PAE (SHF_L1_PAE|SHF_FL1_PAE|SHF_L2_PAE|SHF_L2H_PAE)
 #define SHF_64  (SHF_L1_64|SHF_FL1_64|SHF_L2_64|SHF_L2H_64|SHF_L3_64|SHF_L4_64)
 
-/* Used for hysteresis when automatically unhooking mappings on fork/exit */
-#define SHF_unhooked_mappings (1u<<31)
-
 
 /******************************************************************************
  * Various function declarations 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 shadow: Cleanup for early-unshadow code., Xen patchbot-unstable <=