mbox series

[v7,0/7] arm64: Reorganize kernel VA space

Message ID 20231213084024.2367360-9-ardb@google.com (mailing list archive)
Headers show
Series arm64: Reorganize kernel VA space | expand

Message

Ard Biesheuvel Dec. 13, 2023, 8:40 a.m. UTC
From: Ard Biesheuvel <ardb@kernel.org>

These seven patches were taken from [0] and tweaked to address the
feedback by Mark Rutland. They reconfigure the upper region of the
kernel VA space so that the vmemmap region can be resized dynamically
on 52-bit builds running on 48-bit-only hardware. This is needed for
LPA2 support.

They can be applied onto the arm62 lpa2-prep branch.

[0] https://lore.kernel.org/all/20231129111555.3594833-43-ardb@google.com

v7:
- add static assert to avoid the fixmap overlapping with the PCI I/O
  region
- avoid deriving VMEMMAP_END from VMEMMAP_START+VMEMMAP_SIZE in ptdump.c
- add ack from Mark

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>

Ard Biesheuvel (7):
  arm64: mm: Move PCI I/O emulation region above the vmemmap region
  arm64: mm: Move fixmap region above vmemmap region
  arm64: ptdump: Allow all region boundaries to be defined at boot time
  arm64: ptdump: Discover start of vmemmap region at runtime
  arm64: vmemmap: Avoid base2 order of struct page size to dimension
    region
  arm64: mm: Reclaim unused vmemmap region for vmalloc use
  arm64: kaslr: Adjust randomization range dynamically

 arch/arm64/include/asm/memory.h    | 14 ++---
 arch/arm64/include/asm/pgtable.h   | 10 ++--
 arch/arm64/kernel/image-vars.h     |  2 +
 arch/arm64/kernel/pi/kaslr_early.c | 11 ++--
 arch/arm64/mm/fixmap.c             |  3 ++
 arch/arm64/mm/ptdump.c             | 56 +++++++++-----------
 6 files changed, 49 insertions(+), 47 deletions(-)

Comments

Catalin Marinas Feb. 9, 2024, 5:33 p.m. UTC | #1
On Wed, 13 Dec 2023 09:40:25 +0100, Ard Biesheuvel wrote:
> These seven patches were taken from [0] and tweaked to address the
> feedback by Mark Rutland. They reconfigure the upper region of the
> kernel VA space so that the vmemmap region can be resized dynamically
> on 52-bit builds running on 48-bit-only hardware. This is needed for
> LPA2 support.
> 
> They can be applied onto the arm62 lpa2-prep branch.
> 
> [...]

Applied to arm64 (for-next/reorg-va-space), thanks!

[1/7] arm64: mm: Move PCI I/O emulation region above the vmemmap region
      https://git.kernel.org/arm64/c/031e011d8b22
[2/7] arm64: mm: Move fixmap region above vmemmap region
      https://git.kernel.org/arm64/c/b730b0f2b1fc
[3/7] arm64: ptdump: Allow all region boundaries to be defined at boot time
      https://git.kernel.org/arm64/c/34f879fbe461
[4/7] arm64: ptdump: Discover start of vmemmap region at runtime
      https://git.kernel.org/arm64/c/f9cca2444187
[5/7] arm64: vmemmap: Avoid base2 order of struct page size to dimension region
      https://git.kernel.org/arm64/c/32697ff38287
[6/7] arm64: mm: Reclaim unused vmemmap region for vmalloc use
      https://git.kernel.org/arm64/c/d432b8d57c0c
[7/7] arm64: kaslr: Adjust randomization range dynamically
      https://git.kernel.org/arm64/c/3567fa63cb56