[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c67d453-a162-b61d-4a27-c854f1ef3587@intel.com>
Date: Thu, 30 Jun 2022 08:26:54 -0700
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Brown, Len" <len.brown@...el.com>,
"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
"Chatre, Reinette" <reinette.chatre@...el.com>,
"Williams, Dan J" <dan.j.williams@...el.com>
CC: "corbet@....net" <corbet@....net>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-man@...r.kernel.org" <linux-man@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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
Powered by blists - more mailing lists