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] Unshadow any L2 that, when updated, has no valid entries

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Unshadow any L2 that, when updated, has no valid entries left...
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 23 Mar 2005 17:07:19 +0000
Delivery-date: Tue, 05 Apr 2005 16:18:02 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1259, 2005/03/23 17:07:19+00:00, mafetter@xxxxxxxxxxxxxxxx

        Unshadow any L2 that, when updated, has no valid entries left...
        
        Signed-off-by: michael.fetterman@xxxxxxxxxxxx



 shadow.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)


diff -Nru a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     2005-04-05 12:18:07 -04:00
+++ b/xen/arch/x86/shadow.c     2005-04-05 12:18:07 -04:00
@@ -2050,6 +2050,7 @@
             }
             break;
         case PGT_l2_shadow:
+            max = -1;
             for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
             {
                 if ( !is_guest_l2_slot(i) && !external )
@@ -2065,17 +2066,18 @@
                     //
                     // snapshot[i] = new_pde;
                 }
+                if ( new_pde != 0 )
+                    max = i;
 
                 // XXX - This hack works for linux guests.
                 //       Need a better solution long term.
                 if ( !(new_pde & _PAGE_PRESENT) && unlikely(new_pde != 0) &&
                      !unshadow &&
                      (frame_table[smfn].u.inuse.type_info & PGT_pinned) )
-                {
-                    perfc_incrc(unshadow_l2_count);
                     unshadow = 1;
-                }
             }
+            if ( max == -1 )
+                unshadow = 1;
             break;
         default:
             for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
@@ -2102,7 +2104,10 @@
         unmap_domain_mem(guest);
 
         if ( unlikely(unshadow) )
+        {
+            perfc_incrc(unshadow_l2_count);
             shadow_unpin(smfn);
+        }
     }
 
     return need_flush;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Unshadow any L2 that, when updated, has no valid entries left..., BitKeeper Bot <=