函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\xstate.c Create Date:2022-07-27 08:50:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static void check_xstate_against_struct(int nr)

返回类型:void

参数:

类型参数名称
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  如果nr小于XFEATURE_YMMnr大于等于XFEATURE_MAXnr恒等于XFEATURE_PT_UNIMPLEMENTED_SO_FAR
568  WARN_ONCE(1, "no structure for xstate: %d\n", nr)
569  XSTATE_WARN_ON(1)
调用者
名称描述
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.