lkml.org 
[lkml]   [2022]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 1/1] Documentation/x86: Add the AMX enabling example
On 6/29/2022 4:30 PM, Luck, Tony wrote:
> + #define ARCH_GET_XCOMP_SUPP 0x1021
> +
> + #define XFEATURE_XTILECFG 17
> + #define XFEATURE_XTILEDATA 18
>
> What's the long-term plan for these #defines? I see that ARCH_GET_XCOMP_SUPP
> is in arch/x86/include/uapi/asm/prctl.h ... so eventually that will show up in distribution
> /usr/include/asm/prctl.h courtesy of a glibc update.
>
> But the XFEATURE bits aren't in a "uapi" file. They are an "enum" in:
>
> arch/x86/include/asm/fpu/types.h
>
> How will that get to /usr/include?

Perhaps I can think of something like this for AMX state:

diff --git a/arch/x86/include/uapi/asm/prctl.h
b/arch/x86/include/uapi/asm/prctl.h
index 500b96e71f18..08b6c9155b8a 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_XTILECFG 17
+#define ARCH_XCOMP_XTILEDATA 18
+
#define ARCH_MAP_VDSO_X32 0x2001
#define ARCH_MAP_VDSO_32 0x2002
#define ARCH_MAP_VDSO_64 0x2003
But these state components are architectural. While this can help
userspace anyway, saying "XSTATE component" here and on the man-page is
probably it as they are already defined in the x86 spec.

Thanks,
Chang

\
 
 \ /
  Last update: 2022-06-30 17:27    [W:0.178 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site