summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/fpu
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-10-22 01:55:09 +0300
committerBorislav Petkov <bp@suse.de>2021-10-26 11:18:09 +0300
commitc33f0a81a2cf3920465309ce683534751bb86485 (patch)
treebc4f3638b7a069ff3bc7072f3d9207ee101253b5 /arch/x86/include/asm/fpu
parent6f6a7c09c4065a5b140194dfcfe4cf7104fec4d2 (diff)
downloadlinux-c33f0a81a2cf3920465309ce683534751bb86485.tar.xz
x86/fpu: Add fpu_state_config::legacy_features
The upcoming prctl() which is required to request the permission for a dynamically enabled feature will also provide an option to retrieve the supported features. If the CPU does not support XSAVE, the supported features would be 0 even when the CPU supports FP and SSE. Provide separate storage for the legacy feature set to avoid that and fill in the bits in the legacy init function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20211021225527.10184-6-chang.seok.bae@intel.com
Diffstat (limited to 'arch/x86/include/asm/fpu')
-rw-r--r--arch/x86/include/asm/fpu/types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h
index c3ec56279767..595122fcaf51 100644
--- a/arch/x86/include/asm/fpu/types.h
+++ b/arch/x86/include/asm/fpu/types.h
@@ -503,6 +503,13 @@ struct fpu_state_config {
* be requested by user space before usage.
*/
u64 default_features;
+ /*
+ * @legacy_features:
+ *
+ * Features which can be reported back to user space
+ * even without XSAVE support, i.e. legacy features FP + SSE
+ */
+ u64 legacy_features;
};
/* FPU state configuration information */