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

[Xen-changelog] [xen-unstable] [XEN] Revert patch 11213.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 4a722773e38db5e8e6e29bdd06a3f71e0d82fad7
# Parent  36220033c67f80d698dfe70f080b5b5316aea982
[XEN] Revert patch 11213.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff -r 36220033c67f -r 4a722773e38d xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Aug 21 11:39:27 2006 +0100
+++ b/xen/arch/x86/mm.c Mon Aug 21 11:51:54 2006 +0100
@@ -3139,14 +3139,13 @@ 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 )
         {
@@ -3156,18 +3155,17 @@ 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.