Searched refs:xsave (Results 1 - 16 of 16) sorted by relevance

/linux-4.4.14/arch/x86/kernel/fpu/
H A Dsignal.c57 struct xregs_state *xsave = &tsk->thread.fpu.state.xsave; save_fsave_header() local
64 __put_user(xsave->i387.swd, &fp->status) || save_fsave_header()
84 /* Setup the bytes not touched by the [f]xsave and reserved for SW. */ save_xstate_epilog()
104 * xfeatures in the xsave header. save_xstate_epilog()
106 * xsave aware apps can change the xfeatures in the xsave save_xstate_epilog()
150 * For [f]xsave state, update the SW reserved fields in the [f]xsave frame
155 struct xregs_state *xsave = &current->thread.fpu.state.xsave; copy_fpstate_to_sigframe() local
179 if (__copy_to_user(buf_fx, xsave, xstate_size)) copy_fpstate_to_sigframe()
198 struct xregs_state *xsave = &tsk->thread.fpu.state.xsave; sanitize_restored_xstate() local
199 struct xstate_header *header = &xsave->header; sanitize_restored_xstate()
220 xsave->i387.mxcsr &= mxcsr_feature_mask; sanitize_restored_xstate()
234 copy_kernel_to_xregs(&init_fpstate.xsave, init_bv); copy_user_to_fpregs_zeroing()
239 copy_kernel_to_xregs(&init_fpstate.xsave, init_bv); copy_user_to_fpregs_zeroing()
311 if (__copy_from_user(&fpu->state.xsave, buf_fx, state_size) || __fpu__restore_sig()
H A Dregset.c11 * capabilites supported by the xsave.
65 * update the header bits in the xsave header, indicating the xfpregs_set()
69 fpu->state.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE; xfpregs_set()
79 struct xregs_state *xsave; xstateregs_get() local
87 xsave = &fpu->state.xsave; xstateregs_get()
94 memcpy(&xsave->i387.sw_reserved, xstateregs_get()
99 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, xsave, 0, -1); xstateregs_get()
108 struct xregs_state *xsave; xstateregs_set() local
116 xsave = &fpu->state.xsave; xstateregs_set()
118 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, xsave, 0, -1); xstateregs_set()
122 xsave->i387.mxcsr &= mxcsr_feature_mask; xstateregs_set()
123 xsave->header.xfeatures &= xfeatures_mask; xstateregs_set()
127 memset(&xsave->header.reserved, 0, 48); xstateregs_set()
325 * update the header bit in the xsave header, indicating the fpregs_set()
329 fpu->state.xsave.header.xfeatures |= XFEATURE_MASK_FP; fpregs_set()
H A Dxstate.c2 * xsave/xrstor support.
119 xfeatures = fpu->state.xsave.header.xfeatures; fpstate_sanitize_xstate()
165 (void *)&init_fpstate.xsave + offset, fpstate_sanitize_xstate()
253 * xsave area. This supports both standard format and compacted format
254 * of the xsave aread.
263 * in the fixed offsets in the xsave area in either compacted form setup_xstate_comp()
312 init_fpstate.xsave.header.xcomp_bv = (u64)1 << 63 | xfeatures_mask; setup_init_fpu_buf()
313 init_fpstate.xsave.header.xfeatures = xfeatures_mask; setup_init_fpu_buf()
319 copy_kernel_to_xregs_booting(&init_fpstate.xsave); setup_init_fpu_buf()
325 copy_xregs_to_kernel_booting(&init_fpstate.xsave); setup_init_fpu_buf()
468 * there are "holes" in the xsave state component check_xstate_against_struct()
570 pr_warn("x86/fpu: xstate buffer too small (%zu < %d), disabling xsave\n", is_supported_xstate_size()
585 * The size is OK, we are definitely going to use xsave, init_xstate_size()
605 * Enable and initialize the xsave feature.
664 * Restore XCR0 on xsave capable CPUs: fpu__resume_cpu()
671 * Given the xsave area and a state inside, this function returns the
675 * standard format or compacted format of xsave area.
677 * Note that if there is no data for the field in the xsave buffer
682 * xstate_feature: state which is defined in xsave.h (e.g.
685 * address of the state in the xsave area, or NULL if the
686 * field is not present in the xsave buffer.
688 void *get_xsave_addr(struct xregs_state *xsave, int xstate_feature) get_xsave_addr() argument
692 * Do we even *have* xsave state? get_xsave_addr()
705 * This assumes the last 'xsave*' instruction to get_xsave_addr()
710 * This can happen because the last 'xsave' did not get_xsave_addr()
715 if (!(xsave->header.xfeatures & xstate_feature)) get_xsave_addr()
718 return (void *)xsave + xstate_comp_offsets[feature_nr]; get_xsave_addr()
724 * data from xsave state. It first ensures that the current task was
733 * @xsave_state: state which is defined in xsave.h (e.g. XFEATURE_MASK_FP,
736 * address of the state in the xsave area or NULL if the state
751 return get_xsave_addr(&fpu->state.xsave, xsave_state); get_xsave_field_ptr()
H A Dcore.c241 memset(&dst_fpu->state.xsave, 0, xstate_size); fpu_copy()
411 copy_kernel_to_xregs(&init_fpstate.xsave, -1); copy_init_fpstate_to_fpregs()
H A Dinit.c203 * Disable xsave as we do not support it if i387 fpu__init_system_xstate_size_legacy()
/linux-4.4.14/arch/x86/include/asm/fpu/
H A Dxstate.h48 void *get_xsave_addr(struct xregs_state *xsave, int xstate);
H A Dinternal.h301 * Save processor xstate to xsave area.
317 * Otherwise, if xsaveopt is enabled, xsaveopt replaces xsave copy_xregs_to_kernel()
319 * supported by xsave. copy_xregs_to_kernel()
321 * If none of xsaves and xsaveopt is enabled, use xsave. copy_xregs_to_kernel()
341 * Restore processor xstate from xsave area.
351 * compacted format of xsave area which is not supported by xrstor. copy_kernel_to_xregs()
370 * Save xstate to user space xsave area.
375 * We don't use compacted format xsave area for
377 * compacted format of xsave area.
384 * Clear the xsave header first, so that reserved fields are copy_xregs_to_user()
401 * Restore xstate from user space xsave area.
432 copy_xregs_to_kernel(&fpu->state.xsave); copy_fpregs_to_fpstate()
453 copy_kernel_to_xregs(&fpstate->xsave, -1); __copy_kernel_to_fpregs()
595 * If the task has used the math, pre-load the FPU on xsave processors switch_fpu_prepare()
H A Dtypes.h241 * member - which is the xsave area. The padding is there
249 struct xregs_state xsave; member in union:fpregs_state
/linux-4.4.14/arch/x86/include/asm/
H A Dsigframe.h29 * future state extensions (xsave) stay together.
H A Duser.h26 * interfaces will be same as the memory layout of xsave used by the processor
/linux-4.4.14/arch/x86/include/uapi/asm/
H A Dprocessor-flags.h115 #define X86_CR4_OSXSAVE_BIT 18 /* enable xsave and xrestore */
/linux-4.4.14/include/video/
H A Dnewport.h161 npireg_t xsave; /* copy of xstart integer value for BLOCk addressing MODE */ member in struct:newport_rexregs
311 unsigned int xsave; member in struct:__anon14699
/linux-4.4.14/arch/x86/kvm/
H A Dx86.c3036 struct xregs_state *xsave = &vcpu->arch.guest_fpu.state.xsave; fill_xsave() local
3037 u64 xstate_bv = xsave->header.xfeatures; fill_xsave()
3044 memcpy(dest, xsave, XSAVE_HDR_OFFSET); fill_xsave()
3057 void *src = get_xsave_addr(xsave, feature); fill_xsave()
3072 struct xregs_state *xsave = &vcpu->arch.guest_fpu.state.xsave; load_xsave() local
3080 memcpy(xsave, src, XSAVE_HDR_OFFSET); load_xsave()
3083 xsave->header.xfeatures = xstate_bv; load_xsave()
3085 xsave->header.xcomp_bv = host_xcr0 | XSTATE_COMPACTION_ENABLED; load_xsave()
3095 void *dest = get_xsave_addr(xsave, feature); load_xsave()
3207 struct kvm_xsave *xsave; kvm_arch_vcpu_ioctl() member in union:__anon3205
3394 u.xsave = kzalloc(sizeof(struct kvm_xsave), GFP_KERNEL); kvm_arch_vcpu_ioctl()
3396 if (!u.xsave) kvm_arch_vcpu_ioctl()
3399 kvm_vcpu_ioctl_x86_get_xsave(vcpu, u.xsave); kvm_arch_vcpu_ioctl()
3402 if (copy_to_user(argp, u.xsave, sizeof(struct kvm_xsave))) kvm_arch_vcpu_ioctl()
3408 u.xsave = memdup_user(argp, sizeof(*u.xsave)); kvm_arch_vcpu_ioctl()
3409 if (IS_ERR(u.xsave)) kvm_arch_vcpu_ioctl()
3410 return PTR_ERR(u.xsave); kvm_arch_vcpu_ioctl()
3412 r = kvm_vcpu_ioctl_x86_set_xsave(vcpu, u.xsave); kvm_arch_vcpu_ioctl()
7203 vcpu->arch.guest_fpu.state.xsave.header.xcomp_bv = fx_init()
/linux-4.4.14/include/uapi/linux/
H A Delf.h384 #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
/linux-4.4.14/arch/x86/mm/
H A Dmpx.c261 /* get bndregs field from current task's xsave area */ mpx_generate_siginfo()
317 * only accessible if we first do an xsave. mpx_get_bounds_dir()
352 * directory here means that we do not have to do xsave in the mpx_enable_management()
/linux-4.4.14/arch/x86/kernel/
H A Duprobes.c207 * 0f ae - group15: [f]xsave,[f]xrstor,[v]{ld,st}mxcsr,clflush[opt],

Completed in 306 milliseconds