linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: Get rid of CnP
@ 2023-06-01 14:24 Marc Zyngier
  2023-06-01 14:24 ` [PATCH 1/5] arm64: Remove CnP detection Marc Zyngier
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Marc Zyngier @ 2023-06-01 14:24 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm
  Cc: Catalin Marinas, Will Deacon, Mark Rutland, Ard Biesheuvel,
	James Morse, Suzuki K Poulose, Oliver Upton, Zenghui Yu,
	Vladimir Murzin

FEAT_TTCNP (née ARMv8.2-TTCNP, "Translation table Common not private
translations", commonly known as CnP) was an attempt at allowing the
sharing of TLBs in a SMT implementation. This was an interesting idea,
but it never really went anywhere:

- There is only one implementation from ARM (Cortex-A65) that could
  (conditional) be capable of using it, but this thing has never been
  seen in the wild (shout if you have one!)

- There is one implementation from NVIDIA (Carmel) that has a
  messed-up TLB invalidation "feature" that prevents the use of CnP

- The only other SMT implementation (Cavium-TX2) predates CnP, so it
  doesn't implement it

- All the modern CPUs (which are not SMT) advertise CnP (it is
  mandatory from ARMv8.2), but of course don't implement anything

- And then we all discovered what Side Channel attacks were...

CnP also makes reasoning about TLBs harder, as it blurs the idea that
a CPU only has private TLBs. Now another CPU (thread) can hit in your
TLBs in weird ways, and sequencing the enabling of CnP requires some
fragile coordination.

So farewell, CnP. It is very unlikely we'll miss you.

This series removes most traces of CnP, only keeping some basic
definitions for documentation purpose. It doesn't amount to much code,
but it feels like we're better off without it.

Marc Zyngier (5):
  arm64: Remove CnP detection
  arm64: Drop NVIDIA Carmel CnP workaround
  arm64: Drop support for CnP
  KVM: arm64: Remove CnP usage
  arm64: Remove CONFIG_ARM64_CNP

 Documentation/arm64/silicon-errata.rst |  2 --
 arch/arm64/Kconfig                     | 24 ------------------
 arch/arm64/include/asm/cpufeature.h    |  6 -----
 arch/arm64/include/asm/kvm_mmu.h       |  3 +--
 arch/arm64/include/asm/mmu_context.h   | 14 +----------
 arch/arm64/kernel/cpu_errata.c         |  8 ------
 arch/arm64/kernel/cpufeature.c         | 34 --------------------------
 arch/arm64/kernel/mte.c                | 12 ---------
 arch/arm64/kernel/suspend.c            |  4 ---
 arch/arm64/kvm/hyp/nvhe/hyp-init.S     |  6 -----
 arch/arm64/mm/context.c                |  7 ------
 arch/arm64/tools/cpucaps               |  2 --
 12 files changed, 2 insertions(+), 120 deletions(-)

-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-02  8:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01 14:24 [PATCH 0/5] arm64: Get rid of CnP Marc Zyngier
2023-06-01 14:24 ` [PATCH 1/5] arm64: Remove CnP detection Marc Zyngier
2023-06-01 14:24 ` [PATCH 2/5] arm64: Drop NVIDIA Carmel CnP workaround Marc Zyngier
2023-06-01 14:24 ` [PATCH 3/5] arm64: Drop support for CnP Marc Zyngier
2023-06-01 14:24 ` [PATCH 4/5] KVM: arm64: Remove CnP usage Marc Zyngier
2023-06-01 14:24 ` [PATCH 5/5] arm64: Remove CONFIG_ARM64_CNP Marc Zyngier
2023-06-01 14:31 ` [PATCH 0/5] arm64: Get rid of CnP Marc Zyngier
2023-06-02  8:41 ` Vladimir Murzin

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).