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-3.1-testing] x86: Fix mod_l3_entry() for PAE-on-64

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86: Fix mod_l3_entry() for PAE-on-64 guests. The adjustment of
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 07:11:38 -0800
Delivery-date: Fri, 22 Feb 2008 07:36:06 -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 1203344798 0
# Node ID f1574ad9f7027d4278c758be534d0d113d143b1e
# Parent  64bb15c8521a0ca4106f3d6c369fc17148ce0a81
x86: Fix mod_l3_entry() for PAE-on-64 guests. The adjustment of
_PAGE_RW and _PAGE_USER cannot happen before get_page_from_l3e().

Original patch by Manuel Bouyer <bouyer@xxxxxxxxxx>.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17061:9d29141a5e527d13c10b592c5b7807af73750a19
xen-unstable date:        Mon Feb 18 13:50:25 2008 +0000
---
 xen/arch/x86/mm.c |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff -r 64bb15c8521a -r f1574ad9f702 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Feb 18 14:24:54 2008 +0000
+++ b/xen/arch/x86/mm.c Mon Feb 18 14:26:38 2008 +0000
@@ -1363,15 +1363,17 @@ static int mod_l1_entry(l1_pgentry_t *pl
             return 0;
         }
 
-        adjust_guest_l1e(nl1e, d);
-
         /* Fast path for identical mapping, r/w and presence. */
         if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
+        {
+            adjust_guest_l1e(nl1e, d);
             return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, current);
+        }
 
         if ( unlikely(!get_page_from_l1e(nl1e, FOREIGNDOM)) )
             return 0;
-        
+
+        adjust_guest_l1e(nl1e, d);
         if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, current)) )
         {
             put_page_from_l1e(nl1e, d);
@@ -1416,15 +1418,17 @@ static int mod_l2_entry(l2_pgentry_t *pl
             return 0;
         }
 
-        adjust_guest_l2e(nl2e, d);
-
         /* Fast path for identical mapping and presence. */
-        if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT))
+        if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT) )
+        {
+            adjust_guest_l2e(nl2e, d);
             return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, current);
+        }
 
         if ( unlikely(!get_page_from_l2e(nl2e, pfn, d)) )
             return 0;
 
+        adjust_guest_l2e(nl2e, d);
         if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, current)) )
         {
             put_page_from_l2e(nl2e, pfn);
@@ -1478,15 +1482,17 @@ static int mod_l3_entry(l3_pgentry_t *pl
             return 0;
         }
 
-        adjust_guest_l3e(nl3e, d);
-
         /* Fast path for identical mapping and presence. */
-        if (!l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT))
+        if ( !l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT) )
+        {
+            adjust_guest_l3e(nl3e, d);
             return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, current);
+        }
 
         if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) )
             return 0;
 
+        adjust_guest_l3e(nl3e, d);
         if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, current)) )
         {
             put_page_from_l3e(nl3e, pfn);
@@ -1537,15 +1543,17 @@ static int mod_l4_entry(struct domain *d
             return 0;
         }
 
-        adjust_guest_l4e(nl4e, current->domain);
-
         /* Fast path for identical mapping and presence. */
-        if (!l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT))
+        if ( !l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT) )
+        {
+            adjust_guest_l4e(nl4e, current->domain);
             return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, current);
+        }
 
         if ( unlikely(!get_page_from_l4e(nl4e, pfn, current->domain)) )
             return 0;
 
+        adjust_guest_l4e(nl4e, current->domain);
         if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, current)) )
         {
             put_page_from_l4e(nl4e, pfn);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86: Fix mod_l3_entry() for PAE-on-64 guests. The adjustment of, Xen patchbot-3.1-testing <=