Skip to content

Commit a03c376

Browse files
ChangSeokBaehansendc
authored andcommitted
x86/arch_prctl: Add AMX feature numbers as ABI constants
Each distinct XSAVE feature has a number assigned to it. Among other things, the number determines the ordering of features in the XSAVE buffer and is also used to generate XSAVE bitmasks like the value for XCR0. AMX state is dynamically enabled by the architecture-specific prctl(). This prctl() takes one XSAVE feature number as an argument. However, the feature numbers are not defined in any readily available userspace headers. The means that each userspace app trying to use dynamic feature prctl()s will likely end up defining their own constants for each feature. Since these feature numbers are a part of the uabi, expose them in the prctl() uabi header. Save everyone the trouble of looking them up and defining their own. [ dhansen: expand changelog a bit ] Signed-off-by: Chang S. Bae <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/all/20230121001900.14900-3-chang.seok.bae%40intel.com
1 parent ad9c29f commit a03c376

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/include/uapi/asm/prctl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#define ARCH_GET_XCOMP_GUEST_PERM 0x1024
1717
#define ARCH_REQ_XCOMP_GUEST_PERM 0x1025
1818

19+
#define ARCH_XCOMP_TILECFG 17
20+
#define ARCH_XCOMP_TILEDATA 18
21+
1922
#define ARCH_MAP_VDSO_X32 0x2001
2023
#define ARCH_MAP_VDSO_32 0x2002
2124
#define ARCH_MAP_VDSO_64 0x2003

0 commit comments

Comments
 (0)