Skip to content

arm64: Disabling SVE/SME from the command-line

Marc Zyngier linux-arm-kernel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 6 repliesIn review
  2. v16 patches 10 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9arm64: Rename the VHE switch to "finalise_el2"Documentation/virt/kvm/arm/hyp-abi.rst arch/arm64/include/asm/virt.h arch/arm64/kernel/head.S +2 more+22 -220 replies
2/9arm64: Save state of HCR_EL2.E2H before switch to EL1arch/arm64/include/asm/virt.h arch/arm64/kernel/head.S arch/arm64/kernel/idreg-override.c+20 -50 replies
3/9arm64: Allow sticky E2H when entering EL1arch/arm64/kernel/head.S+10 -240 replies
4/9arm64: Factor out checking of a feature against the override into a macroarch/arm64/kernel/hyp-stub.S+20 -140 replies
5/9arm64: Allow the idreg override to deal with variable field widtharch/arm64/kernel/idreg-override.c+16 -121 reply
6/9arm64: Expose a __check_override primitive for oddball featuresarch/arm64/kernel/hyp-stub.S+11 -61 reply
7/9arm64: Add the arm64.nosme command line optionDocumentation/admin-guide/kernel-parameters.txt arch/arm64/include/asm/cpufeature.h arch/arm64/include/asm/el2_setup.h +3 more+65 -461 reply
8/9arm64: Add the arm64.nosve command line optionDocumentation/admin-guide/kernel-parameters.txt arch/arm64/include/asm/cpufeature.h arch/arm64/include/asm/el2_setup.h +3 more+48 -171 reply
9/9arm64: Add an override for ID_AA64SMFR0_EL1.FA64arch/arm64/kernel/hyp-stub.S arch/arm64/kernel/idreg-override.c+19 -71 reply

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchMark Brown
1/9
2/9
3/9
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/9] arm64: Disabling SVE/SME from the command-line

This very short series reworks the way arm64 CPUs boot (yes, again) in order to opt out of some features early at boot, on top of the existing VHE-forced-into-nVHE use case and using the same idreg override infrastructure.

The main victim here is SVE, because it seems that people have all sort of broken firmware out there, and that a distribution kernel cannot boot on that. And since we have a dependency between SVE and SME, disabling the former also disables the latter.

The only positive aspect about this series is that it unifies the way the VHE-stuck CPUs boot with way the full-fat CPUs do (everybody takes a trip to EL1 before coming back to EL2, instead of the stay-at-EL2 approach we currently have). A small victory, which allows us to control the EL2 setup code more easily.

Note that the SME code is totally untested (I don't have a model with that), but it looks obviously correct ;-), and that my SVE "platform" has a working firmware...

* From v1:
- Fixed glaring bug spotted by Mark where CPTR_EL2 was never really written to...
- Don't write the E2H tracking flag to memory, since Ard reworked the boot flow to avoid writing to RAM without the MMU on
- Added an explicit way to disable FA64 independently from SME
- Made the override code able to deal with arbitrary field widths to deal with FA64 (a single-bit field...)
- Now rebased on top of arm64/for-next/boot

Marc Zyngier (9):
arm64: Rename the VHE switch to "finalise_el2"
arm64: Save state of HCR_EL2.E2H before switch to EL1
arm64: Allow sticky E2H when entering EL1
arm64: Factor out checking of a feature against the override into a
macro
arm64: Allow the idreg override to deal with variable field width
arm64: Expose a __check_override primitive for oddball features
arm64: Add the arm64.nosme command line option
arm64: Add the arm64.nosve command line option
arm64: Add an override for ID_AA64SMFR0_EL1.FA64

 .../admin-guide/kernel-parameters.txt         |   6 +
 Documentation/virt/kvm/arm/hyp-abi.rst        |  11 +-
 arch/arm64/include/asm/cpufeature.h           |   3 +
 arch/arm64/include/asm/el2_setup.h            |  60 ----------
 arch/arm64/include/asm/virt.h                 |  11 +-
 arch/arm64/kernel/cpufeature.c                |  12 +-
 arch/arm64/kernel/head.S                      |  43 +++----
 arch/arm64/kernel/hyp-stub.S                  | 113 ++++++++++++++----
 arch/arm64/kernel/idreg-override.c            |  93 +++++++++++---
 arch/arm64/kernel/sleep.S                     |   2 +-
 10 files changed, 216 insertions(+), 138 deletions(-)
Signature · 7 lines
2.34.1


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