selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking
authorWeihong Zhang <weihong.zhang@intel.com>
Sun, 12 Mar 2023 11:26:11 +0000 (14:26 +0300)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 16 Mar 2023 20:08:40 +0000 (13:08 -0700)
commit34821473deb3a56adf5e989e8cefd8bfc60ed216
tree325086a597443f54ef8b2085ee97c0b1f9e8f780
parent833c12ce0f4307675beb60b194833c6c7cb506d7
selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking

By default do not allow to enable both LAM and use SVA in the same
process.
The new ARCH_FORCE_TAGGED_SVA arch_prctl() overrides the limitation.

Add new test cases for the new arch_prctl:
Before using ARCH_FORCE_TAGGED_SVA, should not allow to enable LAM/SVA
coexisting. the test cases should be negative.

The test depands on idxd driver and iommu. before test, need add
"intel_iommu=on,sm_on" in kernel command line and insmod idxd driver.

Signed-off-by: Weihong Zhang <weihong.zhang@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20230312112612.31869-17-kirill.shutemov%40linux.intel.com
tools/testing/selftests/x86/lam.c