diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-10-15 03:16:41 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-10-20 15:27:29 +0200 |
commit | 079ec41b22b952cdf3126527d735e373c9125f6d (patch) | |
tree | 4b05e6bf06ae8062b7f879db9e0b2d4574f2fca5 /arch/x86/mm | |
parent | x86/fpu: Replace the includes of fpu/internal.h (diff) | |
download | linux-079ec41b22b952cdf3126527d735e373c9125f6d.tar.xz linux-079ec41b22b952cdf3126527d735e373c9125f6d.zip |
x86/fpu: Provide a proper function for ex_handler_fprestore()
To make upcoming changes for support of dynamically enabled features
simpler, provide a proper function for the exception handler which removes
exposure of FPU internals.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011540.053515012@linutronix.de
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/extable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 79c2e30d93ae..5cd2a88930a9 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -4,8 +4,7 @@ #include <linux/sched/debug.h> #include <xen/xen.h> -#include <asm/fpu/signal.h> -#include <asm/fpu/xstate.h> +#include <asm/fpu/api.h> #include <asm/sev.h> #include <asm/traps.h> #include <asm/kdebug.h> @@ -48,7 +47,7 @@ static bool ex_handler_fprestore(const struct exception_table_entry *fixup, WARN_ONCE(1, "Bad FPU state detected at %pB, reinitializing FPU registers.", (void *)instruction_pointer(regs)); - restore_fpregs_from_fpstate(&init_fpstate, xfeatures_mask_fpstate()); + fpu_reset_from_exception_fixup(); return true; } |