[PATCH v12 04/10] set_memory: allow querying whether set_direct_map_*() is actually enabled

Catalin Marinas catalin.marinas at arm.com
Wed Nov 25 13:36:45 EST 2020


On Wed, Nov 25, 2020 at 11:22:02AM +0200, Mike Rapoport wrote:
> From: Mike Rapoport <rppt at linux.ibm.com>
> 
> On arm64, set_direct_map_*() functions may return 0 without actually
> changing the linear map. This behaviour can be controlled using kernel
> parameters, so we need a way to determine at runtime whether calls to
> set_direct_map_invalid_noflush() and set_direct_map_default_noflush() have
> any effect.
> 
> Extend set_memory API with can_set_direct_map() function that allows
> checking if calling set_direct_map_*() will actually change the page table,
> replace several occurrences of open coded checks in arm64 with the new
> function and provide a generic stub for architectures that always modify
> page tables upon calls to set_direct_map APIs.
> 
> Signed-off-by: Mike Rapoport <rppt at linux.ibm.com>

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list