函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:init_xstate_size

函数原型:static int __init init_xstate_size(void)

返回类型:int

参数:

676  xsave_size等于get_xsave_size()
678  如果boot_cpu_has(XSAVES/XRSTORS instructions )则possible_xstate_size等于Get total size of enabled xstates in XCR0/xfeatures_mask.* Note the SDM's wording here. "sub-function 0" only enumerates* the size of the *user* states. If we use it to size a buffer* that we use 'XSAVES' on, we could potentially overflow the
680  否则possible_xstate_size等于xsave_size
684  如果非Will the runtime-enumerated 'xstate_size' fit in the init* task's statically-allocated buffer?则返回:负EINVAL
691  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:等于possible_xstate_size
692  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.
697  The XSAVE area of kernel can be in standard or compacted format;* it is always in standard format for user mode. This is the user* mode standard format size used for signal and ptrace frames.等于xsave_size
698  返回:0
调用者
名称描述
fpu__init_system_xstateEnable and initialize the xsave feature.* Called once per system bootup.