Searched refs:fxsave (Results 1 - 10 of 10) sorted by relevance
/linux-4.4.14/arch/x86/kernel/fpu/ |
H A D | regset.c | 40 &fpu->state.fxsave, 0, -1); xfpregs_get() 57 &fpu->state.fxsave, 0, -1); xfpregs_set() 62 fpu->state.fxsave.mxcsr &= mxcsr_feature_mask; xfpregs_set() 159 static inline u32 twd_fxsr_to_i387(struct fxregs_state *fxsave) twd_fxsr_to_i387() argument 162 u32 tos = (fxsave->swd >> 11) & 7; twd_fxsr_to_i387() 163 u32 twd = (unsigned long) fxsave->twd; twd_fxsr_to_i387() 170 st = FPREG_ADDR(fxsave, (i - tos) & 7); twd_fxsr_to_i387() 207 struct fxregs_state *fxsave = &tsk->thread.fpu.state.fxsave; convert_from_fxsr() local 209 struct _fpxreg *from = (struct _fpxreg *) &fxsave->st_space[0]; convert_from_fxsr() 212 env->cwd = fxsave->cwd | 0xffff0000u; convert_from_fxsr() 213 env->swd = fxsave->swd | 0xffff0000u; convert_from_fxsr() 214 env->twd = twd_fxsr_to_i387(fxsave); convert_from_fxsr() 217 env->fip = fxsave->rip; convert_from_fxsr() 218 env->foo = fxsave->rdp; convert_from_fxsr() 231 env->fip = fxsave->fip; convert_from_fxsr() 232 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16); convert_from_fxsr() 233 env->foo = fxsave->foo; convert_from_fxsr() 234 env->fos = fxsave->fos; convert_from_fxsr() 245 struct fxregs_state *fxsave = &tsk->thread.fpu.state.fxsave; convert_to_fxsr() local 247 struct _fpxreg *to = (struct _fpxreg *) &fxsave->st_space[0]; convert_to_fxsr() 250 fxsave->cwd = env->cwd; convert_to_fxsr() 251 fxsave->swd = env->swd; convert_to_fxsr() 252 fxsave->twd = twd_i387_to_fxsr(env->twd); convert_to_fxsr() 253 fxsave->fop = (u16) ((u32) env->fcs >> 16); convert_to_fxsr() 255 fxsave->rip = env->fip; convert_to_fxsr() 256 fxsave->rdp = env->foo; convert_to_fxsr() 259 fxsave->fip = env->fip; convert_to_fxsr() 260 fxsave->fcs = (env->fcs & 0xffff); convert_to_fxsr() 261 fxsave->foo = env->foo; convert_to_fxsr() 262 fxsave->fos = env->fos; convert_to_fxsr()
|
H A D | core.c | 220 fpstate_init_fxstate(&state->fxsave); fpstate_init() 413 copy_kernel_to_fxregs(&init_fpstate.fxsave); copy_init_fpstate_to_fpregs() 445 return fpu->state.fxsave.cwd; get_fpu_cwd() 454 return fpu->state.fxsave.swd; get_fpu_swd() 463 return fpu->state.fxsave.mxcsr; get_fpu_mxcsr()
|
H A D | init.c | 108 asm volatile("fxsave %0" : "+m" (fxregs)); fpu__init_system_mxcsr() 132 fpstate_init_fxstate(&init_fpstate.fxsave); fpu__init_system_generic()
|
H A D | signal.c | 380 * Prepare the SW reserved portion of the fxsave memory layout, indicating
|
H A D | xstate.c | 112 struct fxregs_state *fx = &fpu->state.fxsave; fpstate_sanitize_xstate()
|
/linux-4.4.14/arch/x86/um/ |
H A D | signal.c | 37 static inline unsigned long twd_fxsr_to_i387(struct user_fxsr_struct *fxsave) twd_fxsr_to_i387() argument 40 unsigned long twd = (unsigned long) fxsave->twd; twd_fxsr_to_i387() 49 st = (struct _fpxreg *) FPREG_ADDR(fxsave, i); twd_fxsr_to_i387() 83 struct user_fxsr_struct *fxsave) convert_fxsr_to_user() 90 env[0] = (unsigned long)fxsave->cwd | 0xffff0000ul; convert_fxsr_to_user() 91 env[1] = (unsigned long)fxsave->swd | 0xffff0000ul; convert_fxsr_to_user() 92 env[2] = twd_fxsr_to_i387(fxsave); convert_fxsr_to_user() 93 env[3] = fxsave->fip; convert_fxsr_to_user() 94 env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16); convert_fxsr_to_user() 95 env[5] = fxsave->foo; convert_fxsr_to_user() 96 env[6] = fxsave->fos; convert_fxsr_to_user() 102 from = (struct _fpxreg *) &fxsave->st_space[0]; convert_fxsr_to_user() 115 static int convert_fxsr_from_user(struct user_fxsr_struct *fxsave, convert_fxsr_from_user() argument 126 fxsave->cwd = (unsigned short)(env[0] & 0xffff); convert_fxsr_from_user() 127 fxsave->swd = (unsigned short)(env[1] & 0xffff); convert_fxsr_from_user() 128 fxsave->twd = twd_i387_to_fxsr((unsigned short)(env[2] & 0xffff)); convert_fxsr_from_user() 129 fxsave->fip = env[3]; convert_fxsr_from_user() 130 fxsave->fop = (unsigned short)((env[4] & 0xffff0000ul) >> 16); convert_fxsr_from_user() 131 fxsave->fcs = (env[4] & 0xffff); convert_fxsr_from_user() 132 fxsave->foo = env[5]; convert_fxsr_from_user() 133 fxsave->fos = env[6]; convert_fxsr_from_user() 135 to = (struct _fpxreg *) &fxsave->st_space[0]; convert_fxsr_from_user() 82 convert_fxsr_to_user(struct _fpstate __user *buf, struct user_fxsr_struct *fxsave) convert_fxsr_to_user() argument
|
/linux-4.4.14/arch/x86/include/asm/fpu/ |
H A D | internal.h | 136 return user_insn(fxsave %[fx], [fx] "=m" (*fx), "m" (*fx)); copy_fxregs_to_user() 141 return user_insn(rex64/fxsave (%[fx]), "=m" (*fx), [fx] "R" (fx)); copy_fxregs_to_user() 189 asm volatile( "fxsave %[fx]" : [fx] "=m" (fpu->state.fxsave)); copy_fxregs_to_kernel() 191 asm volatile("fxsaveq %[fx]" : [fx] "=m" (fpu->state.fxsave)); copy_fxregs_to_kernel() 193 /* Using "rex64; fxsave %0" is broken because, if the memory copy_fxregs_to_kernel() 208 * asm volatile("rex64/fxsave %0" : "=m" (fpu->state.fxsave)); copy_fxregs_to_kernel() 214 asm volatile( "rex64/fxsave (%[fx])" copy_fxregs_to_kernel() 215 : "=m" (fpu->state.fxsave) copy_fxregs_to_kernel() 216 : [fx] "R" (&fpu->state.fxsave)); copy_fxregs_to_kernel() 456 copy_kernel_to_fxregs(&fpstate->fxsave); __copy_kernel_to_fpregs()
|
H A D | types.h | 247 struct fxregs_state fxsave; member in union:fpregs_state
|
/linux-4.4.14/arch/x86/include/uapi/asm/ |
H A D | kvm.h | 161 __u8 ftwx; /* in fxsave format */
|
/linux-4.4.14/arch/x86/kvm/ |
H A D | x86.c | 3116 &vcpu->arch.guest_fpu.state.fxsave, kvm_vcpu_ioctl_x86_get_xsave() 3141 memcpy(&vcpu->arch.guest_fpu.state.fxsave, kvm_vcpu_ioctl_x86_set_xsave() 7167 struct fxregs_state *fxsave = kvm_arch_vcpu_ioctl_get_fpu() local 7168 &vcpu->arch.guest_fpu.state.fxsave; kvm_arch_vcpu_ioctl_get_fpu() 7170 memcpy(fpu->fpr, fxsave->st_space, 128); kvm_arch_vcpu_ioctl_get_fpu() 7171 fpu->fcw = fxsave->cwd; kvm_arch_vcpu_ioctl_get_fpu() 7172 fpu->fsw = fxsave->swd; kvm_arch_vcpu_ioctl_get_fpu() 7173 fpu->ftwx = fxsave->twd; kvm_arch_vcpu_ioctl_get_fpu() 7174 fpu->last_opcode = fxsave->fop; kvm_arch_vcpu_ioctl_get_fpu() 7175 fpu->last_ip = fxsave->rip; kvm_arch_vcpu_ioctl_get_fpu() 7176 fpu->last_dp = fxsave->rdp; kvm_arch_vcpu_ioctl_get_fpu() 7177 memcpy(fpu->xmm, fxsave->xmm_space, sizeof fxsave->xmm_space); kvm_arch_vcpu_ioctl_get_fpu() 7184 struct fxregs_state *fxsave = kvm_arch_vcpu_ioctl_set_fpu() local 7185 &vcpu->arch.guest_fpu.state.fxsave; kvm_arch_vcpu_ioctl_set_fpu() 7187 memcpy(fxsave->st_space, fpu->fpr, 128); kvm_arch_vcpu_ioctl_set_fpu() 7188 fxsave->cwd = fpu->fcw; kvm_arch_vcpu_ioctl_set_fpu() 7189 fxsave->swd = fpu->fsw; kvm_arch_vcpu_ioctl_set_fpu() 7190 fxsave->twd = fpu->ftwx; kvm_arch_vcpu_ioctl_set_fpu() 7191 fxsave->fop = fpu->last_opcode; kvm_arch_vcpu_ioctl_set_fpu() 7192 fxsave->rip = fpu->last_ip; kvm_arch_vcpu_ioctl_set_fpu() 7193 fxsave->rdp = fpu->last_dp; kvm_arch_vcpu_ioctl_set_fpu() 7194 memcpy(fxsave->xmm_space, fpu->xmm, sizeof fxsave->xmm_space); kvm_arch_vcpu_ioctl_set_fpu()
|
Completed in 254 milliseconds