From: Kai Huang <kai.huang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>, Kai Huang <kaih.linux@gmail.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86/EPT: defer enabling of A/D maintenance until PML get enabled
Date: Thu, 15 Oct 2015 15:35:03 +0800 [thread overview]
Message-ID: <561F5727.5060802@linux.intel.com> (raw)
In-Reply-To: <561F6DCB02000078000AB338@prv-mh.provo.novell.com>
On 10/15/2015 03:11 PM, Jan Beulich wrote:
>>>> On 15.10.15 at 08:42, <kai.huang@linux.intel.com> wrote:
>> Thanks for your comments Jan. Actually I am not happy with combining
>> with EPT A/D bit update with PML enabling to single function. After
>> thinking again, how about adding a separate vmx function (ex,
>> vmx_domain_update_eptp) to update EPTP of VMCS of all vcpus of domain
>> after p2m->ept.ept_ad is updated. Another good is this function can also
>> be used in the future for other runtime updates to p2m->ept.
>>
>> What's your idea?
> I don't mind, but that's really more of a question to the VMX maintainers.
Then I would prefer this way.
Kevin,
Do you have any comments on this thread?
>
>> --- a/xen/arch/x86/mm/p2m-ept.c
>> +++ b/xen/arch/x86/mm/p2m-ept.c
>> @@ -1129,17 +1129,26 @@ void ept_sync_domain(struct p2m_domain *p2m)
>>
>> static void ept_enable_pml(struct p2m_domain *p2m)
>> {
>> /*
>> - * No need to check if vmx_domain_enable_pml has succeeded or not, as
>> + * No need to return if vmx_domain_enable_pml has succeeded or not, as
> It seems to me that you'd better use "whether" instead of "if" now
> (and then perhaps also drop the "or not").
OK. Thanks.
>
>> * ept_p2m_type_to_flags will do the check, and write protection will be
>> * used if PML is not enabled.
>> */
>> - vmx_domain_enable_pml(p2m->domain);
>> + if ( vmx_domain_enable_pml(p2m->domain) )
>> + return;
>> +
>> + p2m->ept.ept_ad = 1;
>> + vmx_domain_update_eptp(p2m->domain);
> Shouldn't you enable A/D _before_ enabling PML, at least without
> having a domain-is-paused check here?
Looks we don't have such function. How about just add
ASSERT(atomic_read(&d->pause_count)), just the same as in
vmx_domain_enable_pml ?
Thanks,
-Kai
>
> Jan
>
>
next prev parent reply other threads:[~2015-10-15 7:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 14:42 [PATCH] x86/EPT: defer enabling of A/D maintenance until PML get enabled Jan Beulich
2015-09-28 15:00 ` George Dunlap
2015-09-29 12:51 ` Andrew Cooper
2015-09-30 8:58 ` Kai Huang
2015-09-30 9:54 ` Jan Beulich
2015-09-30 12:45 ` Kai Huang
2015-10-14 1:19 ` Kai Huang
2015-10-14 9:08 ` Kai Huang
2015-10-14 9:26 ` Jan Beulich
2015-10-15 6:42 ` Kai Huang
2015-10-15 7:11 ` Jan Beulich
2015-10-15 7:35 ` Kai Huang [this message]
2015-10-15 7:41 ` Kai Huang
2015-10-15 8:26 ` Jan Beulich
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=561F5727.5060802@linux.intel.com \
--to=kai.huang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kaih.linux@gmail.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xenproject.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.