Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/arch/x86/kernel/fpu/
H A Dregset.c14 * capabilities supported by the xsave.
65 * update the header bits in the xsave header, indicating the in xfpregs_set()
69 fpu->state.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE; in xfpregs_set()
78 struct xregs_state *xsave; in xstateregs_get() local
83 xsave = &fpu->state.xsave; in xstateregs_get()
88 copy_xstate_to_kernel(to, xsave); in xstateregs_get()
93 * Copy the 48 bytes defined by the software into the xsave in xstateregs_get()
97 memcpy(&xsave->i387.sw_reserved, xstate_fx_sw_bytes, sizeof(xstate_fx_sw_bytes)); in xstateregs_get()
102 return membuf_write(&to, xsave, fpu_user_xstate_siz in xstateregs_get()
111 struct xregs_state *xsave; xstateregs_set() local
[all...]
H A Dsignal.c61 struct xregs_state *xsave = &tsk->thread.fpu.state.xsave; in save_fsave_header() local
73 __put_user(xsave->i387.swd, &fp->status) || in save_fsave_header()
93 /* Setup the bytes not touched by the [f]xsave and reserved for SW. */ in save_xstate_epilog()
114 * xfeatures in the xsave header. in save_xstate_epilog()
116 * xsave aware apps can change the xfeatures in the xsave in save_xstate_epilog()
161 * For [f]xsave state, update the SW reserved fields in the [f]xsave frame
219 struct xregs_state *xsave in sanitize_restored_user_xstate() local
[all...]
H A Dxstate.c3 * xsave/xrstor support.
151 xfeatures = fpu->state.xsave.header.xfeatures; in fpstate_sanitize_xstate()
197 (void *)&init_fpstate.xsave + offset, in fpstate_sanitize_xstate()
261 * in the fixed offsets in the xsave area in either compacted form in setup_xstate_features()
362 * xsave area. This supports both standard format and compacted format
363 * of the xsave area.
372 * in the fixed offsets in the xsave area in either compacted form in setup_xstate_comp_offsets()
483 init_fpstate.xsave.header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT | in setup_init_fpu_buf()
489 copy_kernel_to_xregs_booting(&init_fpstate.xsave); in setup_init_fpu_buf()
637 * there are "holes" in the xsave stat in check_xstate_against_struct()
942 __raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr) __raw_xsave_addr() argument
969 get_xsave_addr(struct xregs_state *xsave, int xfeature_nr) get_xsave_addr() argument
1108 copy_xstate_to_kernel(struct membuf to, struct xregs_state *xsave) copy_xstate_to_kernel() argument
1191 copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf) copy_kernel_to_xstate() argument
1244 copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf) copy_user_to_xstate() argument
[all...]
H A Dcore.c83 copy_xregs_to_kernel(&fpu->state.xsave); in copy_fpregs_to_fpstate()
89 if (fpu->state.xsave.header.xfeatures & XFEATURE_MASK_AVX512) in copy_fpregs_to_fpstate()
190 fpstate_init_xstate(&state->xsave); in fpstate_init()
214 memset(&dst_fpu->state.xsave, 0, fpu_kernel_xstate_size); in fpu__copy()
331 copy_kernel_to_xregs(&init_fpstate.xsave, features_mask); in copy_init_fpstate_to_fpregs()
362 copy_kernel_to_xregs(&fpu->state.xsave, in fpu__clear()
/kernel/linux/linux-5.10/arch/x86/include/asm/fpu/
H A Dxstate.h103 void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
108 void copy_xstate_to_kernel(struct membuf to, struct xregs_state *xsave);
109 int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
110 int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
111 void copy_supervisor_to_kernel(struct xregs_state *xsave);
H A Dinternal.h90 static inline void fpstate_init_xstate(struct xregs_state *xsave) in fpstate_init_xstate() argument
96 xsave->header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT | xfeatures_mask_all; in fpstate_init_xstate()
310 * Save processor xstate to xsave area.
328 * Restore processor xstate from xsave area.
339 * Save xstate to user space xsave area.
344 * We don't use compacted format xsave area for
346 * compacted format of xsave area.
356 * Clear the xsave header first, so that reserved fields are in copy_xregs_to_user()
371 * Restore xstate from user space xsave area.
388 * Restore xstate from kernel space xsave are
[all...]
H A Dtypes.h300 * member - which is the xsave area. The padding is there
308 struct xregs_state xsave; member
/kernel/linux/linux-6.6/arch/x86/kernel/fpu/
H A Dxstate.c3 * xsave/xrstor support.
152 * compacted xsave area which is determined by the xcomp_bv header in xfeature_get_offset()
219 * in the fixed offsets in the xsave area in either compacted form in setup_xstate_cache()
366 xstate_init_xcomp_bv(&init_fpstate.regs.xsave, init_fpstate.xfeatures); in setup_init_fpu_buf()
371 os_xrstor_booting(&init_fpstate.regs.xsave); in setup_init_fpu_buf()
741 * Enable and initialize the xsave feature.
906 * Restore XCR0 on xsave capable CPUs: in fpu__resume_cpu()
925 * Given an xstate feature nr, calculate where in the xsave
929 static void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr) in __raw_xsave_addr() argument
931 u64 xcomp_bv = xsave in __raw_xsave_addr()
962 get_xsave_addr(struct xregs_state *xsave, int xfeature_nr) get_xsave_addr() argument
1068 struct xregs_state *xsave = &fpstate->regs.xsave; __copy_xstate_to_uabi_buf() local
1238 struct xregs_state *xsave = &fpstate->regs.xsave; copy_uabi_to_xstate() local
[all...]
H A Dxstate.h13 static inline void xstate_init_xcomp_bv(struct xregs_state *xsave, u64 mask) in xstate_init_xcomp_bv() argument
20 xsave->header.xcomp_bv = mask | XCOMP_BV_COMPACTED_FORMAT; in xstate_init_xcomp_bv()
57 extern void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
173 * Save processor xstate to xsave area.
188 XSTATE_XSAVE(&fpstate->regs.xsave, lmask, hmask, err); in os_xsave()
195 * Restore processor xstate from xsave area.
205 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor()
215 XSTATE_XRESTORE(&fpstate->regs.xsave, lmask, hmask); in os_xrstor_supervisor()
245 * Save xstate to user space xsave area.
250 * We don't use compacted format xsave are
[all...]
H A Dcore.c97 if (fpu->fpstate->regs.xsave.header.xfeatures & AVX512_TRACKING_MASK) in update_avx_timestamp()
166 * in fpstate::regs::xsave::xfeatures. in restore_fpregs_from_fpstate()
385 ustate->xsave.header.xfeatures = XFEATURE_MASK_FPSSE; in fpu_copy_guest_fpstate_to_uabi()
397 if (ustate->xsave.header.xfeatures & ~XFEATURE_MASK_FPSSE) in fpu_copy_uabi_to_guest_fpstate()
405 if (ustate->xsave.header.xfeatures & ~xcr0) in fpu_copy_uabi_to_guest_fpstate()
413 if (!(ustate->xsave.header.xfeatures & XFEATURE_MASK_PKRU)) in fpu_copy_uabi_to_guest_fpstate()
479 return sizeof(init_fpstate.regs.xsave); in init_fpstate_copy_size()
511 xstate_init_xcomp_bv(&fpstate->regs.xsave, fpstate->xfeatures); in fpstate_init_user()
566 xstate = get_xsave_addr(&dst->thread.fpu.fpstate->regs.xsave, in update_fpu_shstk()
643 dst_fpu->fpstate->regs.xsave in fpu_clone()
[all...]
H A Dsignal.c72 struct xregs_state *xsave = &tsk->thread.fpu.fpstate->regs.xsave; in save_fsave_header() local
84 __put_user(xsave->i387.swd, &fp->status) || in save_fsave_header()
125 /* Setup the bytes not touched by the [f]xsave and reserved for SW. */ in save_xstate_epilog()
146 * xfeatures in the xsave header. in save_xstate_epilog()
148 * xsave aware apps can change the xfeatures in the xsave in save_xstate_epilog()
185 * For [f]xsave state, update the SW reserved fields in the [f]xsave frame
213 * Clear the xsave heade in copy_fpstate_to_sigframe()
[all...]
H A Dregset.c21 * capabilities supported by the xsave.
125 fpu->fpstate->regs.xsave.header.xfeatures |= XFEATURE_MASK_FPSSE; in xfpregs_set()
197 cetregs = get_xsave_addr(&fpu->fpstate->regs.xsave, XFEATURE_CET_USER); in ssp_get()
217 struct xregs_state *xsave = &fpu->fpstate->regs.xsave; in ssp_set() local
242 cetregs = get_xsave_addr(xsave, XFEATURE_CET_USER); in ssp_set()
458 * Update the header bit in the xsave header, indicating the in fpregs_set()
462 fpu->fpstate->regs.xsave.header.xfeatures |= XFEATURE_MASK_FP; in fpregs_set()
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/x86_64/
H A Dstate_test.c305 xstate_bv = (void *)&((uint8_t *)state->xsave->region)[512]; in main()
309 vcpu_xsave_set(vcpuN, state->xsave); in main()
311 vcpu_xsave_set(vcpuN, state->xsave); in main()
314 vcpu_xsave_set(vcpuN, state->xsave); in main()
316 vcpu_xsave_set(vcpuN, state->xsave); in main()
/kernel/linux/linux-6.6/arch/x86/include/asm/fpu/
H A Dxstate.h111 void xsaves(struct xregs_state *xsave, u64 mask);
112 void xrstors(struct xregs_state *xsave, u64 mask);
/kernel/linux/linux-5.10/arch/x86/include/asm/trace/
H A Dfpu.h25 __entry->xfeatures = fpu->state.xsave.header.xfeatures;
26 __entry->xcomp_bv = fpu->state.xsave.header.xcomp_bv;
/kernel/linux/linux-6.6/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;
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dprotection_keys.c386 dprintf1("signal pkey_reg from xsave: %08x\n", *pkey_reg_ptr); in signal_handler()
1553 void *xsave; in test_ptrace_modifies_pkru() local
1593 xsave = (void *)malloc(xsave_size); in test_ptrace_modifies_pkru()
1594 pkey_assert(xsave > 0); in test_ptrace_modifies_pkru()
1597 iov.iov_base = xsave; in test_ptrace_modifies_pkru()
1602 pkey_register = (u32 *)(xsave + pkey_offset); in test_ptrace_modifies_pkru()
1611 memset(xsave, 0xCC, xsave_size); in test_ptrace_modifies_pkru()
1626 memset(xsave, 0xCC, xsave_size); in test_ptrace_modifies_pkru()
1632 xstate_bv = (u64 *)(xsave + 512); in test_ptrace_modifies_pkru()
1639 memset(xsave, in test_ptrace_modifies_pkru()
[all...]
/kernel/linux/linux-5.10/arch/x86/events/intel/
H A Dlbr.c487 * Restore the Architecture LBR state from the xsave area in the perf
494 copy_kernel_to_dynamic_supervisor(&task_ctx->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_xrstors()
572 * Save the Architecture LBR state to the xsave area in the perf
579 copy_dynamic_supervisor_to_kernel(&task_ctx->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_xsaves()
990 struct x86_perf_task_context_arch_lbr_xsave *xsave = cpuc->lbr_xsave; in intel_pmu_arch_lbr_read_xsave() local
992 if (!xsave) { in intel_pmu_arch_lbr_read_xsave()
996 copy_dynamic_supervisor_to_kernel(&xsave->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_read_xsave()
998 intel_pmu_store_lbr(cpuc, xsave->lbr.entries); in intel_pmu_arch_lbr_read_xsave()
/kernel/linux/linux-6.6/arch/x86/events/intel/
H A Dlbr.c406 * Restore the Architecture LBR state from the xsave area in the perf
413 xrstors(&task_ctx->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_xrstors()
491 * Save the Architecture LBR state to the xsave area in the perf
498 xsaves(&task_ctx->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_xsaves()
913 struct x86_perf_task_context_arch_lbr_xsave *xsave = cpuc->lbr_xsave; in intel_pmu_arch_lbr_read_xsave() local
915 if (!xsave) { in intel_pmu_arch_lbr_read_xsave()
919 xsaves(&xsave->xsave, XFEATURE_MASK_LBR); in intel_pmu_arch_lbr_read_xsave()
921 intel_pmu_store_lbr(cpuc, xsave->lbr.entries); in intel_pmu_arch_lbr_read_xsave()
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/include/x86_64/
H A Dprocessor.h378 struct kvm_xsave *xsave; member
836 struct kvm_xsave *xsave) in vcpu_xsave_get()
838 vcpu_ioctl(vcpu, KVM_GET_XSAVE, xsave); in vcpu_xsave_get()
841 struct kvm_xsave *xsave) in vcpu_xsave2_get()
843 vcpu_ioctl(vcpu, KVM_GET_XSAVE2, xsave); in vcpu_xsave2_get()
846 struct kvm_xsave *xsave) in vcpu_xsave_set()
848 vcpu_ioctl(vcpu, KVM_SET_XSAVE, xsave); in vcpu_xsave_set()
835 vcpu_xsave_get(struct kvm_vcpu *vcpu, struct kvm_xsave *xsave) vcpu_xsave_get() argument
840 vcpu_xsave2_get(struct kvm_vcpu *vcpu, struct kvm_xsave *xsave) vcpu_xsave2_get() argument
845 vcpu_xsave_set(struct kvm_vcpu *vcpu, struct kvm_xsave *xsave) vcpu_xsave_set() argument
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/lib/x86_64/
H A Dprocessor.c944 state->xsave = malloc(size); in vcpu_save_xsave_state()
945 vcpu_xsave2_get(vcpu, state->xsave); in vcpu_save_xsave_state()
947 state->xsave = malloc(sizeof(struct kvm_xsave)); in vcpu_save_xsave_state()
948 vcpu_xsave_get(vcpu, state->xsave); in vcpu_save_xsave_state()
1017 vcpu_xsave_set(vcpu, state->xsave); in vcpu_load_state()
1029 free(state->xsave); in kvm_x86_state_cleanup()
/kernel/linux/linux-6.6/lib/zstd/common/
H A Dcpu.h122 C(xsave, 26)
/kernel/linux/linux-5.10/include/video/
H A Dnewport.h162 npireg_t xsave; /* copy of xstart integer value for BLOCk addressing MODE */ member
312 unsigned int xsave; member
/kernel/linux/linux-6.6/include/video/
H A Dnewport.h162 npireg_t xsave; /* copy of xstart integer value for BLOCk addressing MODE */ member
312 unsigned int xsave; member
/kernel/linux/linux-6.6/tools/testing/selftests/x86/
H A Damx.c52 static inline void xsave(struct xsave_buffer *xbuf, uint64_t rfbm) in xsave() function
57 asm volatile("xsave (%%rdi)" in xsave()
117 fatal_error("cpuid: no CPU xsave support"); in check_cpuid_xsave()
119 fatal_error("cpuid: no OS xsave support"); in check_cpuid_xsave()
610 xsave(xbuf2, XFEATURE_MASK_XTILEDATA); in __validate_tiledata_regs()

Completed in 241 milliseconds

12