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

From
Catalin Marinas <catalin.marinas@arm.com>
Date
2020-11-25 18:37:13
Also in
linux-arch, linux-arm-kernel, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml, nvdimm
Reply to
Mike Rapoport, 2020-11-25
On Wed, Nov 25, 2020 at 11:22:02AM +0200, Mike Rapoport wrote:
From: Mike Rapoport <redacted>

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 <redacted>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Thread (18 messages) 18 messages, 6 authors, last reply 2020-11-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help