/linux-6.6.21/arch/x86/kernel/fpu/ |
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 …]
|
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); 145 extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor); 147 static inline void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) { } in xfd_validate_state() argument 151 static inline void xfd_update_state(struct fpstate *fpstate) in xfd_update_state() argument 154 u64 xfd = fpstate->xfd; in xfd_update_state() 165 static inline void xfd_update_state(struct fpstate *fpstate) { } in xfd_update_state() argument 178 static inline void os_xsave(struct fpstate *fpstate) in os_xsave() argument 180 u64 mask = fpstate->xfeatures; in os_xsave() 186 xfd_validate_state(fpstate, mask, false); in os_xsave() [all …]
|
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() 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() 106 struct fpstate *fpstate) in save_sw_bytes() argument 109 sw_bytes->extended_size = fpstate->user_size + FP_XSTATE_MAGIC2_SIZE; in save_sw_bytes() 110 sw_bytes->xfeatures = fpstate->user_xfeatures; in save_sw_bytes() 111 sw_bytes->xstate_size = fpstate->user_size; in save_sw_bytes() 118 struct fpstate *fpstate) in save_xstate_epilog() argument [all …]
|
D | xstate.c | 403 struct fpstate *fpstate) in validate_user_xstate_header() argument 406 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header() 921 wrmsrl(MSR_IA32_XFD, current->thread.fpu.fpstate->xfd); in fpu__resume_cpu() 1062 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument 1068 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf() 1088 header.xfeatures &= fpstate->user_xfeatures & xfeatures; in __copy_xstate_to_uabi_buf() 1189 __copy_xstate_to_uabi_buf(to, tsk->thread.fpu.fpstate, in copy_xstate_to_uabi_buf() 1190 tsk->thread.fpu.fpstate->user_xfeatures, in copy_xstate_to_uabi_buf() 1235 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument 1238 struct xregs_state *xsave = &fpstate->regs.xsave; in copy_uabi_to_xstate() [all …]
|
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 …]
|
D | internal.h | 5 extern struct fpstate init_fpstate; 25 extern void fpstate_init_user(struct fpstate *fpstate);
|
D | context.h | 74 restore_fpregs_from_fpstate(fpu->fpstate, XFEATURE_MASK_FPSTATE); in fpregs_restore_userregs()
|
/linux-6.6.21/arch/m68k/kernel/ |
D | signal.c | 333 unsigned char fpstate[FPCONTEXT_SIZE]; in rt_restore_fpu_state() local 350 if (__get_user(*(long *)fpstate, (long __user *)&uc->uc_fpstate)) in rt_restore_fpu_state() 352 if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { in rt_restore_fpu_state() 354 context_size = fpstate[1]; in rt_restore_fpu_state() 357 (fpstate[0] != fpu_version)) in rt_restore_fpu_state() 372 if (!(fpstate[3] == 0x00 || in rt_restore_fpu_state() 373 fpstate[3] == 0x60 || in rt_restore_fpu_state() 374 fpstate[3] == 0xe0)) in rt_restore_fpu_state() 377 if (!(fpstate[3] == 0x00 || in rt_restore_fpu_state() 378 fpstate[3] == 0x05 || in rt_restore_fpu_state() [all …]
|
D | process.c | 184 asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory"); in copy_thread() 186 if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) { in copy_thread() 209 asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0])); in copy_thread()
|
/linux-6.6.21/arch/x86/um/ |
D | signal.c | 210 &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0], in copy_sc_from_user() 215 err = convert_fxsr_from_user(&fpx, (void *)sc.fpstate); in copy_sc_from_user() 229 err = copy_from_user(regs->regs.fp, (void *)sc.fpstate, in copy_sc_from_user() 285 sc.fpstate = (unsigned long)to_fp; in copy_sc_to_user() 304 err = convert_fxsr_to_user(&to_fp->fpstate, &fpx); in copy_sc_to_user() 308 err |= __put_user(fpx.swd, &to_fp->fpstate.status); in copy_sc_to_user() 309 err |= __put_user(X86_FXSR_MAGIC, &to_fp->fpstate.magic); in copy_sc_to_user() 313 if (copy_to_user(&to_fp->fpstate._fxsr_env[0], &fpx, in copy_sc_to_user() 344 struct _xstate fpstate; member 357 struct _xstate fpstate; member [all …]
|
/linux-6.6.21/arch/x86/include/asm/fpu/ |
D | types.h | 356 struct fpstate { struct 476 struct fpstate *fpstate; member 484 struct fpstate *__task_fpstate; 508 struct fpstate __fpstate; 545 struct fpstate *fpstate; member
|
D | api.h | 142 extern void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature); 166 gfpu->fpstate->is_confidential = true; in fpstate_set_confidential() 171 return gfpu->fpstate->is_confidential; in fpstate_is_confidential()
|
D | signal.h | 36 extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
|
/linux-6.6.21/arch/x86/include/uapi/asm/ |
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-6.6.21/tools/testing/selftests/x86/ |
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-6.6.21/arch/x86/include/asm/trace/ |
D | fpu.h | 25 __entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures; 26 __entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv;
|
/linux-6.6.21/arch/x86/kernel/ |
D | signal.c | 76 void __user **fpstate) in get_sigframe() argument 113 *fpstate = (void __user *)sp; in get_sigframe() 141 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size)) in get_sigframe()
|
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()
|
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-6.6.21/arch/x86/include/asm/ |
D | sighandling.h | 20 void __user **fpstate);
|
/linux-6.6.21/arch/arm/nwfpe/ |
D | fpa11.h | 13 #define GET_FPA11() ((FPA11 *)(¤t_thread_info()->fpstate))
|
D | fpmodule.c | 53 nwfpe_init_fpa(&thread->fpstate); in nwfpe_notify()
|
/linux-6.6.21/arch/arm/kernel/ |
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()
|
D | asm-offsets.c | 51 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); in main() 63 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); in main()
|
/linux-6.6.21/arch/m68k/include/asm/ |
D | processor.h | 114 unsigned char fpstate[FPSTATESIZE]; /* floating point state */ member
|