mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
IOMMU and SVA-capable devices know nothing about LAM and only expect canonical addresses. An attempt to pass down tagged pointer will lead to address translation failure. 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. By using the arch_prctl() userspace takes responsibility to never pass tagged address to the device. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Ashok Raj <ashok.raj@intel.com> Reviewed-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/all/20230312112612.31869-12-kirill.shutemov%40linux.intel.com
29 lines
771 B
C
29 lines
771 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _ASM_X86_PRCTL_H
|
|
#define _ASM_X86_PRCTL_H
|
|
|
|
#define ARCH_SET_GS 0x1001
|
|
#define ARCH_SET_FS 0x1002
|
|
#define ARCH_GET_FS 0x1003
|
|
#define ARCH_GET_GS 0x1004
|
|
|
|
#define ARCH_GET_CPUID 0x1011
|
|
#define ARCH_SET_CPUID 0x1012
|
|
|
|
#define ARCH_GET_XCOMP_SUPP 0x1021
|
|
#define ARCH_GET_XCOMP_PERM 0x1022
|
|
#define ARCH_REQ_XCOMP_PERM 0x1023
|
|
#define ARCH_GET_XCOMP_GUEST_PERM 0x1024
|
|
#define ARCH_REQ_XCOMP_GUEST_PERM 0x1025
|
|
|
|
#define ARCH_MAP_VDSO_X32 0x2001
|
|
#define ARCH_MAP_VDSO_32 0x2002
|
|
#define ARCH_MAP_VDSO_64 0x2003
|
|
|
|
#define ARCH_GET_UNTAG_MASK 0x4001
|
|
#define ARCH_ENABLE_TAGGED_ADDR 0x4002
|
|
#define ARCH_GET_MAX_TAG_BITS 0x4003
|
|
#define ARCH_FORCE_TAGGED_SVA 0x4004
|
|
|
|
#endif /* _ASM_X86_PRCTL_H */
|