/linux/arch/x86/kernel/fpu/ |
H A D | core.c | 44 struct fpstate init_fpstate __ro_after_init; 97 if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK) in update_avx_timestamp() 118 os_xsave(fpu->fpstate); in save_fpregs_to_fpstate() 124 fxsave(&fpu->fpstate->regs.fxsave); in save_fpregs_to_fpstate() 132 asm volatile("fnsave %[fp]; fwait" : [fp] "=m" (fpu->fpstate->regs.fsave)); in save_fpregs_to_fpstate() 133 frstor(&fpu->fpstate->regs.fsave); in save_fpregs_to_fpstate() 136 void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask) in restore_fpregs_from_fpstate() argument 149 : : [addr] "m" (*fpstate)); in restore_fpregs_from_fpstate() 168 xfd_update_state(fpstate); in restore_fpregs_from_fpstate() 181 os_xrstor(fpstate, mask); in restore_fpregs_from_fpstate() [all …]
|
H A D | xstate.h | 45 extern void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, 50 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf, u32 *pkru); 141 extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor); 143 static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) { } in xfd_validate_state() argument 153 static inline void xfd_update_state(struct fpstate *fpstate) in xfd_update_state() argument 156 u64 xfd = fpstate->xfd; in xfd_update_state() 167 static inline void xfd_update_state(struct fpstate *fpstate) { } in xfd_update_state() argument 180 static inline void os_xsave(struct fpstate *fpstate) in os_xsave() argument 182 u64 mask = fpstate->xfeatures; in os_xsave() 188 xfd_validate_state(fpstate, mask, false); in os_xsave() [all …]
|
H A D | signal.c | 32 void __user *fpstate = fxbuf; in check_xstate_in_sigframe() local 41 fx_sw->xstate_size > current->thread.fpu.fpstate->user_size || in check_xstate_in_sigframe() 51 if (__get_user(magic2, (__u32 __user *)(fpstate + fx_sw->xstate_size))) 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() 116 struct fpstate *fpstate) in save_sw_bytes() argument 119 sw_bytes->extended_size = fpstate->user_size + FP_XSTATE_MAGIC2_SIZE; in save_sw_bytes() 120 sw_bytes->xfeatures = fpstate->user_xfeatures; in save_sw_bytes() 121 sw_bytes->xstate_size = fpstate->user_size; in save_sw_bytes() 128 struct fpstate *fpstate) in save_xstate_epilog() argument [all …]
|
H A D | xstate.c | 407 struct fpstate *fpstate) in validate_user_xstate_header() argument 410 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header() 928 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu() 1083 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument 1089 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf() 1109 header.xfeatures &= fpstate->user_xfeatures & xfeatures; in __copy_xstate_to_uabi_buf() 1210 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf() 1211 tsk->thread.fpu.fpstate->user_xfeatures, in copy_xstate_to_uabi_buf() 1256 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument 1259 struct xregs_state *xsave = &fpstate->regs.xsave; in copy_uabi_to_xstate() [all …]
|
H A D | regset.c | 82 return membuf_write(&to, &fpu->fpstate->regs.fxsave, in xfpregs_get() 83 sizeof(fpu->fpstate->regs.fxsave)); in xfpregs_get() 116 memcpy(&fpu->fpstate->regs.fxsave, &newstate, sizeof(newstate)); in xfpregs_set() 121 memset(&fpu->fpstate->regs.fxsave.xmm_space[8*4], 0, 8 * 16); in xfpregs_set() 125 fpu->fpstate->regs.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE; in xfpregs_set() 171 ret = copy_uabi_from_kernel_to_xstate(fpu->fpstate, kbuf ?: tmpbuf, &target->thread.pkru); in xstateregs_set() 197 cetregs = get_xsave_addr(&fpu->fpstate->regs.xsave, XFEATURE_CET_USER); in ssp_get() 217 struct xregs_state *xsave = &fpu->fpstate->regs.xsave; in ssp_set() 370 __convert_from_fxsr(env, tsk, &tsk->thread.fpu.fpstate->regs.fxsave); in convert_from_fxsr() 413 return membuf_write(&to, &fpu->fpstate->regs.fsave, in fpregs_get() [all …]
|
H A D | internal.h | 5 extern struct fpstate init_fpstate; 25 extern void fpstate_init_user(struct fpstate *fpstate);
|
H A D | context.h | 74 restore_fpregs_from_fpstate(fpu->fpstate, XFEATURE_MASK_FPSTATE); in fpregs_restore_userregs()
|
H A D | init.c | 41 fpstate_init_soft(¤t->thread.fpu.fpstate->regs.soft); in fpu__init_cpu_generic()
|
/linux/arch/m68k/kernel/ |
H A D | signal.c | 335 unsigned char fpstate[FPCONTEXT_SIZE]; in rt_restore_fpu_state() local 352 if (__get_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate)) in rt_restore_fpu_state() 354 if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { in rt_restore_fpu_state() 356 context_size = fpstate[1]; in rt_restore_fpu_state() 359 (fpstate[0] != fpu_version)) in rt_restore_fpu_state() 374 if (!(fpstate[3] == 0x00 || in rt_restore_fpu_state() 375 fpstate[3] == 0x60 || in rt_restore_fpu_state() 376 fpstate[3] == 0xe0)) in rt_restore_fpu_state() 379 if (!(fpstate[3] == 0x00 || in rt_restore_fpu_state() 380 fpstate[3] == 0x05 || in rt_restore_fpu_state() [all …]
|
H A D | process.c | 185 asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory"); in copy_thread() 187 if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) { in copy_thread() 210 asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0])); in copy_thread()
|
/linux/arch/x86/include/asm/fpu/ |
H A D | types.h | 358 struct fpstate { struct 478 struct fpstate *fpstate; member 486 struct fpstate *__task_fpstate; 510 struct fpstate __fpstate; 547 struct fpstate *fpstate; member
|
H A D | api.h | 142 extern void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature); 169 gfpu->fpstate->is_confidential = true; in fpstate_set_confidential() 174 return gfpu->fpstate->is_confidential; in fpstate_is_confidential()
|
H A D | signal.h | 36 extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
|
/linux/arch/x86/include/uapi/asm/ |
H A D | sigcontext.h | 193 struct _fpstate fpstate; member 230 __u32 fpstate; /* Zero when no FPU/extended context */ member 273 __u64 fpstate; /* Zero when no FPU/extended context */ member 320 struct _fpstate __user *fpstate; member 380 struct _fpstate __user *fpstate; /* Zero when no FPU context */ member
|
/linux/tools/testing/selftests/x86/ |
H A D | corrupt_xstate_header.c | 48 uint8_t *fpstate = (uint8_t *)uc->uc_mcontext.fpregs; in sigusr1() local 49 uint64_t *xfeatures = (uint64_t *)(fpstate + 512); in sigusr1()
|
/linux/arch/x86/include/asm/trace/ |
H A D | fpu.h | 25 __entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures; 26 __entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv;
|
/linux/arch/x86/kernel/ |
H A D | signal.c | 95 void __user **fpstate) in get_sigframe() argument 133 *fpstate = (void __user *)sp; in get_sigframe() 163 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size, pkru)) { in get_sigframe()
|
H A D | signal_32.c | 122 return fpu__restore_sig(compat_ptr(sc.fpstate), 1); in ia32_restore_sigcontext() 184 void __user *fpstate, in __unsafe_setup_sigcontext32() argument 214 unsafe_put_user(ptr_to_compat(fpstate), &sc->fpstate, Efault); in __unsafe_setup_sigcontext32()
|
H A D | signal_64.c | 95 return fpu__restore_sig((void __user *)sc.fpstate, 0); in restore_sigcontext() 99 __unsafe_setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, in __unsafe_setup_sigcontext() argument 128 unsafe_put_user(fpstate, (unsigned long __user *)&sc->fpstate, Efault); in __unsafe_setup_sigcontext()
|
/linux/arch/x86/include/asm/ |
H A D | sighandling.h | 20 void __user **fpstate);
|
/linux/arch/arm/kernel/ |
H A D | ptrace.c | 301 return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE) in ptrace_getwmmxregs() 315 return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE) in ptrace_setwmmxregs() 576 return membuf_write(&to, &task_thread_info(target)->fpstate, in fpa_get() 588 &thread->fpstate, in fpa_set()
|
H A D | asm-offsets.c | 53 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); in main() 65 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); in main()
|
/linux/arch/arm/nwfpe/ |
H A D | fpa11.h | 13 #define GET_FPA11() ((FPA11 *)(¤t_thread_info()->fpstate))
|
H A D | fpmodule.c | 53 nwfpe_init_fpa(&thread->fpstate); in nwfpe_notify()
|
/linux/arch/m68k/include/asm/ |
H A D | processor.h | 115 unsigned char fpstate[FPSTATESIZE]; /* floating point state */ member
|