From: Wei Liu <wl@xen.org>
To: Jan Beulich <jbeulich@suse.com>
Cc: Wei Liu <wl@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>,
George Dunlap <george.dunlap@citrix.com>,
xen-devel@lists.xenproject.org,
Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag
Date: Mon, 27 Apr 2020 11:12:35 +0100 [thread overview]
Message-ID: <20200427101235.6xko3lvt3qajo64m@debian> (raw)
In-Reply-To: <59e48d80-8ce1-3f3d-c07e-5117adea272a@suse.com>
On Thu, Apr 23, 2020 at 06:33:49PM +0200, Jan Beulich wrote:
> On 23.04.2020 16:56, Roger Pau Monne wrote:
> > Introduce a specific flag to request a HVM guest linear TLB flush,
> > which is an ASID/VPID tickle that forces a guest linear to guest
> > physical TLB flush for all HVM guests.
> >
> > This was previously unconditionally done in each pre_flush call, but
> > that's not required: HVM guests not using shadow don't require linear
> > TLB flushes as Xen doesn't modify the pages tables the guest runs on
> > in that case (ie: when using HAP). Note that shadow paging code
> > already takes care of issuing the necessary flushes when the shadow
> > page tables are modified.
> >
> > In order to keep the previous behavior modify all shadow code TLB
> > flushes to also flush the guest linear to physical TLB if the guest is
> > HVM. I haven't looked at each specific shadow code TLB flush in order
> > to figure out whether it actually requires a guest TLB flush or not,
> > so there might be room for improvement in that regard.
> >
> > Also perform ASID/VPID flushes when modifying the p2m tables as it's a
> > requirement for AMD hardware. Finally keep the flush in
> > switch_cr3_cr4, as it's not clear whether code could rely on
> > switch_cr3_cr4 also performing a guest linear TLB flush. A following
> > patch can remove the ASID/VPID tickle from switch_cr3_cr4 if found to
> > not be necessary.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
Tim, ICYMI, this patch needs your ack.
Wei.
next prev parent reply other threads:[~2020-04-27 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 14:56 [PATCH v11 0/3] x86/guest: use assisted TLB flush in guest mode Roger Pau Monne
2020-04-23 14:56 ` [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag Roger Pau Monne
2020-04-23 16:33 ` Jan Beulich
2020-04-27 10:12 ` Wei Liu [this message]
2020-04-27 10:32 ` Roger Pau Monné
2020-04-29 6:07 ` Tim Deegan
2020-04-23 14:56 ` [PATCH v11 2/3] x86/tlb: allow disabling the TLB clock Roger Pau Monne
2020-04-23 14:56 ` [PATCH v11 3/3] x86/tlb: use Xen L0 assisted TLB flush when available Roger Pau Monne
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=20200427101235.6xko3lvt3qajo64m@debian \
--to=wl@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).