diff options
author | 2021-10-15 03:16:41 +0200 | |
---|---|---|
committer | 2021-10-20 15:27:29 +0200 | |
commit | 079ec41b22b952cdf3126527d735e373c9125f6d (patch) | |
tree | 4b05e6bf06ae8062b7f879db9e0b2d4574f2fca5 /arch/x86/kernel/fpu/core.c | |
parent | x86/fpu: Replace the includes of fpu/internal.h (diff) | |
download | wireguard-linux-079ec41b22b952cdf3126527d735e373c9125f6d.tar.xz wireguard-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/kernel/fpu/core.c')
-rw-r--r-- | arch/x86/kernel/fpu/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index 9bb0c1c45e27..79f2e8ddd10c 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -155,6 +155,11 @@ void restore_fpregs_from_fpstate(union fpregs_state *fpstate, u64 mask) } } +void fpu_reset_from_exception_fixup(void) +{ + restore_fpregs_from_fpstate(&init_fpstate, xfeatures_mask_fpstate()); +} + #if IS_ENABLED(CONFIG_KVM) void fpu_swap_kvm_fpu(struct fpu *save, struct fpu *rstor, u64 restore_mask) { |