]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/lam: Move cpu_has_la57() to use cpuinfo flag
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Mon, 27 Jan 2025 15:31:55 +0000 (16:31 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 22 Feb 2025 12:17:07 +0000 (13:17 +0100)
commitec8f5b4659b4044db55e1f7d947703dd4948626c
treed7e94201e2dfda796639784b9be02ed1a81c066c
parent7ffb791423c7c518269a9aad35039ef824a40adb
selftests/lam: Move cpu_has_la57() to use cpuinfo flag

In current form cpu_has_la57() reports platform's support for LA57
through reading the output of cpuid. A much more useful information is
whether 5-level paging is actually enabled on the running system.

Check whether 5-level paging is enabled by trying to map a page in the
high linear address space.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/8b1ca51b13e6d94b5a42b6930d81b692cbb0bcbb.1737990375.git.maciej.wieczor-retman@intel.com
tools/testing/selftests/x86/lam.c