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>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-11-22 07:08:57 +01:00
1 parent 0a9b9b5eb2
commit c4da02a2ab
2 files changed
+5 -3

No files matched your search

+3 -2
View File
@@ -1536,12 +1536,13 @@ static int resync_all(struct domain *d, u32 stype)
perfc_incr_histo(l1_entries_checked, max_shadow - min_shadow + 1, PT_UPDATES);
if ( d->arch.ops->guest_paging_levels >= PAGING_L3 &&
unshadow_l1 ) {
pgentry_64_t l2e = {0};
pgentry_64_t l2e;
__shadow_get_l2e(entry->v, entry->va, &l2e);
if ( entry_get_flags(l2e) & _PAGE_PRESENT ) {
entry_remove_flags(l2e, _PAGE_PRESENT);
put_shadow_ref(entry_get_pfn(l2e));
l2e = entry_empty();
__shadow_set_l2e(entry->v, entry->va, &l2e);
if (entry->v == current)
+2 -1
View File
@@ -2426,7 +2426,8 @@ static int resync_all(struct domain *d, u32 stype)
__shadow_get_l2e(entry->v, entry->va, &l2e);
if (l2e_get_flags(l2e) & _PAGE_PRESENT) {
l2e_remove_flags(l2e, _PAGE_PRESENT);
put_shadow_ref(l2e_get_pfn(l2e));
l2e = l2e_empty();
__shadow_set_l2e(entry->v, entry->va, l2e);
if (entry->v == current)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.