/kernel/linux/linux-5.10/arch/x86/kernel/fpu/ |
H A D | regset.c | 40 return membuf_write(&to, &fpu->state.fxsave, sizeof(struct fxregs_state)); in xfpregs_get() 57 &fpu->state.fxsave, 0, -1); in xfpregs_set() 62 fpu->state.fxsave.mxcsr &= mxcsr_feature_mask; in xfpregs_set() 179 static inline u32 twd_fxsr_to_i387(struct fxregs_state *fxsave) in twd_fxsr_to_i387() argument 182 u32 tos = (fxsave->swd >> 11) & 7; in twd_fxsr_to_i387() 183 u32 twd = (unsigned long) fxsave->twd; in twd_fxsr_to_i387() 190 st = FPREG_ADDR(fxsave, (i - tos) & 7); in twd_fxsr_to_i387() 227 struct fxregs_state *fxsave = &tsk->thread.fpu.state.fxsave; in convert_from_fxsr() local 229 struct _fpxreg *from = (struct _fpxreg *) &fxsave in convert_from_fxsr() 261 convert_to_fxsr(struct fxregs_state *fxsave, const struct user_i387_ia32_struct *env) convert_to_fxsr() argument [all...] |
H A D | core.c | 192 fpstate_init_fxstate(&state->fxsave); in fpstate_init() 333 copy_kernel_to_fxregs(&init_fpstate.fxsave); in copy_init_fpstate_to_fpregs() 444 cwd = fpu->state.fxsave.cwd; in fpu__exception_code() 445 swd = fpu->state.fxsave.swd; in fpu__exception_code() 462 mxcsr = fpu->state.fxsave.mxcsr; in fpu__exception_code()
|
H A D | signal.c | 246 convert_to_fxsr(&state->fxsave, ia32_env); in sanitize_restored_user_xstate() 440 ret = __copy_from_user(&fpu->state.fxsave, buf_fx, state_size); in __fpu__restore_sig() 457 ret = copy_kernel_to_fxregs_err(&fpu->state.fxsave); in __fpu__restore_sig() 517 * Prepare the SW reserved portion of the fxsave memory layout, indicating
|
H A D | xstate.c | 144 struct fxregs_state *fx = &fpu->state.fxsave; in fpstate_sanitize_xstate() 507 fxsave(&init_fpstate.fxsave); in setup_init_fpu_buf()
|
/kernel/linux/linux-6.6/arch/x86/kernel/fpu/ |
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() 119 BUILD_BUG_ON(sizeof(fpu->__fpstate.regs.fxsave.xmm_space) != 16 * 16); in xfpregs_set() 121 memset(&fpu->fpstate->regs.fxsave.xmm_space[8*4], 0, 8 * 16); in xfpregs_set() 285 static inline u32 twd_fxsr_to_i387(struct fxregs_state *fxsave) in twd_fxsr_to_i387() argument 288 u32 tos = (fxsave->swd >> 11) & 7; in twd_fxsr_to_i387() 289 u32 twd = (unsigned long) fxsave->twd; in twd_fxsr_to_i387() 296 st = FPREG_ADDR(fxsave, (i - tos) & 7); in twd_fxsr_to_i387() 332 struct fxregs_state *fxsave) in __convert_from_fxsr() 330 __convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk, struct fxregs_state *fxsave) __convert_from_fxsr() argument 373 convert_to_fxsr(struct fxregs_state *fxsave, const struct user_i387_ia32_struct *env) convert_to_fxsr() argument 405 struct fxregs_state fxsave, *fx; fpregs_get() local [all...] |
H A D | core.c | 124 fxsave(&fpu->fpstate->regs.fxsave); in save_fpregs_to_fpstate() 184 fxrstor(&fpstate->regs.fxsave); in restore_fpregs_from_fpstate() 382 memcpy(&ustate->fxsave, &kstate->regs.fxsave, in fpu_copy_guest_fpstate_to_uabi() 383 sizeof(ustate->fxsave)); in fpu_copy_guest_fpstate_to_uabi() 399 if (ustate->fxsave.mxcsr & ~mxcsr_feature_mask) in fpu_copy_uabi_to_guest_fpstate() 401 memcpy(&kstate->regs.fxsave, &ustate->fxsave, sizeof(ustate->fxsave)); in fpu_copy_uabi_to_guest_fpstate() [all...] |
H A D | signal.c | 78 fxsave(&tsk->thread.fpu.fpstate->regs.fxsave); in save_fsave_header() 99 * Prepare the SW reserved portion of the fxsave memory layout, indicating 399 if (__copy_from_user(&fpregs->fxsave, buf_fx, in __fpu_restore_sig() 400 sizeof(fpregs->fxsave))) in __fpu_restore_sig() 405 if (fpregs->fxsave.mxcsr & ~mxcsr_feature_mask) in __fpu_restore_sig() 409 fpregs->fxsave.mxcsr &= mxcsr_feature_mask; in __fpu_restore_sig() 418 convert_to_fxsr(&fpregs->fxsave, &env); in __fpu_restore_sig() 437 success = !fxrstor_safe(&fpregs->fxsave); in __fpu_restore_sig()
|
H A D | legacy.h | 58 return user_insn(fxsave %[fx], [fx] "=m" (*fx), "m" (*fx)); in fxsave_to_user_sigframe() 103 static inline void fxsave(struct fxregs_state *fx) in fxsave() function 106 asm volatile( "fxsave %[fx]" : [fx] "=m" (*fx)); in fxsave()
|
H A D | xstate.c | 389 fxsave(&init_fpstate.regs.fxsave); in setup_init_fpu_buf()
|
/kernel/linux/linux-5.10/arch/x86/um/ |
H A D | signal.c | 37 static inline unsigned long twd_fxsr_to_i387(struct user_fxsr_struct *fxsave) in twd_fxsr_to_i387() argument 40 unsigned long twd = (unsigned long) fxsave->twd; in twd_fxsr_to_i387() 49 st = (struct _fpxreg *) FPREG_ADDR(fxsave, i); in twd_fxsr_to_i387() 83 struct user_fxsr_struct *fxsave) in convert_fxsr_to_user() 90 env[0] = (unsigned long)fxsave->cwd | 0xffff0000ul; in convert_fxsr_to_user() 91 env[1] = (unsigned long)fxsave->swd | 0xffff0000ul; in convert_fxsr_to_user() 92 env[2] = twd_fxsr_to_i387(fxsave); in convert_fxsr_to_user() 93 env[3] = fxsave->fip; in convert_fxsr_to_user() 94 env[4] = fxsave->fcs | ((unsigned long)fxsave in convert_fxsr_to_user() 82 convert_fxsr_to_user(struct _fpstate __user *buf, struct user_fxsr_struct *fxsave) convert_fxsr_to_user() argument 115 convert_fxsr_from_user(struct user_fxsr_struct *fxsave, struct _fpstate __user *buf) convert_fxsr_from_user() argument [all...] |
/kernel/linux/linux-6.6/arch/x86/um/ |
H A D | signal.c | 38 static inline unsigned long twd_fxsr_to_i387(struct user_fxsr_struct *fxsave) in twd_fxsr_to_i387() argument 41 unsigned long twd = (unsigned long) fxsave->twd; in twd_fxsr_to_i387() 50 st = (struct _fpxreg *) FPREG_ADDR(fxsave, i); in twd_fxsr_to_i387() 84 struct user_fxsr_struct *fxsave) in convert_fxsr_to_user() 91 env[0] = (unsigned long)fxsave->cwd | 0xffff0000ul; in convert_fxsr_to_user() 92 env[1] = (unsigned long)fxsave->swd | 0xffff0000ul; in convert_fxsr_to_user() 93 env[2] = twd_fxsr_to_i387(fxsave); in convert_fxsr_to_user() 94 env[3] = fxsave->fip; in convert_fxsr_to_user() 95 env[4] = fxsave->fcs | ((unsigned long)fxsave in convert_fxsr_to_user() 83 convert_fxsr_to_user(struct _fpstate __user *buf, struct user_fxsr_struct *fxsave) convert_fxsr_to_user() argument 116 convert_fxsr_from_user(struct user_fxsr_struct *fxsave, struct _fpstate __user *buf) convert_fxsr_from_user() argument [all...] |
/kernel/linux/linux-5.10/arch/x86/include/asm/fpu/ |
H A D | internal.h | 155 return user_insn(fxsave %[fx], [fx] "=m" (*fx), "m" (*fx)); in copy_fxregs_to_user() 203 asm volatile( "fxsave %[fx]" : [fx] "=m" (fpu->state.fxsave)); in copy_fxregs_to_kernel() 205 asm volatile("fxsaveq %[fx]" : [fx] "=m" (fpu->state.fxsave)); in copy_fxregs_to_kernel() 208 static inline void fxsave(struct fxregs_state *fx) in fxsave() function 211 asm volatile( "fxsave %[fx]" : [fx] "=m" (*fx)); in fxsave() 413 copy_kernel_to_fxregs(&fpstate->fxsave); in __copy_kernel_to_fpregs()
|
H A D | signal.h | 25 extern void convert_to_fxsr(struct fxregs_state *fxsave,
|
H A D | types.h | 306 struct fxregs_state fxsave; member
|
/kernel/linux/linux-6.6/arch/x86/include/asm/fpu/ |
H A D | signal.h | 23 extern void convert_to_fxsr(struct fxregs_state *fxsave,
|
H A D | types.h | 350 struct fxregs_state fxsave; member
|
/kernel/linux/linux-5.10/arch/x86/kvm/ |
H A D | x86.c | 4652 &vcpu->arch.guest_fpu->state.fxsave, in kvm_vcpu_ioctl_x86_get_xsave() 4681 memcpy(&vcpu->arch.guest_fpu->state.fxsave, in kvm_vcpu_ioctl_x86_set_xsave() 10094 struct fxregs_state *fxsave; in kvm_arch_vcpu_ioctl_get_fpu() local 10098 fxsave = &vcpu->arch.guest_fpu->state.fxsave; in kvm_arch_vcpu_ioctl_get_fpu() 10099 memcpy(fpu->fpr, fxsave->st_space, 128); in kvm_arch_vcpu_ioctl_get_fpu() 10100 fpu->fcw = fxsave->cwd; in kvm_arch_vcpu_ioctl_get_fpu() 10101 fpu->fsw = fxsave->swd; in kvm_arch_vcpu_ioctl_get_fpu() 10102 fpu->ftwx = fxsave->twd; in kvm_arch_vcpu_ioctl_get_fpu() 10103 fpu->last_opcode = fxsave in kvm_arch_vcpu_ioctl_get_fpu() 10114 struct fxregs_state *fxsave; kvm_arch_vcpu_ioctl_set_fpu() local [all...] |
/kernel/linux/linux-6.6/arch/x86/kvm/ |
H A D | x86.c | 11751 struct fxregs_state *fxsave; in kvm_arch_vcpu_ioctl_get_fpu() local 11758 fxsave = &vcpu->arch.guest_fpu.fpstate->regs.fxsave; in kvm_arch_vcpu_ioctl_get_fpu() 11759 memcpy(fpu->fpr, fxsave->st_space, 128); in kvm_arch_vcpu_ioctl_get_fpu() 11760 fpu->fcw = fxsave->cwd; in kvm_arch_vcpu_ioctl_get_fpu() 11761 fpu->fsw = fxsave->swd; in kvm_arch_vcpu_ioctl_get_fpu() 11762 fpu->ftwx = fxsave->twd; in kvm_arch_vcpu_ioctl_get_fpu() 11763 fpu->last_opcode = fxsave->fop; in kvm_arch_vcpu_ioctl_get_fpu() 11764 fpu->last_ip = fxsave->rip; in kvm_arch_vcpu_ioctl_get_fpu() 11765 fpu->last_dp = fxsave in kvm_arch_vcpu_ioctl_get_fpu() 11774 struct fxregs_state *fxsave; kvm_arch_vcpu_ioctl_set_fpu() local [all...] |