All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
	oupton@kernel.org, ryan.roberts@arm.com, will@kernel.org
Subject: Re: [PATCH 0/2] arm64: tlb: Optimize ARM64_WORKAROUND_REPEAT_TLBI
Date: Thu, 26 Feb 2026 08:58:13 +0000	[thread overview]
Message-ID: <868qcfankq.wl-maz@kernel.org> (raw)
In-Reply-To: <20260218164348.2022831-1-mark.rutland@arm.com>

On Wed, 18 Feb 2026 16:43:46 +0000,
Mark Rutland <mark.rutland@arm.com> wrote:
> 
> Hi all,
> 
> Some Arm partners have complained that the overhead of
> ARM64_WORKAROUND_REPEAT_TLBI is too large, and despite the relevant
> errata being categorized as "rare", they still want to use the
> workaround in some deployments.
> 
> For historical reasons, the current workaround is far stronger (and
> consequently far more expensive) than necessary. In part, the SDENs had
> somewhat misleading descriptions, which have recently been clarified:
> 
> * Arm Cortex-A76 erratum #1286807
>   SDEN v33: https://developer.arm.com/documentation/SDEN-885749/33-0/
> 
> * Arm Cortex-A55 erratum #2441007
>   SDEN v16: https://developer.arm.com/documentation/SDEN-859338/1600/
> 
> * Arm Cortex-A510 erratum #2441009
>   SDEN v19: https://developer.arm.com/documentation/SDEN-1873351/1900/
> 
> Patch 1 allows the __TLBI*() helpers to generate XZR as an argument.
> I've split this out as its own patch to make bisection easier in case we
> see any problems due to incorrect trap+emulation handling of XZR.
> Otherwise this shouldn't have any functional change.
> 
> Patch 2 is the actual optimization, spelled out in detail in the commit
> message. The gist is that it's not necessary to duplicate every
> individual TLBI, and it's sufficient to have a single arbitrary TLBI;DSB
> after any number of batched TLBIs;DSB.
> 
> As mentioned in the commit message for patch 2, this results in fewer
> alternatives and better code generation whenever
> ARM64_WORKAROUND_REPEAT_TLBI is built into the kernel, so it's a
> (trivial) win on hardware that isn't affected by the relevant errata.
> 
> Mark.
> 
> Mark Rutland (2):
>   arm64: tlb: Allow XZR argument to TLBI ops
>   arm64: tlb: Optimize ARM64_WORKAROUND_REPEAT_TLBI
> 
>  arch/arm64/include/asm/tlbflush.h | 63 ++++++++++++++++++-------------
>  arch/arm64/kernel/sys_compat.c    |  2 +-
>  arch/arm64/kvm/hyp/nvhe/mm.c      |  2 +-
>  arch/arm64/kvm/hyp/nvhe/tlb.c     |  8 ++--
>  arch/arm64/kvm/hyp/pgtable.c      |  2 +-
>  arch/arm64/kvm/hyp/vhe/tlb.c      | 10 ++---
>  6 files changed, 49 insertions(+), 38 deletions(-)
> 

A bit late, but FTR,

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.


      parent reply	other threads:[~2026-02-26  9:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 16:43 [PATCH 0/2] arm64: tlb: Optimize ARM64_WORKAROUND_REPEAT_TLBI Mark Rutland
2026-02-18 16:43 ` [PATCH 1/2] arm64: tlb: Allow XZR argument to TLBI ops Mark Rutland
2026-02-18 16:43 ` [PATCH 2/2] arm64: tlb: Optimize ARM64_WORKAROUND_REPEAT_TLBI Mark Rutland
2026-02-26  0:06 ` [PATCH 0/2] " Will Deacon
2026-02-26  8:58 ` 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=868qcfankq.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=oupton@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.