Home
last modified time | relevance | path

Searched refs:fpstate (Results 1 – 24 of 24) sorted by relevance

/linux/arch/x86/kernel/fpu/
H A Dcore.c47 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 Dxstate.c432 struct fpstate *fpstate) in validate_user_xstate_header() argument
435 if (hdr->xfeatures & ~fpstate->user_xfeatures) in validate_user_xstate_header()
990 wrmsrq(MSR_IA32_XFD, x86_task_fpu(current)->fpstate->xfd); in fpu__resume_cpu()
1145 void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate, in __copy_xstate_to_uabi_buf() argument
1151 struct xregs_state *xsave = &fpstate->regs.xsave; in __copy_xstate_to_uabi_buf()
1170 header.xfeatures &= fpstate->user_xfeatures & xfeatures; in __copy_xstate_to_uabi_buf()
1272 __copy_xstate_to_uabi_buf(to, x86_task_fpu(tsk)->fpstate, in copy_xstate_to_uabi_buf()
1273 x86_task_fpu(tsk)->fpstate->user_xfeatures, in copy_xstate_to_uabi_buf()
1318 static int copy_uabi_to_xstate(struct fpstate *fpstate, const void *kbuf, in copy_uabi_to_xstate() argument
1321 struct xregs_state *xsave = &fpstate->regs.xsave; in copy_uabi_to_xstate()
[all …]
/linux/arch/m68k/kernel/
H A Dsignal.c335 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 Dprocess.c185 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 Dasm-offsets.c40 DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate)); in main()
/linux/arch/x86/include/asm/fpu/
H A Dtypes.h377 struct fpstate { struct
499 struct fpstate *fpstate; member
507 struct fpstate *__task_fpstate;
531 struct fpstate __fpstate;
561 struct fpstate *fpstate; member
H A Dsignal.h36 extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
/linux/arch/x86/um/
H A Dsignal.c24 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 Dsigcontext.h193 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 Dcorrupt_xstate_header.c36 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 Dfpu.h25 __entry->xfeatures = fpu->fpstate->regs.xsave.header.xfeatures;
26 __entry->xcomp_bv = fpu->fpstate->regs.xsave.header.xcomp_bv;
/linux/arch/x86/include/asm/
H A Dsighandling.h20 void __user **fpstate);
/linux/arch/x86/kernel/
H A Dsignal_32.c146 return fpu__restore_sig(compat_ptr(sc.fpstate), 1); in ia32_restore_sigcontext()
212 void __user *fpstate, in __unsafe_setup_sigcontext32() argument
242 unsafe_put_user(ptr_to_compat(fpstate), &sc->fpstate, Efault); in __unsafe_setup_sigcontext32()
H A Dsignal_64.c95 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/arm/nwfpe/
H A Dfpa11.h13 #define GET_FPA11() ((FPA11 *)(&current_thread_info()->fpstate))
H A Dfpmodule.c53 nwfpe_init_fpa(&thread->fpstate); in nwfpe_notify()
/linux/arch/arm/kernel/
H A Dptrace.c301 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 Dasm-offsets.c55 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 Dprocess.c226 memset(&thread->fpstate, 0, sizeof(union fp_state)); in flush_thread()
/linux/arch/arm/include/asm/
H A Dthread_info.h71 union fp_state fpstate __attribute__((aligned(8))); member
/linux/arch/x86/um/os-Linux/
H A Dmcontext.c89 struct _fpstate_64 fpstate; member
/linux/arch/x86/kvm/
H A Dx86.c3871 KVM_BUG_ON(!vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm); in kvm_access_xstate_msr()
4620 msr_info->data = vcpu->arch.guest_fpu.fpstate->xfd; in kvm_get_msr_common()
5820 xstate->xsave.header.xfeatures &= ~vcpu->arch.guest_fpu.fpstate->xfd; in kvm_vcpu_ioctl_x86_set_xsave()
11846 if (KVM_BUG_ON(vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm)) in kvm_load_guest_fpu()
11857 if (KVM_BUG_ON(!vcpu->arch.guest_fpu.fpstate->in_use, vcpu->kvm)) in kvm_put_guest_fpu()
12579 fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave; in kvm_arch_vcpu_ioctl_get_fpu()
12602 fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave; in kvm_arch_vcpu_ioctl_set_fpu()
12819 struct fpstate *fpstate = vcpu->arch.guest_fpu.fpstate; in kvm_xstate_reset() local
12828 if (!init_event || !fpstate) in kvm_xstate_reset()
12854 WARN_ON_ONCE(vcpu->wants_to_run != fpstate->in_use); in kvm_xstate_reset()
[all …]
/linux/arch/x86/kvm/svm/
H A Dsev.c924 xsave = &vcpu->arch.guest_fpu.fpstate->regs.xsave; in sev_es_sync_vmsa()
/linux/arch/x86/kvm/vmx/
H A Dvmx.c5302 return vcpu->arch.guest_fpu.fpstate->xfd && in is_xfd_nm_fault()