/linux/arch/x86/kernel/fpu/ |
A D | core.c | 202 static void __fpstate_reset(struct fpstate *fpstate); 206 struct fpstate *fpstate; in fpu_alloc_guest_fpstate() local 211 if (!fpstate) in fpu_alloc_guest_fpstate() 219 gfpu->fpstate = fpstate; in fpu_alloc_guest_fpstate() 226 struct fpstate *fps = gfpu->fpstate; in fpu_free_guest_fpstate() 241 struct fpstate *guest_fps = guest_fpu->fpstate; in fpu_swap_kvm_fpstate() 243 struct fpstate *cur_fps = fpu->fpstate; in fpu_swap_kvm_fpstate() 283 struct fpstate *kstate = gfpu->fpstate; in fpu_copy_guest_fpstate_to_uabi() 301 struct fpstate *kstate = gfpu->fpstate; in fpu_copy_uabi_to_guest_fpstate() 418 void fpstate_init_user(struct fpstate *fpstate) in fpstate_init_user() argument [all …]
|
A D | xstate.h | 36 extern void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, 40 extern int copy_uabi_from_kernel_to_xstate(struct fpstate *fpstate, const void *kbuf); 135 extern void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor); 141 static inline void xfd_update_state(struct fpstate *fpstate) in xfd_update_state() argument 144 u64 xfd = fpstate->xfd; in xfd_update_state() 153 static inline void xfd_update_state(struct fpstate *fpstate) { } in xfd_update_state() argument 162 static inline void os_xsave(struct fpstate *fpstate) in os_xsave() argument 183 static inline void os_xrstor(struct fpstate *fpstate, u64 mask) in os_xrstor() argument 193 static inline void os_xrstor_supervisor(struct fpstate *fpstate) in os_xrstor_supervisor() argument 248 struct fpstate *fpstate = current->thread.fpu.fpstate; in xsave_to_user_sigframe() local [all …]
|
A D | signal.c | 32 void __user *fpstate = fxbuf; in check_xstate_in_sigframe() local 106 struct fpstate *fpstate) in save_sw_bytes() argument 118 struct fpstate *fpstate) in save_xstate_epilog() argument 191 struct fpstate *fpstate = tsk->thread.fpu.fpstate; in copy_fpstate_to_sigframe() local 286 xfd_update_state(fpu->fpstate); in restore_fpregs_from_user() 327 os_xrstor_supervisor(fpu->fpstate); in restore_fpregs_from_user() 356 state_size = fpu->fpstate->user_size; in __fpu_restore_sig() 390 os_xsave(fpu->fpstate); in __fpu_restore_sig() 397 fpregs = &fpu->fpstate->regs; in __fpu_restore_sig() 450 static inline unsigned int xstate_sigframe_size(struct fpstate *fpstate) in xstate_sigframe_size() argument [all …]
|
A D | xstate.c | 481 struct fpstate *fpstate) in validate_user_xstate_header() argument 1132 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument 1268 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument 1346 int copy_sigframe_from_user_to_xstate(struct fpstate *fpstate, in copy_sigframe_from_user_to_xstate() argument 1432 static bool xstate_op_valid(struct fpstate *fpstate, u64 mask, bool rstor) in xstate_op_valid() argument 1443 if (fpstate->xfd == current->thread.fpu.fpstate->xfd) in xstate_op_valid() 1478 void xfd_validate_state(struct fpstate *fpstate, u64 mask, bool rstor) in xfd_validate_state() argument 1498 if (fpu->fpstate && fpu->fpstate != &fpu->__fpstate) in arch_initcall() 1499 vfree(fpu->fpstate); in arch_initcall() 1516 struct fpstate *oldfps = fpu->fpstate; in fpu_install_fpstate() [all …]
|
A D | regset.c | 81 return membuf_write(&to, &fpu->fpstate->regs.fxsave, in xfpregs_get() 82 sizeof(fpu->fpstate->regs.fxsave)); in xfpregs_get() 117 memcpy(&fpu->fpstate->regs.fxsave, &newstate, sizeof(newstate)); in xfpregs_set() 121 memset(&fpu->fpstate->regs.fxsave.xmm_space[8], 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); in xstateregs_set() 333 return membuf_write(&to, &fpu->fpstate->regs.fsave, in fpregs_get() 344 fx = &fpu->fpstate->regs.fxsave; in fpregs_get() 373 convert_to_fxsr(&fpu->fpstate->regs.fxsave, &env); in fpregs_set() 375 memcpy(&fpu->fpstate->regs.fsave, &env, sizeof(env)); in fpregs_set() [all …]
|
A D | internal.h | 5 extern struct fpstate init_fpstate; 25 extern void fpstate_init_user(struct fpstate *fpstate);
|
A D | context.h | 75 restore_fpregs_from_fpstate(fpu->fpstate, XFEATURE_MASK_FPSTATE); in fpregs_restore_userregs()
|
A D | init.c | 41 fpstate_init_soft(¤t->thread.fpu.fpstate->regs.soft); in fpu__init_cpu_generic()
|
/linux/arch/m68k/kernel/ |
A D | signal.c | 352 if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { in rt_restore_fpu_state() 354 context_size = fpstate[1]; 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() 379 fpstate[3] == 0xe5)) in rt_restore_fpu_state() 418 : : "m" (*fpstate)); in rt_restore_fpu_state() 508 if (CPU_IS_060 ? fpstate[2] : fpstate[0]) { in rt_save_fpu_state() 511 context_size = fpstate[1]; in rt_save_fpu_state() 512 fpu_version = fpstate[0]; in rt_save_fpu_state() [all …]
|
A D | process.c | 182 asm volatile ("fsave %0" : : "m" (p->thread.fpstate[0]) : "memory"); in copy_thread() 184 if (!CPU_IS_060 ? p->thread.fpstate[0] : p->thread.fpstate[2]) { in copy_thread() 207 asm volatile ("frestore %0" : : "m" (p->thread.fpstate[0])); in copy_thread()
|
/linux/arch/x86/um/ |
A D | signal.c | 209 &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0], in copy_sc_from_user() 214 err = convert_fxsr_from_user(&fpx, (void *)sc.fpstate); in copy_sc_from_user() 228 err = copy_from_user(regs->regs.fp, (void *)sc.fpstate, in copy_sc_from_user() 284 sc.fpstate = (unsigned long)to_fp; in copy_sc_to_user() 303 err = convert_fxsr_to_user(&to_fp->fpstate, &fpx); in copy_sc_to_user() 307 err |= __put_user(fpx.swd, &to_fp->fpstate.status); in copy_sc_to_user() 312 if (copy_to_user(&to_fp->fpstate._fxsr_env[0], &fpx, in copy_sc_to_user() 343 struct _xstate fpstate; member 356 struct _xstate fpstate; member 485 struct _xstate fpstate; member [all …]
|
/linux/arch/x86/include/asm/fpu/ |
A D | types.h | 344 struct fpstate { struct 462 struct fpstate *fpstate; member 470 struct fpstate *__task_fpstate; 487 struct fpstate __fpstate; 501 struct fpstate *fpstate; member
|
A D | api.h | 133 extern void fpstate_clear_xstate_component(struct fpstate *fps, unsigned int xfeature); 145 gfpu->fpstate->is_confidential = true; in fpstate_set_confidential() 150 return gfpu->fpstate->is_confidential; in fpstate_is_confidential()
|
A D | signal.h | 43 extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
|
/linux/arch/x86/include/uapi/asm/ |
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/arch/x86/ia32/ |
A D | ia32_signal.c | 96 return fpu__restore_sig(compat_ptr(sc.fpstate), 1); in ia32_restore_sigcontext() 158 void __user *fpstate, in __unsafe_setup_sigcontext32() argument 182 unsafe_put_user(ptr_to_compat(fpstate), &sc->fpstate, Efault); in __unsafe_setup_sigcontext32() 204 void __user **fpstate) in get_sigframe() argument 221 *fpstate = (struct _fpstate_32 __user *) sp; in get_sigframe() 222 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)fx_aligned, in get_sigframe()
|
/linux/tools/testing/selftests/x86/ |
A D | corrupt_xstate_header.c | 60 uint8_t *fpstate = (uint8_t *)uc->uc_mcontext.fpregs; in sigusr1() local 61 uint64_t *xfeatures = (uint64_t *)(fpstate + 512); in sigusr1()
|
/linux/arch/x86/include/asm/trace/ |
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/ |
A D | signal.c | 141 return fpu__restore_sig((void __user *)sc.fpstate, in restore_sigcontext() 146 __unsafe_setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, in __unsafe_setup_sigcontext() argument 192 unsafe_put_user(fpstate, (unsigned long __user *)&sc->fpstate, Efault); in __unsafe_setup_sigcontext() 241 void __user **fpstate) in get_sigframe() argument 277 *fpstate = (void __user *)sp; in get_sigframe() 296 if (!copy_fpstate_to_sigframe(*fpstate, (void __user *)buf_fx, math_size)) in get_sigframe()
|
/linux/arch/arm/kernel/ |
A D | ptrace.c | 302 return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE) in ptrace_getwmmxregs() 316 return copy_from_user(&thread->fpstate.iwmmxt, ufp, IWMMXT_SIZE) in ptrace_setwmmxregs() 577 return membuf_write(&to, &task_thread_info(target)->fpstate, in fpa_get() 591 &thread->fpstate, in fpa_set()
|
A D | asm-offsets.c | 55 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); in main() 66 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); in main()
|
/linux/arch/arm/nwfpe/ |
A D | fpa11.h | 13 #define GET_FPA11() ((FPA11 *)(¤t_thread_info()->fpstate))
|
A D | fpmodule.c | 53 nwfpe_init_fpa(&thread->fpstate); in nwfpe_notify()
|
/linux/arch/m68k/include/asm/ |
A D | processor.h | 114 unsigned char fpstate[FPSTATESIZE]; /* floating point state */ member
|
/linux/arch/arm/include/asm/ |
A D | thread_info.h | 66 union fp_state fpstate __attribute__((aligned(8))); member
|