linux-stable/arch/x86/include/asm/fpu
Thomas Gleixner 08ded2cd18 x86/fpu: Get rid of the FNSAVE optimization
The FNSAVE support requires conditionals in quite some call paths because
FNSAVE reinitializes the FPU hardware. If the save has to preserve the FPU
register state then the caller has to conditionally restore it from memory
when FNSAVE is in use.

This also requires a conditional in context switch because the restore
avoidance optimization cannot work with FNSAVE. As this only affects 20+
years old CPUs there is really no reason to keep this optimization
effective for FNSAVE. It's about time to not optimize for antiques anymore.

Just unconditionally FRSTOR the save content to the registers and clean up
the conditionals all over the place.

Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121454.617369268@linutronix.de
2021-06-23 18:29:41 +02:00
..
api.h x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid() 2021-06-03 16:33:09 +02:00
internal.h x86/fpu: Get rid of the FNSAVE optimization 2021-06-23 18:29:41 +02:00
regset.h x86: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
signal.h x86/signal: Introduce helpers to get the maximum signal frame size 2021-05-19 11:46:27 +02:00
types.h x86/fpu/xstate: Add supervisor PASID state for ENQCMD 2020-09-17 20:22:10 +02:00
xcr.h x86/fpu: Move xgetbv()/xsetbv() into a separate header 2020-09-07 19:54:20 +02:00
xstate.h x86/fpu: Rename xstate copy functions which are related to UABI 2021-06-23 18:23:14 +02:00