From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras <pmac@au1.ibm.com>
Subject: Re: [PATCH 2/2] powerpc/64s/radix: Explicitly flush ERAT with local LPID invalidation
Date: Mon, 27 Aug 2018 19:11:16 +1000 [thread overview]
Message-ID: <20180827191116.4c013e8a@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <9fd2cb24976fc3b4534d7ab6186032ac4e27c9d5.camel@kernel.crashing.org>
On Mon, 27 Aug 2018 18:16:05 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Mon, 2018-08-27 at 13:03 +1000, Nicholas Piggin wrote:
> > Local radix TLB flush operations that operate on congruence classes
> > have explicit ERAT flushes for POWER9. The process scoped LPID flush
> > did not have a flush, so add it. =20
>=20
> Paul, is that an actual bug ? I think the ERAT is flushed on LPID
> changes...
We also have a PPC_INVALIDATE_ERAT in tlbiel_lpid. I'd like to add some
comments for these things because I'm not entirely clear on them myself.
The P9 UM says, "Additionally, mtpidr and mtlpidr instructions perform
an implicit slbia with IH =3D x=E2=80=983=E2=80=99."
Although slbia IH=3D3 does not appear to invalidate LPID!=3D0 && PID=3D=3D0
entries (guest OS mappigs).
The UM also says that tlbiels will clear the involved ERATs, but this
might not match hardware?
Thanks,
Nick
>=20
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> > arch/powerpc/mm/tlb-radix.c | 1 +
> > 1 file changed, 1 insertion(+)
> >=20
> > diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
> > index fef3e1eb3a19..4e798f33c530 100644
> > --- a/arch/powerpc/mm/tlb-radix.c
> > +++ b/arch/powerpc/mm/tlb-radix.c
> > @@ -366,6 +366,7 @@ static inline void _tlbiel_lpid_guest(unsigned long=
lpid, unsigned long ric)
> > __tlbiel_lpid_guest(lpid, set, RIC_FLUSH_TLB);
> > =20
> > asm volatile("ptesync": : :"memory");
> > + asm volatile(PPC_INVALIDATE_ERAT : : :"memory");
> > }
> > =20
> > =20
>=20
next prev parent reply other threads:[~2018-08-27 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 3:03 [PATCH 0/2] ERAT invalidation fixes Nicholas Piggin
2018-08-27 3:03 ` [PATCH 1/2] powerpc/64s/hash: do not use PPC_INVALIDATE_ERAT on CPUs before POWER9 Nicholas Piggin
2018-10-15 4:00 ` [1/2] " Michael Ellerman
2018-08-27 3:03 ` [PATCH 2/2] powerpc/64s/radix: Explicitly flush ERAT with local LPID invalidation Nicholas Piggin
2018-08-27 8:16 ` Benjamin Herrenschmidt
2018-08-27 9:11 ` Nicholas Piggin [this message]
2018-08-27 9:17 ` Nicholas Piggin
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=20180827191116.4c013e8a@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pmac@au1.ibm.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).