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:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Return whether the system supports a given xfeature.* Also return the name of the (most advanced) feature that the caller requested:

Proto:int cpu_has_xfeatures(u64 xfeatures_needed, const char **feature_name)

Type:int

Parameter:

TypeParameterName
u64xfeatures_needed
const char **feature_name
79  xfeatures_missing = xfeatures_needed & ~Mask of xstate features supported by the CPU and the kernel:
81  If Value for the false possibility is greater at compile time(feature_name) Then
91  If xfeatures_missing Then xfeatures_print = xfeatures_missing
93  Else xfeatures_print = xfeatures_needed
96  xfeature_idx = ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit - 1
97  max_idx = ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(Although we spell it out in here, the Processor Trace* xfeature is completely unused. We use other mechanisms* to save/restore PT state in Linux.) - 1
98  xfeature_idx = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(xfeature_idx, max_idx)
100  feature_name = Although we spell it out in here, the Processor Trace* xfeature is completely unused. We use other mechanisms* to save/restore PT state in Linux.[xfeature_idx]
103  If xfeatures_missing Then Return 0
106  Return 1
Caller
NameDescribe
print_xstate_feature