[PATCH v1 0/4] arm64: mm: Allow set_direct_map functions on BBML3 systems

Vincent Donnefort vdonnefort at google.com
Fri Sep 18 06:16:52 PDT 2026


This series is a fork of [1] which creates a new CMA pool for FF-A lent
memory which unmaps that memory from the linear map as a mitigation of
CPU speculative access to Secure memory. [1] creates a PTE-level region
to enable setting the direct map, but BBML3 systems shouldn't need it.

Currently, can_set_direct_map() only returns true if a feature forces the
linear map to be mapped at PTE granularity. This prevents systems
supporting BBML3 from enabling set_direct_map*() functions yet safe.

To enable them, this series:

 1. Use the fixmap for hibernation. This removes the need for handling
    atomic context in split_kernel_leaf_mapping().

 2. Breaks the dependency between linear_map_requires_bbml3 and
    can_set_direct_map()

 3. Allow split_kernel_leaf_mapping() even when no feature requires to
    set the direct map.

[1] https://lore.kernel.org/all/20260902104712.2399797-1-vdonnefort@google.com/

Vincent Donnefort (4):
  PM: hibernate: Add arch specific hooks for hibernate_map/unmap_page
  arm64: hibernate: Use fixmap for hibernate_map/unmap_page
  arm64: mm: Introduce linear_map_needs_set() helper
  arm64: mm: Allow can_set_direct_map() on BBML3 systems

 arch/arm64/include/asm/fixmap.h |  3 +++
 arch/arm64/include/asm/mmu.h    |  1 +
 arch/arm64/kernel/hibernate.c   | 12 +++++++++
 arch/arm64/mm/mmu.c             | 46 +++++++++++++++++++++++++--------
 arch/arm64/mm/pageattr.c        | 12 +--------
 include/linux/suspend.h         |  2 ++
 kernel/power/snapshot.c         | 10 ++++---
 7 files changed, 60 insertions(+), 26 deletions(-)


base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
-- 
2.55.0.1082.g2b9226bbc0-goog




More information about the linux-arm-kernel mailing list