From: Will Deacon <will@kernel.org>
To: "Ivan T. Ivanov" <iivanov@suse.de>
Cc: Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Brown <broonie@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Dong Aisheng <aisheng.dong@nxp.com>, Frank Li <frank.li@nxp.com>,
Jason Liu <jason.hui.liu@nxp.com>,
linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com
Subject: Re: [PATCH v2] arm64: errata: Add NXP iMX8QM workaround for A53 Cache coherency issue
Date: Mon, 26 Jun 2023 13:15:29 +0100 [thread overview]
Message-ID: <20230626121528.GA19941@willie-the-truck> (raw)
In-Reply-To: <y5lcrztej6th7z3eoihiiazwwlidyhi3t2tkdjrmgcghqwt6bs@dzxxpmwfynj6>
On Mon, Jun 12, 2023 at 01:22:37PM +0300, Ivan T. Ivanov wrote:
> On 06-12 10:33, Mark Rutland wrote:
> > I'm saying that the *faulting logic* is local, not the broadcast.
> >
> > IIUC the erratum is due to the wiring between clusters losing some bits. The
> > *recipient* of a broadcast DVM message (which is what TLBI or IC instructions
> > will generate) will receive a bogus address (and other context) to use for the
> > invalidate.
> >
> > The CPU which executes the `IC IVAU <Xt>` instruction will check the address in
> > `<Xt>` using its local MMU to determine whether the access should fault
> > *before* sending the broadcast DVM message, and the recipients will not perform
> > any MMU check (since e.g. they could be running a different process with a
> > different VA space anyway).
> >
> > The MMU check is local to the CPU, and doesn't depend on any broadcast; that
> > should be unaffected by the erratum. If that is affected then the erratum
> > description is wrong and we have a bigger set of problems.
> >
>
> Thanks, I think I get it. Now, what will be preferred way to fix IC
> TLBI instructions for this errata? Using static_key for TLBI and
> alternatives for IC instruction or something else?
As I mentioned in a previous comment, I think this should use a static_key
to drive the high-level behaviour instead of patching the low-level code
with alternatives.
> Keep trapping userspace IC instruction seems ok to me. Perhaps
> alternative for IC in invalidate_icache_by_line macro? About
> TLBI, it will be really invasive if static_key is used, I think.
> Yes, there is over invalidation, but still overall performance of
> SoC is almost doubled because of enabled 2 CA72 :-)
>
> Another point is, should I keep hunk in arm-smmu.c, because
> cpus_have_final_cap() is not generally available for drivers?
What do you mean here? We obviously can't break the build, but I think
the easiest thing to do is add a clause to `arm_smmu_sva_supported()`
to return false if this erratum is present.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-06-26 12:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 11:29 [PATCH v2] arm64: errata: Add NXP iMX8QM workaround for A53 Cache coherency issue Ivan T. Ivanov
2023-05-18 11:59 ` Ivan T. Ivanov
2023-06-02 10:34 ` Will Deacon
2023-06-08 13:39 ` Ivan T. Ivanov
2023-06-08 14:16 ` Mark Rutland
2023-06-08 15:05 ` Ivan T. Ivanov
2023-06-08 15:32 ` Mark Rutland
2023-06-08 18:22 ` Ivan T. Ivanov
[not found] ` <ZIbmNNc6/pfYG92D@FVFF77S0Q05N>
[not found] ` <y5lcrztej6th7z3eoihiiazwwlidyhi3t2tkdjrmgcghqwt6bs@dzxxpmwfynj6>
2023-06-26 12:15 ` Will Deacon [this message]
2023-07-13 14:29 ` Ivan T. Ivanov
2025-12-10 7:45 ` Francesco Dolcini
2025-12-10 11:39 ` Ivan T. Ivanov
2025-12-10 14:55 ` [EXT] " Frank Li
2025-12-11 10:43 ` Francesco Dolcini
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=20230626121528.GA19941@willie-the-truck \
--to=will@kernel.org \
--cc=aisheng.dong@nxp.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=frank.li@nxp.com \
--cc=iivanov@suse.de \
--cc=jason.hui.liu@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=mark.rutland@arm.com \
--cc=shawnguo@kernel.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