函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This essentially double-checks what the cpu told us about* how large the XSAVE buffer needs to be. We are recalculating* it to be safe.

函数原型:static void do_extra_xstate_size_checks(void)

返回类型:void

参数:

580  paranoid_xstate_size等于FXSAVE_SIZEXSAVE_HDR_SIZE
583 i小于XFEATURE_MAX循环
584  如果非Note that in the future we will likely need a pair of* functions here: one for user xstates and the other for* system xstates. For now, they are the same.则继续下一循环
587  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.
592  如果非'XSAVES' implies two different things:* 1. saving of supervisor/system state* 2. using the compacted format* Use this function when dealing with the compacted format so* that it is obvious which aspect of 'XSAVES' is being handled* by the calling code.XSTATE_WARN_ON(xfeature_is_supervisor(i))
596  如果We could cache this like xstate_size[], but we only use* it here, so it would be a waste of space.paranoid_xstate_size等于@a is a power of 2 value (paranoid_xstate_size, 64)
604  如果非'XSAVES' implies two different things:* 1. saving of supervisor/system state* 2. using the compacted format* Use this function when dealing with the compacted format so* that it is obvious which aspect of 'XSAVES' is being handled* by the calling code.paranoid_xstate_size等于xfeature_uncompacted_offset(i)
610  paranoid_xstate_size加等于xfeature_size(i)
612  XSTATE_WARN_ON(paranoid_xstate_size != Size of the FPU context state. All tasks in the system use the* same context size, regardless of what portion they use.* This is inherent to the XSAVE architecture which puts all state* components into a single, continuous memory block:)
调用者
名称描述
init_xstate_size