ia64/xen-unstable

changeset 7981:faf5c318f9b0

Fix the zombie domain when destroying 2.6 linux vmx guest.
The zombie domain is caused by unreleased shadow page
because of lack of put_shadow_ref.
When unshadow a L1 page, set l2e to zero and put ref.

Signed-off-by: <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Nov 22 07:08:57 2005 +0100 (2005-11-22)
parents f8af1ac29ecb
children 060a6634d9ec
files xen/arch/x86/shadow.c xen/arch/x86/shadow32.c
line diff
     1.1 --- a/xen/arch/x86/shadow.c	Mon Nov 21 15:19:26 2005 -0700
     1.2 +++ b/xen/arch/x86/shadow.c	Tue Nov 22 07:08:57 2005 +0100
     1.3 @@ -1536,12 +1536,13 @@ static int resync_all(struct domain *d, 
     1.4              perfc_incr_histo(l1_entries_checked, max_shadow - min_shadow + 1, PT_UPDATES);
     1.5              if ( d->arch.ops->guest_paging_levels >= PAGING_L3 &&
     1.6                   unshadow_l1 ) {
     1.7 -                pgentry_64_t l2e = {0};
     1.8 +                pgentry_64_t l2e;
     1.9  
    1.10                  __shadow_get_l2e(entry->v, entry->va, &l2e);
    1.11  
    1.12                  if ( entry_get_flags(l2e) & _PAGE_PRESENT ) {
    1.13 -                    entry_remove_flags(l2e, _PAGE_PRESENT);
    1.14 +                    put_shadow_ref(entry_get_pfn(l2e));
    1.15 +                    l2e = entry_empty();
    1.16                      __shadow_set_l2e(entry->v, entry->va, &l2e);
    1.17  
    1.18                      if (entry->v == current)
     2.1 --- a/xen/arch/x86/shadow32.c	Mon Nov 21 15:19:26 2005 -0700
     2.2 +++ b/xen/arch/x86/shadow32.c	Tue Nov 22 07:08:57 2005 +0100
     2.3 @@ -2426,7 +2426,8 @@ static int resync_all(struct domain *d, 
     2.4  
     2.5                  __shadow_get_l2e(entry->v, entry->va, &l2e);
     2.6                  if (l2e_get_flags(l2e) & _PAGE_PRESENT) {
     2.7 -                    l2e_remove_flags(l2e, _PAGE_PRESENT);
     2.8 +                    put_shadow_ref(l2e_get_pfn(l2e)); 
     2.9 +                    l2e = l2e_empty();
    2.10                      __shadow_set_l2e(entry->v, entry->va, l2e);
    2.11  
    2.12                      if (entry->v == current)