Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\xstate.c Create Date:2022-07-28 07:50:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:We have a C struct for each 'xstate'. We need to ensure* that our software representation matches what the CPU* tells us about the state's size.

Proto:static void check_xstate_against_struct(int nr)

Type:void

Parameter:

TypeParameterName
intnr
547  sz = xfeature_size(nr)
552  XCHECK_SZ(sz, nr, XFEATURE_YMM, structymmh_struct)
553  XCHECK_SZ(sz, nr, XFEATURE_BNDREGS, structmpx_bndreg_state)
554  XCHECK_SZ(sz, nr, XFEATURE_BNDCSR, structmpx_bndcsr_state)
555  XCHECK_SZ(sz, nr, XFEATURE_OPMASK, structavx_512_opmask_state)
556  XCHECK_SZ(sz, nr, XFEATURE_ZMM_Hi256, structavx_512_zmm_uppers_state)
557  XCHECK_SZ(sz, nr, XFEATURE_Hi16_ZMM, structavx_512_hi16_state)
558  XCHECK_SZ(sz, nr, XFEATURE_PKRU, structpkru_state)
565  If nr < XFEATURE_YMM || nr >= XFEATURE_MAX || nr == XFEATURE_PT_UNIMPLEMENTED_SO_FAR Then
568  WARN_ONCE(1, "no structure for xstate: %d\n", nr)
569  XSTATE_WARN_ON(1)
Caller
NameDescribe
do_extra_xstate_size_checksThis essentially double-checks what the cpu told us about* how large the XSAVE buffer needs to be. We are recalculating* it to be safe.