]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/lam: Skip test if LAM is disabled
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Mon, 27 Jan 2025 15:31:56 +0000 (16:31 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 22 Feb 2025 12:17:07 +0000 (13:17 +0100)
commit51f909dcd178655b104d979a6870535268724498
tree45017bc22b1b6e5b21b2830b607c99a7c11fb00c
parentec8f5b4659b4044db55e1f7d947703dd4948626c
selftests/lam: Skip test if LAM is disabled

Until LASS is merged into the kernel:

  https://lore.kernel.org/all/20241028160917.1380714-1-alexander.shishkin@linux.intel.com/

LAM is left disabled in the config file. Running the LAM selftest with
disabled LAM only results in unhelpful output.

Use one of LAM syscalls() to determine whether the kernel was compiled
with LAM support (CONFIG_ADDRESS_MASKING) or not. Skip running the tests
in the latter case.

Merge CPUID checking function with the one mentioned above to achieve a
single function that shows LAM's availability from both CPU and the
kernel.

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/251d0f45f6a768030115e8d04bc85458910cb0dc.1737990375.git.maciej.wieczor-retman@intel.com
tools/testing/selftests/x86/lam.c