From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Tim Deegan <tim@xen.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 for-4.7 4/5] x86/svm: Don't unconditionally use a new ASID in svm_invlpg_intercept()
Date: Mon, 9 May 2016 15:35:15 -0400 [thread overview]
Message-ID: <5730E673.9010909@oracle.com> (raw)
In-Reply-To: <1462818472-14225-5-git-send-email-andrew.cooper3@citrix.com>
On 05/09/2016 02:27 PM, Andrew Cooper wrote:
> paging_invlpg() already returns a boolean indicating whether an invalidation
> is necessary or not. A return value of 0 indicates that the specified virtual
> address wasn't shadowed (or has already been flushed), cannot currently be
> cached in the TLB.
>
> This is a performance optimisation.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Tim Deegan <tim@xen.org>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> CC: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>
> While being a performance optimisation, the main purpose of splitting this
> patch out is to separate the functional change. The following patch performs
> some function shuffling, and this patch makes the following one more obviously
> correct.
>
> v2:
> * Newly split out
> ---
> xen/arch/x86/hvm/svm/svm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 7634c3f..081a5d8 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -2224,8 +2224,8 @@ static void svm_invlpg_intercept(unsigned long vaddr)
> {
> struct vcpu *curr = current;
> HVMTRACE_LONG_2D(INVLPG, 0, TRC_PAR_LONG(vaddr));
> - paging_invlpg(curr, vaddr);
> - svm_asid_g_invlpg(curr, vaddr);
> + if ( paging_invlpg(curr, vaddr) )
> + svm_asid_g_invlpg(curr, vaddr);
> }
>
> static struct hvm_function_table __initdata svm_function_table = {
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-09 19:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 18:27 [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 1/5] x86/hvm: Always return the linear address from hvm_virtual_to_linear_addr() Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 2/5] x86/hvm: Raise #SS faults for %ss-based segmentation violations Andrew Cooper
2016-05-10 7:39 ` Jan Beulich
2016-05-10 7:40 ` Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 3/5] x86/hvm: Correct the emulated interaction of invlpg with segments Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 4/5] x86/svm: Don't unconditionally use a new ASID in svm_invlpg_intercept() Andrew Cooper
2016-05-09 19:35 ` Boris Ostrovsky [this message]
2016-05-09 18:27 ` [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions Andrew Cooper
2016-05-09 19:39 ` Boris Ostrovsky
2016-05-10 7:51 ` Jan Beulich
2016-05-10 10:15 ` Andrew Cooper
2016-05-10 10:41 ` Andrew Cooper
2016-05-10 11:02 ` Jan Beulich
2016-05-10 11:03 ` Andrew Cooper
2016-05-10 8:50 ` George Dunlap
2016-05-11 6:42 ` Tian, Kevin
2016-05-10 9:52 ` [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Wei Liu
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=5730E673.9010909@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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.