/* * EBX enumerates the size (in bytes) required by the XSAVE * instruction for an XSAVE area containing all the user state * components corresponding to bits currently set in XCR0.
*/ return ebx;
}
staticinlinevoid set_xstatebv(struct xsave_buffer *xbuf, uint64_t bv)
{ /* XSTATE_BV is at the beginning of the header: */
*(uint64_t *)(&xbuf->header) = bv;
}
/* See 'struct _fpx_sw_bytes' at sigcontext.h */ #define SW_BYTES_OFFSET 464 /* N.B. The struct's field name varies so read from the offset. */ #define SW_BYTES_BV_OFFSET (SW_BYTES_OFFSET + 8)
staticinlinevoid set_rand_data(struct xstate_info *xstate, struct xsave_buffer *xbuf)
{ int *ptr = (int *)&xbuf->bytes[xstate->xbuf_offset]; int data, i;
/* * Ensure that 'data' is never 0. This ensures that * the registers are never in their initial configuration * and thus never tracked as being in the init state.
*/
data = rand() | 1;
for (i = 0; i < xstate->size / sizeof(int); i++, ptr++)
*ptr = data;
}
/* Testing kernel's context switching and ABI support for the xstate. */ void test_xstate(uint32_t feature_num);
#endif/* __SELFTESTS_X86_XSTATE_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.