]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu: Add XFD state to fpstate
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:18 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:18:09 +0000 (10:18 +0200)
commit170a5fa108c8008fbfe22a1e93ed8522caa6faff
tree4c702e253c9112ab848855451484aef3a9148ad0
parentfacd19d4ec9dafea1930ea20009713c05150b8a2
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
arch/x86/include/asm/fpu/types.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xstate.h