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] Check attributes of page table level 3 en

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Check attributes of page table level 3 entries for 4 level HVM guest.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Jul 2006 16:50:28 +0000
Delivery-date: Wed, 12 Jul 2006 09:54:16 -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 bc2f68334e9649bd9f628bd5762e529d85dd5012
# Parent  405c7e86b24af0f091d337d8d5750661306c0fd9
Check attributes of page table level 3 entries for 4 level HVM guest.
Removed aound tailing spaces.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
 xen/arch/x86/shadow.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff -r 405c7e86b24a -r bc2f68334e96 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     Mon Jul 10 17:38:41 2006 +0100
+++ b/xen/arch/x86/shadow.c     Mon Jul 10 17:40:27 2006 +0100
@@ -3773,7 +3773,7 @@ static inline int guest_page_fault(
 #endif
 
 #if CONFIG_PAGING_LEVELS == 4
-    if ( d->arch.ops->guest_paging_levels == PAGING_L4 ) 
+    if ( d->arch.ops->guest_paging_levels == PAGING_L4 )
     {
         __rw_entry(v, va, &gle, GUEST_ENTRY | GET_ENTRY | PAGING_L4);
         if ( unlikely(!(entry_get_flags(gle) & _PAGE_PRESENT)) )
@@ -3795,7 +3795,7 @@ static inline int guest_page_fault(
 #endif
 
 #if CONFIG_PAGING_LEVELS >= 3
-    if ( d->arch.ops->guest_paging_levels == PAGING_L3 ) 
+    if ( d->arch.ops->guest_paging_levels == PAGING_L3 )
     {
         if ( SH_GUEST_32PAE )
             gpfn = (hvm_get_guest_ctrl_reg(v, 3)) >> PAGE_SHIFT;
@@ -3804,7 +3804,7 @@ static inline int guest_page_fault(
     }
 #endif
 
-    for ( i = PAGING_L3; i >= PAGING_L1; i-- ) 
+    for ( i = PAGING_L3; i >= PAGING_L1; i-- )
     {
         pgentry_64_t *lva;
         /*
@@ -3822,11 +3822,12 @@ static inline int guest_page_fault(
         if ( unlikely(!(entry_get_flags(gle) & _PAGE_PRESENT)) )
             return 1;
 
-        if ( i < PAGING_L3 ) 
-        {
-            if ( error_code & ERROR_W ) 
+        if ( i < PAGING_L3 ||
+             d->arch.ops->guest_paging_levels == PAGING_L4 )
+        {
+            if ( error_code & ERROR_W )
             {
-                if ( unlikely(!(entry_get_flags(gle) & _PAGE_RW)) ) 
+                if ( unlikely(!(entry_get_flags(gle) & _PAGE_RW)) )
                 {
                     if ( i == PAGING_L1 )
                         if ( gpl1e )
@@ -3834,14 +3835,14 @@ static inline int guest_page_fault(
                     return 1;
                 }
             }
-            if ( error_code & ERROR_U ) 
+            if ( error_code & ERROR_U )
             {
                 if ( unlikely(!(entry_get_flags(gle) & _PAGE_USER)) )
                     return 1;
             }
         }
 
-        if ( i == PAGING_L2 ) 
+        if ( i == PAGING_L2 )
         {
             if ( gpl2e )
                 gpl2e->l2 = gle.lo;

_______________________________________________
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] Check attributes of page table level 3 entries for 4 level HVM guest., Xen patchbot-unstable <=