All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Huang <kai.huang@linux.intel.com>
To: andrew.cooper3@citrix.com, tim@xen.org, jbeulich@suse.com,
	kevin.tian@intel.com, xen-devel@lists.xen.org
Cc: Kai Huang <kai.huang@linux.intel.com>
Subject: [v3 08/10] vmx: disable PML in vmx_vcpu_destroy
Date: Fri, 24 Apr 2015 16:19:36 +0800	[thread overview]
Message-ID: <1429863578-16741-9-git-send-email-kai.huang@linux.intel.com> (raw)
In-Reply-To: <1429863578-16741-1-git-send-email-kai.huang@linux.intel.com>

It's possible domain still remains in log-dirty mode when it is about to be
destroyed, in which case we should manually disable PML for it.

Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index e5471b8..e189424 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -153,6 +153,14 @@ static int vmx_vcpu_initialise(struct vcpu *v)
 
 static void vmx_vcpu_destroy(struct vcpu *v)
 {
+    /*
+     * There are cases that domain still remains in log-dirty mode when it is
+     * about to be destroyed (ex, user types 'xl destroy <dom>'), in which case
+     * we should disable PML manually here. Note that vmx_vcpu_destroy is called
+     * prior to vmx_domain_destroy so we need to disable PML for each vcpu
+     * separately here.
+     */
+    vmx_vcpu_disable_pml(v);
     vmx_destroy_vmcs(v);
     vpmu_destroy(v);
     passive_domain_destroy(v);
-- 
2.1.0

  parent reply	other threads:[~2015-04-24  8:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24  8:19 [v3 00/10] PML (Page Modification Logging) support Kai Huang
2015-04-24  8:19 ` [v3 01/10] vmx: add new boot parameter to control PML enabling Kai Huang
2015-04-24 10:46   ` Andrew Cooper
2015-04-24 14:33   ` Jan Beulich
2015-04-25 15:00     ` Kai Huang
2015-04-27  6:56       ` Jan Beulich
2015-05-04  7:46         ` Kai Huang
2015-05-04  7:52           ` Jan Beulich
2015-05-04  7:53             ` Kai Huang
2015-04-24  8:19 ` [v3 02/10] log-dirty: add new paging_mark_gfn_dirty Kai Huang
2015-04-24  8:19 ` [v3 03/10] vmx: add PML definition and feature detection Kai Huang
2015-04-24  8:19 ` [v3 04/10] vmx: add new data structure member to support PML Kai Huang
2015-04-24  8:19 ` [v3 05/10] vmx: add help functions " Kai Huang
2015-04-24  8:19 ` [v3 06/10] vmx: handle PML buffer full VMEXIT Kai Huang
2015-04-24  8:19 ` [v3 07/10] vmx: handle PML enabling in vmx_vcpu_initialise Kai Huang
2015-04-24  8:19 ` Kai Huang [this message]
2015-04-24  8:19 ` [v3 09/10] log-dirty: refine common code to support PML Kai Huang
2015-04-24  8:19 ` [v3 10/10] p2m/ept: enable PML in p2m-ept for log-dirty Kai Huang
2015-04-30 11:04 ` [v3 00/10] PML (Page Modification Logging) support Tim Deegan
2015-05-01  9:06   ` Kai Huang
2015-05-04  7:40   ` Tian, Kevin
2015-05-04  7:46     ` Kai Huang

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=1429863578-16741-9-git-send-email-kai.huang@linux.intel.com \
    --to=kai.huang@linux.intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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.