[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <633fcf4e77283018e7e72e333edb942db18140cc.camel@intel.com>
Date: Fri, 23 May 2025 00:18:28 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Reshetova, Elena" <elena.reshetova@...el.com>, "Hansen, Dave"
<dave.hansen@...el.com>
CC: "Raynor, Scott" <scott.raynor@...el.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "mingo@...nel.org" <mingo@...nel.org>, "Scarlata,
Vincent R" <vincent.r.scarlata@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"jarkko@...nel.org" <jarkko@...nel.org>, "Annapurve, Vishal"
<vannapurve@...gle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Mallick, Asit K" <asit.k.mallick@...el.com>,
"Aktas, Erdem" <erdemaktas@...gle.com>, "Cai, Chong" <chongc@...gle.com>,
"bondarn@...gle.com" <bondarn@...gle.com>, "linux-sgx@...r.kernel.org"
<linux-sgx@...r.kernel.org>, "dionnaglaze@...gle.com"
<dionnaglaze@...gle.com>
Subject: Re: [PATCH v6 2/5] x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN
feature flag
On Thu, 2025-05-22 at 12:21 +0300, Elena Reshetova wrote:
> --- a/tools/arch/x86/include/asm/cpufeatures.h
> +++ b/tools/arch/x86/include/asm/cpufeatures.h
> @@ -481,6 +481,7 @@
> #define X86_FEATURE_AMD_HTR_CORES (21*32+ 6) /* Heterogeneous Core Topology */
> #define X86_FEATURE_AMD_WORKLOAD_CLASS (21*32+ 7) /* Workload Classification */
> #define X86_FEATURE_PREFER_YMM (21*32+ 8) /* Avoid ZMM registers due to downclocking */
> +#define X86_FEATURE_SGX_EUPDATESVN (21*32+11) /* Support for ENCLS[EUPDATESVN] instruction */
[Sorry for not mentioning in the previous version.]
Nit:
I am not sure we need to change tool headers.
Per commit
f6d9883f8e68 ("tools/include: Sync x86 headers with the kernel sources")
.. and tools/include/uapi/README:
...
What we are doing now is a third option:
- A software-enforced copy-on-write mechanism of kernel headers to
tooling, driven by non-fatal warnings on the tooling side build when
kernel headers get modified:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
...
The tooling policy is to always pick up the kernel side headers as-is,
and integate them into the tooling build. The warnings above serve as a
notification to tooling maintainers that there's changes on the kernel
side.
We've been using this for many years now, and it might seem hacky, but
works surprisingly well.
.. I interpret the updating to tools headers is not mandatory (unless building
tools fails w/o the new feature bit definition which I believe isn't the case of
SGX_UPDATESVN). The tools maintainers will eventually do the sync.
But on the other hand, modifying tools headers in this patch also reduces tools
maintainer's effort in the future.
That being said, I am unclear with the rule here. Perhaps Dave/Ingo can help to
clarify.
Powered by blists - more mailing lists