* [tip: x86/fpu] x86/arch_prctl: Add AMX feature numbers as ABI constants
@ 2023-03-22 20:14 tip-bot2 for Chang S. Bae
2023-03-22 22:02 ` Chang S. Bae
0 siblings, 1 reply; 2+ messages in thread
From: tip-bot2 for Chang S. Bae @ 2023-03-22 20:14 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Chang S. Bae, Dave Hansen, Tony Luck, x86, linux-kernel
The following commit has been merged into the x86/fpu branch of tip:
Commit-ID: a03c376ebaf38394a63a75292329f38a47520c2c
Gitweb: https://git.kernel.org/tip/a03c376ebaf38394a63a75292329f38a47520c2c
Author: Chang S. Bae <chang.seok.bae@intel.com>
AuthorDate: Fri, 20 Jan 2023 16:18:58 -08:00
Committer: Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Wed, 22 Mar 2023 13:02:33 -07:00
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 <chang.seok.bae@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/all/20230121001900.14900-3-chang.seok.bae%40intel.com
---
arch/x86/include/uapi/asm/prctl.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/include/uapi/asm/prctl.h b/arch/x86/include/uapi/asm/prctl.h
index 500b96e..f298c77 100644
--- a/arch/x86/include/uapi/asm/prctl.h
+++ b/arch/x86/include/uapi/asm/prctl.h
@@ -16,6 +16,9 @@
#define ARCH_GET_XCOMP_GUEST_PERM 0x1024
#define ARCH_REQ_XCOMP_GUEST_PERM 0x1025
+#define ARCH_XCOMP_TILECFG 17
+#define ARCH_XCOMP_TILEDATA 18
+
#define ARCH_MAP_VDSO_X32 0x2001
#define ARCH_MAP_VDSO_32 0x2002
#define ARCH_MAP_VDSO_64 0x2003
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [tip: x86/fpu] x86/arch_prctl: Add AMX feature numbers as ABI constants
2023-03-22 20:14 [tip: x86/fpu] x86/arch_prctl: Add AMX feature numbers as ABI constants tip-bot2 for Chang S. Bae
@ 2023-03-22 22:02 ` Chang S. Bae
0 siblings, 0 replies; 2+ messages in thread
From: Chang S. Bae @ 2023-03-22 22:02 UTC (permalink / raw)
To: linux-kernel, linux-tip-commits, Dave Hansen; +Cc: Tony Luck, x86
On 3/22/2023 1:14 PM, tip-bot2 for Chang S. Bae wrote:
> The following commit has been merged into the x86/fpu branch of tip:
>
> 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 ]
Sorry, it looks like I was not diligent enough to explain what those
numbers are and that they are now part of the ABI.
Thank you for the write-up.
Chang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-22 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 20:14 [tip: x86/fpu] x86/arch_prctl: Add AMX feature numbers as ABI constants tip-bot2 for Chang S. Bae
2023-03-22 22:02 ` Chang S. Bae
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®