Re: [PATCH v2 1/1] Documentation/x86: Add the AMX enabling example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux