Lines Matching refs:xsave

3  * xsave/xrstor support.
156 * compacted xsave area which is determined by the xcomp_bv header
224 * in the fixed offsets in the xsave area in either compacted form
371 xstate_init_xcomp_bv(&init_fpstate.regs.xsave, init_fpstate.xfeatures);
376 os_xrstor_booting(&init_fpstate.regs.xsave);
746 * Enable and initialize the xsave feature.
909 * Restore XCR0 on xsave capable CPUs:
928 * Given an xstate feature nr, calculate where in the xsave
932 static void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr)
934 u64 xcomp_bv = xsave->header.xcomp_bv;
944 return (void *)xsave + xfeature_get_offset(xcomp_bv, xfeature_nr);
948 * Given the xsave area and a state inside, this function returns the
952 * standard format or compacted format of xsave area.
954 * Note that if there is no data for the field in the xsave buffer
959 * xfeature_nr: state which is defined in xsave.h (e.g. XFEATURE_FP,
962 * address of the state in the xsave area, or NULL if the
963 * field is not present in the xsave buffer.
965 void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr)
968 * Do we even *have* xsave state?
981 * This assumes the last 'xsave*' instruction to
986 * This can happen because the last 'xsave' did not
991 if (!(xsave->header.xfeatures & BIT_ULL(xfeature_nr)))
994 return __raw_xsave_addr(xsave, xfeature_nr);
999 * Given an xstate feature nr, calculate where in the xsave buffer the state is.
1000 * The xsave buffer should be in standard format, not compacted (e.g. user mode
1003 void __user *get_xsave_addr_user(struct xregs_state __user *xsave, int xfeature_nr)
1008 return (void __user *)xsave + xstate_offsets[xfeature_nr];
1084 struct xregs_state *xinit = &init_fpstate.regs.xsave;
1085 struct xregs_state *xsave = &fpstate->regs.xsave;
1092 header.xfeatures = xsave->header.xfeatures;
1110 copy_feature(header.xfeatures & XFEATURE_MASK_FP, &to, &xsave->i387,
1115 &to, &xsave->i387.mxcsr, &xinit->i387.mxcsr,
1120 &to, &xsave->i387.st_space, &xinit->i387.st_space,
1121 sizeof(xsave->i387.st_space));
1125 &to, &xsave->i387.xmm_space, &xinit->i387.xmm_space,
1126 sizeof(xsave->i387.xmm_space));
1132 membuf_zero(&to, sizeof(xsave->i387.padding));
1134 /* Copy xsave->i387.sw_reserved */
1135 membuf_write(&to, xstate_fx_sw_bytes, sizeof(xsave->i387.sw_reserved));
1137 /* Copy the user space relevant state of @xsave->header */
1176 __raw_xsave_addr(xsave, i),
1255 struct xregs_state *xsave = &fpstate->regs.xsave;
1283 xsave->i387.mxcsr = mxcsr[0];
1284 xsave->i387.mxcsr_mask = mxcsr[1];
1292 void *dst = __raw_xsave_addr(xsave, i);
1305 xpkru = __raw_xsave_addr(xsave, XFEATURE_PKRU);
1320 xsave->header.xfeatures &= XFEATURE_MASK_SUPERVISOR_ALL;
1325 xsave->header.xfeatures |= hdr.xfeatures;
1415 void *addr = get_xsave_addr(&fps->regs.xsave, xfeature);
1563 xstate_init_xcomp_bv(&newfps->regs.xsave, newfps->xfeatures);