From: Marc Zyngier <maz@kernel.org>
To: James Morse <james.morse@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Christoffer Dall <christoffer.dall@arm.com>,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu,
Julien Thierry <julien.thierry.kdev@gmail.com>
Subject: Re: [PATCH] arm64/kvm: remove VMID rollover I-cache maintenance
Date: Sun, 18 Aug 2019 18:42:40 +0100 [thread overview]
Message-ID: <20190818184240.507e0716@why> (raw)
In-Reply-To: <1dca0489-9e85-cb8f-b846-b6da65f41773@arm.com>
On Fri, 16 Aug 2019 14:39:31 +0100
James Morse <james.morse@arm.com> wrote:
> Hi Mark,
>
> On 06/08/2019 16:57, Mark Rutland wrote:
> > For VPIPT I-caches, we need I-cache maintenance on VMID rollover to
> > avoid an ABA problem. Consider a single vCPU VM, with a pinned stage-2,
> > running with an idmap VA->IPA and idmap IPA->PA. If we don't do
> > maintenance on rollover:
> >
> > // VMID A
> > Writes insn X to PA 0xF
> > Invalidates PA 0xF (for VMID A)
> >
> > I$ contains [{A,F}->X]
> >
> > [VMID ROLLOVER]
> >
> > // VMID B
> > Writes insn Y to PA 0xF
> > Invalidates PA 0xF (for VMID B)
> >
> > I$ contains [{A,F}->X, {B,F}->Y]
> >
> > [VMID ROLLOVER]
> >
> > // VMID A
> > I$ contains [{A,F}->X, {B,F}->Y]
> >
> > Unexpectedly hits stale I$ line {A,F}->X.
> >
> > However, for PIPT and VIPT I-caches, the VMID doesn't affect lookup or
> > constrain maintenance. Given the VMID doesn't affect PIPT and VIPT
> > I-caches, and given VMID rollover is independent of changes to stage-2
> > mappings, I-cache maintenance cannot be necessary on VMID rollover for
> > PIPT or VIPT I-caches.
> >
> > This patch removes the maintenance on rollover for VIPT and PIPT
> > I-caches. At the same time, the unnecessary colons are removed from the
> > asm statement to make it more legible.
>
> Makes sense!
>
> Reviewed-by: James Morse <james.morse@arm.com>
Queued for 5.4. Thanks both.
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-08-18 17:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 15:57 [PATCH] arm64/kvm: remove VMID rollover I-cache maintenance Mark Rutland
2019-08-16 13:39 ` James Morse
2019-08-18 17:42 ` Marc Zyngier [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=20190818184240.507e0716@why \
--to=maz@kernel.org \
--cc=christoffer.dall@arm.com \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=suzuki.poulose@arm.com \
/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).