Skip to content

arm64: Get rid of CnP

Marc Zyngier kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5arm64: Remove CnP detectionarch/arm64/kernel/cpufeature.c+0 -270 replies
2/5arm64: Drop NVIDIA Carmel CnP workaroundDocumentation/arm64/silicon-errata.rst arch/arm64/Kconfig arch/arm64/kernel/cpu_errata.c +1 more+0 -210 replies
3/5arm64: Drop support for CnParch/arm64/include/asm/mmu_context.h arch/arm64/kernel/cpufeature.c arch/arm64/kernel/mte.c +2 more+1 -430 replies
4/5KVM: arm64: Remove CnP usagearch/arm64/include/asm/kvm_mmu.h arch/arm64/kvm/hyp/nvhe/hyp-init.S+1 -80 replies
5/5arm64: Remove CONFIG_ARM64_CNParch/arm64/Kconfig arch/arm64/include/asm/cpufeature.h arch/arm64/tools/cpucaps+0 -210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] arm64: Get rid of CnP

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(-)
Signature · 7 lines
2.39.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel