From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] arm64: KVM: Add support for VPIPT I-caches
Date: Mon, 20 Mar 2017 16:25:32 +0000 [thread overview]
Message-ID: <20170320162531.GA11066@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <aa5b11a4-2630-db44-e403-db7ef9bfa60c@arm.com>
On Mon, Mar 20, 2017 at 04:22:15PM +0000, Marc Zyngier wrote:
> On 10/03/17 20:32, Will Deacon wrote:
> > A VPIPT I-cache has two main properties:
> >
> > 1. Lines allocated into the cache are tagged by VMID and a lookup can
> > only hit lines that were allocated with the current VMID.
> >
> > 2. I-cache invalidation from EL1/0 only invalidates lines that match the
> > current VMID of the CPU doing the invalidation.
> >
> > This can cause issues with non-VHE configurations, where the host runs
> > at EL1 and wants to invalidate I-cache entries for a guest running with
> > a different VMID. VHE is not affected, because the host runs at EL2 and
> > I-cache invalidation applies as expected.
> >
> > This patch solves the problem by invalidating the I-cache when unmapping
> > a page at stage 2 on a system with a VPIPT I-cache but not running with
> > VHE enabled. Hopefully this is an obscure enough configuration that the
> > overhead isn't anything to worry about, although it does mean that the
> > by-range I-cache invalidation currently performed when mapping at stage
> > 2 can be elided on such systems, because the I-cache will be clean for
> > the guest VMID following a rollover event.
> >
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
[...]
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
>
> It is worth noting that this now conflicts with 68925176296a ("arm64:
> KVM: VHE: Clear HCR_TGE when invalidating guest TLBs"). I've resolved
> it as such in my tree:
Thanks for the ack and conflict resolution. All patches applied to the
arm64 tree.
--
Catalin
prev parent reply other threads:[~2017-03-20 16:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 20:32 [PATCH 1/6] arm64: cpuinfo: remove I-cache VIPT aliasing detection Will Deacon
2017-03-10 20:32 ` [PATCH 2/6] arm64: cacheinfo: Remove CCSIDR-based cache information probing Will Deacon
2017-03-10 20:32 ` [PATCH 3/6] arm64: cache: Remove support for ASID-tagged VIVT I-caches Will Deacon
2017-03-10 20:32 ` [PATCH 4/6] arm64: cache: Merge cachetype.h into cache.h Will Deacon
2017-03-10 20:32 ` [PATCH 5/6] arm64: cache: Identify VPIPT I-caches Will Deacon
2017-03-10 20:32 ` [PATCH 6/6] arm64: KVM: Add support for " Will Deacon
2017-03-20 12:08 ` Mark Rutland
2017-03-20 16:22 ` Marc Zyngier
2017-03-20 16:25 ` Catalin Marinas [this message]
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=20170320162531.GA11066@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).