Skip to content

arm64: mm: Model LVA support as a CPU feature

Ard Biesheuvel linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: mm: get rid of kimage_vaddr global variablearch/arm64/include/asm/memory.h arch/arm64/kernel/head.S arch/arm64/mm/mmu.c+3 -81 reply
2/3arm64: mm: Handle LVA support as a CPU featurearch/arm64/include/asm/memory.h arch/arm64/kernel/cpufeature.c arch/arm64/kernel/head.S +5 more+39 -398 replies
3/3arm64: mm: Add feature override support for LVA and E0PDarch/arm64/include/asm/assembler.h arch/arm64/include/asm/cpufeature.h arch/arm64/kernel/cpufeature.c +3 more+28 -92 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchCatalin Marinas
1/3A-b
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH 0/3] arm64: mm: Model LVA support as a CPU feature

Treat LVA support (52-bit virtual addressing) as a CPU feature so we can rely on code patching, reporting and overrides as usual.

Currently, we enable LVA really early, and have special treatment of it in the boot paths. However, given that both the ID map and the TTBR1 mapping of the kernel image are guarenteed to require 48 bits at most, we can boot with 48-bit virtual addressing initially, and switch to 52-bit addressing once we are running from C code and have parsed the command line to look for CPU feature overrides.

Patch #1 is a drive-by cleanup that can be applied independently.

Patch #2 creates the LVA CPU feature and wires it up.

Patch #3 introduces the MMFR2 CPU feature override, as well as a arm64.nolva command line option to force 48-bit virtual addressing even if the CPU supports LVA. While at it, E0PD is wired up as an override as well, given that it sits in MMFR2 as well, and that its value is taken into account very early too.

Note that this applies onto my series that further refactors the boot code [0], after a previous refactor landed in v6.0.

[0] https://lore.kernel.org/all/[email protected]/

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Anshuman Khandual <[email protected]>
Cc Joey Gouly <[email protected]>

Ard Biesheuvel (3):
arm64: mm: get rid of kimage_vaddr global variable
arm64: mm: Handle LVA support as a CPU feature
arm64: mm: Add feature override support for LVA and E0PD

 arch/arm64/include/asm/assembler.h    | 17 +++++++------
 arch/arm64/include/asm/cpufeature.h   |  1 +
 arch/arm64/include/asm/memory.h       | 10 ++++----
 arch/arm64/kernel/cpufeature.c        | 19 +++++++++++++-
 arch/arm64/kernel/head.S              | 26 +++-----------------
 arch/arm64/kernel/image-vars.h        |  1 +
 arch/arm64/kernel/pi/idreg-override.c |  8 +++++-
 arch/arm64/kernel/pi/map_kernel.c     | 16 ++++++++++++
 arch/arm64/kernel/sleep.S             |  3 ---
 arch/arm64/mm/mmu.c                   |  8 ------
 arch/arm64/mm/proc.S                  | 16 ++++++------
 arch/arm64/tools/cpucaps              |  1 +
 12 files changed, 70 insertions(+), 56 deletions(-)
Signature · 7 lines
2.35.1


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