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: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.

Proto:static void do_extra_xstate_size_checks(void)

Type:void

Parameter:Nothing

580  paranoid_xstate_size = FXSAVE_SIZE + XSAVE_HDR_SIZE
583  When i < XFEATURE_MAX cycle
584  If Not 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. Then Continue
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  If Not '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. Then XSTATE_WARN_ON(xfeature_is_supervisor(i))
596  If We could cache this like xstate_size[], but we only use* it here, so it would be a waste of space. Then paranoid_xstate_size = @a is a power of 2 value (paranoid_xstate_size, 64)
604  If Not '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. Then 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:)
Caller
NameDescribe
init_xstate_size