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(¤t->thread.fpu); in check_xstate_in_sigframe()
72 struct xregs_state *xsave = &tsk->thread.fpu.fpstate->regs.xsave; in save_fsave_header()
78 fxsave(&tsk->thread.fpu.fpstate->regs.fxsave); in save_fsave_header()
170 * Save the fpu, extended register state to the user signal frame.
191 struct fpstate *fpstate = tsk->thread.fpu.fpstate; in copy_fpstate_to_sigframe()
221 * Load the FPU registers if they are not valid for the current task. in copy_fpstate_to_sigframe()
222 * With a valid FPU state we can attempt to save the state directly to in copy_fpstate_to_sigframe()
274 * Attempt to restore the FPU registers directly from user memory.
280 struct fpu *fpu = ¤t->thread.fpu; in restore_fpregs_from_user() local
286 xfd_update_state(fpu->fpstate); in restore_fpregs_from_user()
288 ret = __restore_fpregs_from_user(buf, fpu->fpstate->user_xfeatures, in restore_fpregs_from_user()
294 * The above did an FPU restore operation, restricted to in restore_fpregs_from_user()
296 * microcode might have modified the FPU registers in restore_fpregs_from_user()
299 * If the FPU registers do not belong to current, then in restore_fpregs_from_user()
300 * invalidate the FPU register state otherwise the task in restore_fpregs_from_user()
302 * corrupted FPU registers. in restore_fpregs_from_user()
323 * this does not work because the rest of the FPU registers have in restore_fpregs_from_user()
327 os_xrstor_supervisor(fpu->fpstate); in restore_fpregs_from_user()
338 struct fpu *fpu = &tsk->thread.fpu; in __fpu_restore_sig() local
356 state_size = fpu->fpstate->user_size; in __fpu_restore_sig()
360 /* Restore the FPU registers directly from user memory. */ in __fpu_restore_sig()
390 os_xsave(fpu->fpstate); in __fpu_restore_sig()
393 __fpu_invalidate_fpregs_state(fpu); in __fpu_restore_sig()
397 fpregs = &fpu->fpstate->regs; in __fpu_restore_sig()
399 if (copy_sigframe_from_user_to_xstate(fpu->fpstate, buf_fx)) in __fpu_restore_sig()
437 success = !os_xrstor_safe(fpu->fpstate, in __fpu_restore_sig()
458 * Restore FPU state from a sigframe:
462 struct fpu *fpu = ¤t->thread.fpu; in fpu__restore_sig() local
469 fpu__clear_user_states(fpu); in fpu__restore_sig()
473 size = xstate_sigframe_size(fpu->fpstate); in fpu__restore_sig()
501 fpu__clear_user_states(fpu); in fpu__restore_sig()
509 unsigned long frame_size = xstate_sigframe_size(current->thread.fpu.fpstate); in fpu__alloc_mathframe()