Lines Matching full:fpu

3  * FPU signal frame handling routines.
10 #include <asm/fpu/signal.h>
11 #include <asm/fpu/regset.h>
12 #include <asm/fpu/xstate.h>
16 #include <asm/trace/fpu.h>
41 fx_sw->xstate_size > current->thread.fpu.fpstate->user_size || in check_xstate_in_sigframe()
57 trace_x86_fpu_xstate_check_failed(&current->thread.fpu); in check_xstate_in_sigframe()
82 struct xregs_state *xsave = &tsk->thread.fpu.fpstate->regs.xsave; in save_fsave_header()
88 fxsave(&tsk->thread.fpu.fpstate->regs.fxsave); in save_fsave_header()
187 * Save the fpu, extended register state to the user signal frame.
208 struct fpstate *fpstate = tsk->thread.fpu.fpstate; in copy_fpstate_to_sigframe()
238 * Load the FPU registers if they are not valid for the current task. in copy_fpstate_to_sigframe()
239 * With a valid FPU state we can attempt to save the state directly to in copy_fpstate_to_sigframe()
291 * Attempt to restore the FPU registers directly from user memory.
296 struct fpu *fpu = &current->thread.fpu; in restore_fpregs_from_user() local
300 xrestore &= fpu->fpstate->user_xfeatures; in restore_fpregs_from_user()
304 xfd_update_state(fpu->fpstate); in restore_fpregs_from_user()
306 ret = __restore_fpregs_from_user(buf, fpu->fpstate->user_xfeatures, in restore_fpregs_from_user()
312 * The above did an FPU restore operation, restricted to in restore_fpregs_from_user()
314 * microcode might have modified the FPU registers in restore_fpregs_from_user()
317 * If the FPU registers do not belong to current, then in restore_fpregs_from_user()
318 * invalidate the FPU register state otherwise the task in restore_fpregs_from_user()
320 * corrupted FPU registers. in restore_fpregs_from_user()
330 if (!fault_in_readable(buf, fpu->fpstate->user_size)) in restore_fpregs_from_user()
341 * this does not work because the rest of the FPU registers have in restore_fpregs_from_user()
345 os_xrstor_supervisor(fpu->fpstate); in restore_fpregs_from_user()
356 struct fpu *fpu = &tsk->thread.fpu; in __fpu_restore_sig() local
375 /* Restore the FPU registers directly from user memory. */ in __fpu_restore_sig()
404 os_xsave(fpu->fpstate); in __fpu_restore_sig()
407 __fpu_invalidate_fpregs_state(fpu); in __fpu_restore_sig()
411 fpregs = &fpu->fpstate->regs; in __fpu_restore_sig()
451 success = !os_xrstor_safe(fpu->fpstate, in __fpu_restore_sig()
472 * Restore FPU state from a sigframe:
476 struct fpu *fpu = &current->thread.fpu; in fpu__restore_sig() local
483 fpu__clear_user_states(fpu); in fpu__restore_sig()
487 size = xstate_sigframe_size(fpu->fpstate); in fpu__restore_sig()
515 fpu__clear_user_states(fpu); in fpu__restore_sig()
523 unsigned long frame_size = xstate_sigframe_size(current->thread.fpu.fpstate); in fpu__alloc_mathframe()