]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/cpufeatures: Add X86_FEATURE_APX
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 16 Apr 2025 02:16:51 +0000 (19:16 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 16 Apr 2025 07:44:13 +0000 (09:44 +0200)
commitb02dc185ee86836cf1d8a37b81349374e4018ee0
tree3b9b6b5a95f4dda38ba38ff5260ff1cf73a9dbcd
parent4e2547509f472d77d5c6d27feae318ac9d5eba5d
x86/cpufeatures: Add X86_FEATURE_APX

Intel Advanced Performance Extensions (APX) introduce a new set of
general-purpose registers, managed as an extended state component via the
xstate management facility.

Before enabling this new xstate, define a feature flag to clarify the
dependency in xsave_cpuid_features[]. APX is enumerated under CPUID level
7 with EDX=1. Since this CPUID leaf is not yet allocated, place the flag
in a scattered feature word.

While this feature is intended only for userspace, exposing it via
/proc/cpuinfo is unnecessary. Instead, the existing arch_prctl(2)
mechanism with the ARCH_GET_XCOMP_SUPP option can be used to query the
feature availability.

Finally, clarify that APX depends on XSAVE.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250416021720.12305-2-chang.seok.bae@intel.com
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/cpuid-deps.c
arch/x86/kernel/cpu/scattered.c