| /linux/arch/x86/kernel/fpu/ |
| H A D | core.c | 47 struct fpstate init_fpstate __ro_after_init; 123 if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK) in update_avx_timestamp() 144 os_xsave(fpu->fpstate); in save_fpregs_to_fpstate() 150 fxsave(&fpu->fpstate->regs.fxsave); in save_fpregs_to_fpstate() 158 asm volatile("fnsave %[fp]; fwait" : [fp] "=m" (fpu->fpstate->regs.fsave)); in save_fpregs_to_fpstate() 159 frstor(&fpu->fpstate->regs.fsave); in save_fpregs_to_fpstate() 162 void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask) in restore_fpregs_from_fpstate() argument 175 : : [addr] "m" (*fpstate)); in restore_fpregs_from_fpstate() 194 xfd_update_state(fpstate); in restore_fpregs_from_fpstate() 207 os_xrstor(fpstate, mask); in restore_fpregs_from_fpstate() [all …]
|
| H A D | signal.c | 25 * user fpstate pointer in the sigcontext. 30 struct fpstate *fpstate = x86_task_fpu(current)->fpstate; in check_xstate_in_sigframe() local 42 fx_sw->xstate_size > fpstate->user_size || in check_xstate_in_sigframe() 49 * fpstate layout with out copying the extended state information in check_xstate_in_sigframe() 57 if (fx_sw->xstate_size != fpstate->user_size || in check_xstate_in_sigframe() 58 fx_sw->xfeatures != fpstate->user_xfeatures) { in check_xstate_in_sigframe() 63 xfeatures = fx_sw->xfeatures & fpstate->user_xfeatures; in check_xstate_in_sigframe() 97 struct xregs_state *xsave = &x86_task_fpu(tsk)->fpstate in save_fsave_header() 131 save_sw_bytes(struct _fpx_sw_bytes * sw_bytes,bool ia32_frame,struct fpstate * fpstate) save_sw_bytes() argument 143 save_xstate_epilog(void __user * buf,int ia32_frame,struct fpstate * fpstate) save_xstate_epilog() argument 208 struct fpstate *fpstate = x86_task_fpu(tsk)->fpstate; copy_fpstate_to_sigframe() local 452 xstate_sigframe_size(struct fpstate * fpstate) xstate_sigframe_size() argument [all...] |
| H A D | xstate.c | 432 struct fpstate *fpstate) in validate_user_xstate_header() argument 435 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header() 1007 wrmsrq(MSR_IA32_XFD, x86_task_fpu(current)->fpstate->xfd); in fpu__resume_cpu() 1161 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument 1167 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf() 1186 header.xfeatures &= fpstate->user_xfeatures & xfeatures; in __copy_xstate_to_uabi_buf() 1288 __copy_xstate_to_uabi_buf(to, x86_task_fpu(tsk)->fpstate, in copy_xstate_to_uabi_buf() 1289 x86_task_fpu(tsk)->fpstate->user_xfeatures, in copy_xstate_to_uabi_buf() 1334 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument 1337 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() 198 cetregs = get_xsave_addr(&fpu->fpstate->regs.xsave, XFEATURE_CET_USER); in ssp_get() 218 struct xregs_state *xsave = &fpu->fpstate->regs.xsave; in ssp_set() 371 __convert_from_fxsr(env, tsk, &x86_task_fpu(tsk)->fpstate->regs.fxsave); in convert_from_fxsr() 411 return membuf_write(&to, &fpu->fpstate->regs.fsave, in fpregs_get() [all …]
|
| /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()
|
| H A D | asm-offsets.c | 40 DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate)); in main()
|
| /linux/arch/x86/include/asm/fpu/ |
| H A D | types.h | 352 struct fpstate { struct 474 struct fpstate *fpstate; member 482 struct fpstate *__task_fpstate; 506 struct fpstate __fpstate; 536 struct fpstate *fpstate; member
|
| H A D | signal.h | 36 extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
|
| /linux/arch/x86/um/ |
| H A D | signal.c | 24 struct _fpstate_64 fpstate; member 85 from_fp64 = ((void __user *)sc.fpstate) + in copy_sc_from_user() 88 from_fp64 = (void __user *)sc.fpstate; in copy_sc_from_user() 101 (void __user *)sc.fpstate); in copy_sc_from_user() 158 sc.fpstate = (unsigned long)to_fp; in copy_sc_to_user() 172 __put_user(X86_FXSR_MAGIC, &to_fp->fpstate.magic); in copy_sc_to_user() 193 if (host_fp_size <= sizeof(to_fp64->fpstate)) in copy_sc_to_user() 200 &to_fp64->fpstate.sw_reserved.extended_size); in copy_sc_to_user() 203 &to_fp64->fpstate.sw_reserved.extended_size); in copy_sc_to_user() 205 __put_user(host_fp_size, &to_fp64->fpstate.sw_reserved.xstate_size); in copy_sc_to_user() [all …]
|
| /linux/arch/x86/include/uapi/asm/ |
| H A D | sigcontext.h | 208 struct _fpstate fpstate; member 245 __u32 fpstate; /* Zero when no FPU/extended context */ member 288 __u64 fpstate; /* Zero when no FPU/extended context */ member 335 struct _fpstate __user *fpstate; member 395 struct _fpstate __user *fpstate; /* Zero when no FPU context */ member
|
| /linux/tools/testing/selftests/x86/ |
| H A D | corrupt_xstate_header.c | 36 uint8_t *fpstate = (uint8_t *)uc->uc_mcontext.fpregs; in sigusr1() local 37 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/Documentation/arch/x86/ |
| H A D | xstate.rst | 203 measured from the ``fpstate`` pointer. In 32-bit signal frames, this also 212 the ``fpstate`` pointer points directly to the xstate context. In 32-bit signal 213 frames (including 32-bit compat tasks on 64-bit kernels), the ``fpstate`` 217 state, the xstate context starts at ``fpstate + 112`` (and ``extended_size`` 218 spans the entire allocation from ``fpstate``).
|
| /linux/arch/x86/kernel/ |
| 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/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/arm/kernel/ |
| H A D | asm-offsets.c | 55 DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); in main() 67 DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); in main()
|
| H A D | process.c | 226 memset(&thread->fpstate, 0, sizeof(union fp_state)); in flush_thread()
|
| /linux/arch/arm/include/asm/ |
| H A D | thread_info.h | 71 union fp_state fpstate __attribute__((aligned(8))); member
|
| /linux/arch/x86/kvm/ |
| H A D | x86.c | 3201 xstate->xsave.header.xfeatures &= ~vcpu->arch.guest_fpu.fpstate->xfd; in kvm_vcpu_ioctl_x86_get_xcrs() 9333 fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave; in kvm_arch_vcpu_precreate() 9356 fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave; in kvm_arch_vcpu_create() 9585 struct fpstate *fpstate = vcpu->arch.guest_fpu.fpstate; in kvm_vcpu_reset() 9594 if (!init_event || !fpstate) in kvm_vcpu_reset() 9620 WARN_ON_ONCE(vcpu->wants_to_run != fpstate->in_use); in kvm_vcpu_reset() 9621 fpu_in_use = fpstate->in_use; in kvm_vcpu_reset() 9625 fpstate_clear_xstate_component(fpstate, in kvm_vcpu_reset() 9488 struct fpstate *fpstate = vcpu->arch.guest_fpu.fpstate; kvm_xstate_reset() local [all...] |
| /linux/arch/x86/events/ |
| H A D | core.c | 2028 struct fpstate *fps; in x86_pmu_update_user_xregs() 2049 * when TIF_NEED_FPU_LOAD is set, fpu->fpstate holds the cached in x86_pmu_update_user_xregs() 2056 fps = fpu->fpstate; in x86_pmu_update_user_xregs()
|
| /linux/arch/x86/kvm/svm/ |
| H A D | sev.c | 1043 xsave = &vcpu->arch.guest_fpu.fpstate->regs.xsave; in sev_es_sync_vmsa() 1117 * Mark vcpu->arch.guest_fpu->fpstate as scratch so it won't in __sev_launch_update_vmsa()
|
| /linux/arch/x86/kvm/vmx/ |
| H A D | vmx.c | |