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] [XEN] Fix shadow2 integration with writab

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Fix shadow2 integration with writable-pagetable logic.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Aug 2006 13:50:12 +0000
Delivery-date: Mon, 21 Aug 2006 06:50:27 -0700
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 069ac1bb78669c19d1570d32d48be8429ec1e81a
# Parent  58ed222274f2bcf1a001b15c18d72d9a221c533d
[XEN] Fix shadow2 integration with writable-pagetable logic.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -r 58ed222274f2 -r 069ac1bb7866 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Aug 21 09:01:53 2006 +0100
+++ b/xen/arch/x86/mm.c Mon Aug 21 10:28:02 2006 +0100
@@ -3139,13 +3139,14 @@ static int ptwr_emulated_update(
         }
     }
 
-    /* Checked successfully: do the update (write or cmpxchg). */
     pl1e = map_domain_page(page_to_mfn(page));
     pl1e = (l1_pgentry_t *)((unsigned long)pl1e + (addr & ~PAGE_MASK));
+
+    if ( shadow2_mode_enabled(d) )
+        shadow2_lock(d);
+
     if ( do_cmpxchg )
     {
-        if ( shadow2_mode_enabled(d) )
-            shadow2_lock(d);
         ol1e = l1e_from_intpte(old);
         if ( cmpxchg((intpte_t *)pl1e, old, val) != old )
         {
@@ -3155,17 +3156,18 @@ static int ptwr_emulated_update(
             put_page_from_l1e(nl1e, d);
             return X86EMUL_CMPXCHG_FAILED;
         }
-        if ( unlikely(shadow2_mode_enabled(v->domain)) )
-        {
-            shadow2_validate_guest_entry(v, _mfn(page_to_mfn(page)), pl1e);
-            shadow2_unlock(v->domain);    
-        }
     }
     else
     {
         ol1e = *pl1e;
         if ( !update_l1e(pl1e, ol1e, nl1e, page_to_mfn(page), v) )
             BUG();
+    }
+
+    if ( shadow2_mode_enabled(d) )
+    {
+        shadow2_validate_guest_entry(v, _mfn(page_to_mfn(page)), pl1e);
+        shadow2_unlock(v->domain);    
     }
 
     unmap_domain_page(pl1e);

_______________________________________________
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] [XEN] Fix shadow2 integration with writable-pagetable logic., Xen patchbot-unstable <=