All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ling, Xiaofeng" <xiaofeng.ling@intel.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH]fix zombie domain when destroying 2.6 linux vmx guest
Date: Tue, 22 Nov 2005 10:10:50 +0800	[thread overview]
Message-ID: <43827E2A.5000202@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

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>


[-- Attachment #2: zombiefix.patch --]
[-- Type: text/x-patch, Size: 1882 bytes --]

# HG changeset patch
# User Xiaofeng Ling <xiaofeng.ling@intel.com>
# Node ID dd78c7cb5cf29510b8651ea9394c9385e291b888
# Parent  27a2cb379c8ffcca77d9ec262d3baf06e7f85175
Fix the zombie domain when destroy 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>

diff -r 27a2cb379c8f -r dd78c7cb5cf2 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c	Mon Nov 21 17:06:42 2005 +0100
+++ b/xen/arch/x86/shadow.c	Tue Nov 22 09:14:59 2005 +0800
@@ -1536,12 +1536,13 @@
             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)
diff -r 27a2cb379c8f -r dd78c7cb5cf2 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c	Mon Nov 21 17:06:42 2005 +0100
+++ b/xen/arch/x86/shadow32.c	Tue Nov 22 09:14:59 2005 +0800
@@ -2426,7 +2426,8 @@
 
                 __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)

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2005-11-22  2:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43827E2A.5000202@intel.com \
    --to=xiaofeng.ling@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.