[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Unshadow any L2 that, when updated, has no valid entries left...
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |