summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/fpu
diff options
context:
space:
mode:
authorChang S. Bae <chang.seok.bae@intel.com>2021-10-22 01:55:18 +0300
committerBorislav Petkov <bp@suse.de>2021-10-26 11:18:09 +0300
commit8bf26758ca9659866b844dd51037314b4c0fa6bd (patch)
tree4c702e253c9112ab848855451484aef3a9148ad0 /arch/x86/include/asm/fpu
parentdae1bd58389615d401a84aedc38fa075ef8f7de6 (diff)
downloadlinux-8bf26758ca9659866b844dd51037314b4c0fa6bd.tar.xz
x86/fpu: Add XFD state to fpstate
Add storage for XFD register state to struct fpstate. This will be used to store the XFD MSR state. This will be used for switching the XFD MSR when FPU content is restored. Add a per-CPU variable to cache the current MSR value so the MSR has only to be written when the values are different. Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> 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-15-chang.seok.bae@intel.com
Diffstat (limited to 'arch/x86/include/asm/fpu')
-rw-r--r--arch/x86/include/asm/fpu/types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h
index 595122fcaf51..b1897638d68d 100644
--- a/arch/x86/include/asm/fpu/types.h
+++ b/arch/x86/include/asm/fpu/types.h
@@ -322,6 +322,9 @@ struct fpstate {
/* @user_xfeatures: xfeatures valid in UABI buffers */
u64 user_xfeatures;
+ /* @xfd: xfeatures disabled to trap userspace use. */
+ u64 xfd;
+
/* @is_valloc: Indicator for dynamically allocated state */
unsigned int is_valloc : 1;