€•½sŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ$/translations/zh_CN/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/zh_TW/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/it_IT/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ja_JP/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ko_KR/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/pt_BR/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/sp_SP/arch/x86/cpuinfo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ>/var/lib/git/docbuild/linux/Documentation/arch/x86/cpuinfo.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒx86 Feature Flags”h]”hŒx86 Feature Flags”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ®The list of feature flags in /proc/cpuinfo is not complete and represents an ill-fated attempt from long time ago to put feature flags in an easy to find place for userspace.”h]”hŒ®The list of feature flags in /proc/cpuinfo is not complete and represents an ill-fated attempt from long time ago to put feature flags in an easy to find place for userspace.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)”}”(hŒ|However, the number of feature flags is growing with each CPU generation, leading to unparseable and unwieldy /proc/cpuinfo.”h]”hŒ|However, the number of feature flags is growing with each CPU generation, leading to unparseable and unwieldy /proc/cpuinfo.”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hŒÊWhat is more, those feature flags do not even need to be in that file because userspace doesn't care about them - glibc et al already use CPUID to find out what the target machine supports and what not.”h]”hŒÌWhat is more, those feature flags do not even need to be in that file because userspace doesn’t care about them - glibc et al already use CPUID to find out what the target machine supports and what not.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hX>And even if it doesn't show a particular feature flag - although the CPU still does have support for the respective hardware functionality and said CPU supports CPUID faulting - userspace can simply probe for the feature and figure out if it is supported or not, regardless of whether it is being advertised somewhere.”h]”hX@And even if it doesn’t show a particular feature flag - although the CPU still does have support for the respective hardware functionality and said CPU supports CPUID faulting - userspace can simply probe for the feature and figure out if it is supported or not, regardless of whether it is being advertised somewhere.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hŒžFurthermore, those flag strings become an ABI the moment they appear there and maintaining them forever when nothing even uses them is a lot of wasted effort.”h]”hŒžFurthermore, those flag strings become an ABI the moment they appear there and maintaining them forever when nothing even uses them is a lot of wasted effort.”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hXŠSo, the current use of /proc/cpuinfo is to show features which the kernel has *enabled* and *supports*. As in: the CPUID feature flag is there, there's an additional setup which the kernel has done while booting and the functionality is ready to use. A perfect example for that is "user_shstk" where additional code enablement is present in the kernel to support shadow stack for user programs.”h]”(hŒNSo, the current use of /proc/cpuinfo is to show features which the kernel has ”…””}”(hj6h²hh³Nh´NubhŒemphasis”“”)”}”(hŒ *enabled*”h]”hŒenabled”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj6ubhŒ and ”…””}”(hj6h²hh³Nh´Nubj?)”}”(hŒ *supports*”h]”hŒsupports”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj6ubhX*. As in: the CPUID feature flag is there, there’s an additional setup which the kernel has done while booting and the functionality is ready to use. A perfect example for that is “user_shstk†where additional code enablement is present in the kernel to support shadow stack for user programs.”…””}”(hj6h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hŒœSo, if users want to know if a feature is available on a given system, they try to find the flag in /proc/cpuinfo. If a given flag is present, it means that”h]”hŒœSo, if users want to know if a feature is available on a given system, they try to find the flag in /proc/cpuinfo. If a given flag is present, it means that”…””}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K&hhÝh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒEthe kernel knows about the feature enough to have an X86_FEATURE bit ”h]”hï)”}”(hŒDthe kernel knows about the feature enough to have an X86_FEATURE bit”h]”hŒDthe kernel knows about the feature enough to have an X86_FEATURE bit”…””}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K*hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzh²hh³hÇh´Nubj~)”}”(hŒqthe kernel supports it and is currently making it available either to userspace or some other part of the kernel ”h]”hï)”}”(hŒpthe kernel supports it and is currently making it available either to userspace or some other part of the kernel”h]”hŒpthe kernel supports it and is currently making it available either to userspace or some other part of the kernel”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K,hj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzh²hh³hÇh´Nubj~)”}”(hŒDif the flag represents a hardware feature the hardware supports it. ”h]”hï)”}”(hŒCif the flag represents a hardware feature the hardware supports it.”h]”hŒCif the flag represents a hardware feature the hardware supports it.”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K/hj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jxh³hÇh´K*hhÝh²hubhï)”}”(hŒUThe absence of a flag in /proc/cpuinfo by itself means almost nothing to an end user.”h]”hŒUThe absence of a flag in /proc/cpuinfo by itself means almost nothing to an end user.”…””}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K1hhÝh²hubhï)”}”(hŒ´On the one hand, a feature like "vaes" might be fully available to user applications on a kernel that has not defined X86_FEATURE_VAES and thus there is no "vaes" in /proc/cpuinfo.”h]”hŒ¼On the one hand, a feature like “vaes†might be fully available to user applications on a kernel that has not defined X86_FEATURE_VAES and thus there is no “vaes†in /proc/cpuinfo.”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K4hhÝh²hubhï)”}”(hŒ«On the other hand, a new kernel running on non-VAES hardware would also have no "vaes" in /proc/cpuinfo. There's no way for an application or user to tell the difference.”h]”hŒ±On the other hand, a new kernel running on non-VAES hardware would also have no “vaes†in /proc/cpuinfo. There’s no way for an application or user to tell the difference.”…””}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K8hhÝh²hubhï)”}”(hX$The end result is that the flags field in /proc/cpuinfo is marginally useful for kernel debugging, but not really for anything else. Applications should instead use things like the glibc facilities for querying CPU support. Users should rely on tools like tools/arch/x86/kcpuid and cpuid(1).”h]”hX$The end result is that the flags field in /proc/cpuinfo is marginally useful for kernel debugging, but not really for anything else. Applications should instead use things like the glibc facilities for querying CPU support. Users should rely on tools like tools/arch/x86/kcpuid and cpuid(1).”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KFeature flags can be derived from the contents of CPUID leaves”h]”hŒ>Feature flags can be derived from the contents of CPUID leaves”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj<h²hh³hÇh´KSubhï)”}”(hXÊThese feature definitions are organized mirroring the layout of CPUID leaves and grouped in words with offsets as mapped in enum cpuid_leafs in cpufeatures.h (see arch/x86/include/asm/cpufeatures.h for details). If a feature is defined with a X86_FEATURE_ definition in cpufeatures.h, and if it is detected at run time, the flags will be displayed accordingly in /proc/cpuinfo. For example, the flag "avx2" comes from X86_FEATURE_AVX2 in cpufeatures.h.”h]”hXÎThese feature definitions are organized mirroring the layout of CPUID leaves and grouped in words with offsets as mapped in enum cpuid_leafs in cpufeatures.h (see arch/x86/include/asm/cpufeatures.h for details). If a feature is defined with a X86_FEATURE_ definition in cpufeatures.h, and if it is detected at run time, the flags will be displayed accordingly in /proc/cpuinfo. For example, the flag “avx2†comes from X86_FEATURE_AVX2 in cpufeatures.h.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KUhj<h²hubeh}”(h]”Œ>feature-flags-can-be-derived-from-the-contents-of-cpuid-leaves”ah ]”h"]”Œ>feature flags can be derived from the contents of cpuid leaves”ah$]”h&]”uh1hÈhj+h²hh³hÇh´KSubhÉ)”}”(hhh]”(hÎ)”}”(hŒ0Flags can be from scattered CPUID-based features”h]”hŒ0Flags can be from scattered CPUID-based features”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjch²hh³hÇh´K^ubhï)”}”(hXsHardware features enumerated in sparsely populated CPUID leaves get software-defined values. Still, CPUID needs to be queried to determine if a given feature is present. This is done in init_scattered_cpuid_features(). For instance, X86_FEATURE_CQM_LLC is defined as 11*32 + 0 and its presence is checked at runtime in the respective CPUID leaf [EAX=f, ECX=0] bit EDX[1].”h]”hXsHardware features enumerated in sparsely populated CPUID leaves get software-defined values. Still, CPUID needs to be queried to determine if a given feature is present. This is done in init_scattered_cpuid_features(). For instance, X86_FEATURE_CQM_LLC is defined as 11*32 + 0 and its presence is checked at runtime in the respective CPUID leaf [EAX=f, ECX=0] bit EDX[1].”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K`hjch²hubhï)”}”(hX†The intent of scattering CPUID leaves is to not bloat struct cpuinfo_x86.x86_capability[] unnecessarily. For instance, the CPUID leaf [EAX=7, ECX=0] has 30 features and is dense, but the CPUID leaf [EAX=7, EAX=1] has only one feature and would waste 31 bits of space in the x86_capability[] array. Since there is a struct cpuinfo_x86 for each possible CPU, the wasted memory is not trivial.”h]”hX†The intent of scattering CPUID leaves is to not bloat struct cpuinfo_x86.x86_capability[] unnecessarily. For instance, the CPUID leaf [EAX=7, ECX=0] has 30 features and is dense, but the CPUID leaf [EAX=7, EAX=1] has only one feature and would waste 31 bits of space in the x86_capability[] array. Since there is a struct cpuinfo_x86 for each possible CPU, the wasted memory is not trivial.”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kfhjch²hubeh}”(h]”Œ0flags-can-be-from-scattered-cpuid-based-features”ah ]”h"]”Œ0flags can be from scattered cpuid-based features”ah$]”h&]”uh1hÈhj+h²hh³hÇh´K^ubhÉ)”}”(hhh]”(hÎ)”}”(hŒQFlags can be created synthetically under certain conditions for hardware features”h]”hŒQFlags can be created synthetically under certain conditions for hardware features”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj˜h²hh³hÇh´Knubhï)”}”(hXèExamples of conditions include whether certain features are present in MSR_IA32_CORE_CAPS or specific CPU models are identified. If the needed conditions are met, the features are enabled by the set_cpu_cap or setup_force_cpu_cap macros. For example, if bit 5 is set in MSR_IA32_CORE_CAPS, the feature X86_FEATURE_SPLIT_LOCK_DETECT will be enabled and "split_lock_detect" will be displayed. The flag "ring3mwait" will be displayed only when running on INTEL_XEON_PHI_[KNL|KNM] processors.”h]”hXðExamples of conditions include whether certain features are present in MSR_IA32_CORE_CAPS or specific CPU models are identified. If the needed conditions are met, the features are enabled by the set_cpu_cap or setup_force_cpu_cap macros. For example, if bit 5 is set in MSR_IA32_CORE_CAPS, the feature X86_FEATURE_SPLIT_LOCK_DETECT will be enabled and “split_lock_detect†will be displayed. The flag “ring3mwait†will be displayed only when running on INTEL_XEON_PHI_[KNL|KNM] processors.”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kphj˜h²hubeh}”(h]”ŒQflags-can-be-created-synthetically-under-certain-conditions-for-hardware-features”ah ]”h"]”ŒQflags can be created synthetically under certain conditions for hardware features”ah$]”h&]”uh1hÈhj+h²hh³hÇh´KnubhÉ)”}”(hhh]”(hÎ)”}”(hŒ,Flags can represent purely software features”h]”hŒ,Flags can represent purely software features”…””}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¿h²hh³hÇh´Kyubhï)”}”(hXThese flags do not represent hardware features. Instead, they represent a software feature implemented in the kernel. For example, Kernel Page Table Isolation is purely software feature and its feature flag X86_FEATURE_PTI is also defined in cpufeatures.h.”h]”hXThese flags do not represent hardware features. Instead, they represent a software feature implemented in the kernel. For example, Kernel Page Table Isolation is purely software feature and its feature flag X86_FEATURE_PTI is also defined in cpufeatures.h.”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kzhj¿h²hubeh}”(h]”Œ,flags-can-represent-purely-software-features”ah ]”h"]”Œ,flags can represent purely software features”ah$]”h&]”uh1hÈhj+h²hh³hÇh´Kyubeh}”(h]”Œhow-are-feature-flags-created”ah ]”h"]”Œhow are feature flags created?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KPubhÉ)”}”(hhh]”(hÎ)”}”(hŒNaming of Flags”h]”hŒNaming of Flags”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjîh²hh³hÇh´K€ubhï)”}”(hXAThe script arch/x86/kernel/cpu/mkcapflags.sh processes the #define X86_FEATURE_ from cpufeatures.h and generates the x86_cap/bug_flags[] arrays in kernel/cpu/capflags.c. The names in the resulting x86_cap/bug_flags[] are used to populate /proc/cpuinfo. The naming of flags in the x86_cap/bug_flags[] are as follows:”h]”hXAThe script arch/x86/kernel/cpu/mkcapflags.sh processes the #define X86_FEATURE_ from cpufeatures.h and generates the x86_cap/bug_flags[] arrays in kernel/cpu/capflags.c. The names in the resulting x86_cap/bug_flags[] are used to populate /proc/cpuinfo. The naming of flags in the x86_cap/bug_flags[] are as follows:”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hjîh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ/Flags do not appear by default in /proc/cpuinfo”h]”hŒ/Flags do not appear by default in /proc/cpuinfo”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´K‰ubhï)”}”(hXYFeature flags are omitted by default from /proc/cpuinfo as it does not make sense for the feature to be exposed to userspace in most cases. For example, X86_FEATURE_ALWAYS is defined in cpufeatures.h but that flag is an internal kernel feature used in the alternative runtime patching functionality. So the flag does not appear in /proc/cpuinfo.”h]”hXYFeature flags are omitted by default from /proc/cpuinfo as it does not make sense for the feature to be exposed to userspace in most cases. For example, X86_FEATURE_ALWAYS is defined in cpufeatures.h but that flag is an internal kernel feature used in the alternative runtime patching functionality. So the flag does not appear in /proc/cpuinfo.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‹hj h²hubeh}”(h]”Œ.flags-do-not-appear-by-default-in-proc-cpuinfo”ah ]”h"]”Œ/flags do not appear by default in /proc/cpuinfo”ah$]”h&]”uh1hÈhjîh²hh³hÇh´K‰ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ(Specify a flag name if absolutely needed”h]”hŒ(Specify a flag name if absolutely needed”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj4h²hh³hÇh´K’ubhï)”}”(hXIf the comment on the line for the #define X86_FEATURE_* starts with a double-quote character (""), the string inside the double-quote characters will be the name of the flags. For example, the flag "sse4_1" comes from the comment "sse4_1" following the X86_FEATURE_XMM4_1 definition.”h]”hX(If the comment on the line for the #define X86_FEATURE_* starts with a double-quote character (“â€), the string inside the double-quote characters will be the name of the flags. For example, the flag “sse4_1†comes from the comment “sse4_1†following the X86_FEATURE_XMM4_1 definition.”…””}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K”hj4h²hubhï)”}”(hX/There are situations in which overriding the displayed name of the flag is needed. For instance, /proc/cpuinfo is a userspace interface and must remain constant. If, for some reason, the naming of X86_FEATURE_ changes, one shall override the new naming with the name already used in /proc/cpuinfo.”h]”hX/There are situations in which overriding the displayed name of the flag is needed. For instance, /proc/cpuinfo is a userspace interface and must remain constant. If, for some reason, the naming of X86_FEATURE_ changes, one shall override the new naming with the name already used in /proc/cpuinfo.”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K™hj4h²hubeh}”(h]”Œ(specify-a-flag-name-if-absolutely-needed”ah ]”h"]”Œ(specify a flag name if absolutely needed”ah$]”h&]”uh1hÈhjîh²hh³hÇh´K’ubeh}”(h]”Œnaming-of-flags”ah ]”h"]”Œnaming of flags”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K€ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ2Flags are missing when one or more of these happen”h]”hŒ2Flags are missing when one or more of these happen”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjqh²hh³hÇh´KŸubhÉ)”}”(hhh]”(hÎ)”}”(hŒ.The hardware does not enumerate support for it”h]”hŒ.The hardware does not enumerate support for it”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‚h²hh³hÇh´K¢ubhï)”}”(hŒáFor example, when a new kernel is running on old hardware or the feature is not enabled by boot firmware. Even if the hardware is new, there might be a problem enabling the feature at run time, the flag will not be displayed.”h]”hŒáFor example, when a new kernel is running on old hardware or the feature is not enabled by boot firmware. Even if the hardware is new, there might be a problem enabling the feature at run time, the flag will not be displayed.”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¤hj‚h²hubeh}”(h]”Œ.the-hardware-does-not-enumerate-support-for-it”ah ]”h"]”Œ.the hardware does not enumerate support for it”ah$]”h&]”uh1hÈhjqh²hh³hÇh´K¢ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ'The kernel does not know about the flag”h]”hŒ'The kernel does not know about the flag”…””}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj©h²hh³hÇh´K©ubhï)”}”(hŒ;For example, when an old kernel is running on new hardware.”h]”hŒ;For example, when an old kernel is running on new hardware.”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K«hj©h²hubeh}”(h]”Œ'the-kernel-does-not-know-about-the-flag”ah ]”h"]”Œ'the kernel does not know about the flag”ah$]”h&]”uh1hÈhjqh²hh³hÇh´K©ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ2The kernel disabled support for it at compile-time”h]”hŒ2The kernel disabled support for it at compile-time”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÐh²hh³hÇh´K®ubhï)”}”(hX For example, if Linear Address Masking (LAM) is not enabled when building (i.e., CONFIG_ADDRESS_MASKING is not selected) the flag "lam" will not show up. Even though the feature will still be detected via CPUID, the kernel disables it by clearing via setup_clear_cpu_cap(X86_FEATURE_LAM).”h]”hX$For example, if Linear Address Masking (LAM) is not enabled when building (i.e., CONFIG_ADDRESS_MASKING is not selected) the flag “lam†will not show up. Even though the feature will still be detected via CPUID, the kernel disables it by clearing via setup_clear_cpu_cap(X86_FEATURE_LAM).”…””}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K°hjÐh²hubeh}”(h]”Œ2the-kernel-disabled-support-for-it-at-compile-time”ah ]”h"]”Œ2the kernel disabled support for it at compile-time”ah$]”h&]”uh1hÈhjqh²hh³hÇh´K®ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ$The feature is disabled at boot-time”h]”hŒ$The feature is disabled at boot-time”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj÷h²hh³hÇh´K¶ubhï)”}”(hX“A feature can be disabled either using a command-line parameter or because it failed to be enabled. The command-line parameter clearcpuid= can be used to disable features using the feature number as defined in /arch/x86/include/asm/cpufeatures.h. For instance, User Mode Instruction Protection can be disabled using clearcpuid=514. The number 514 is calculated from #define X86_FEATURE_UMIP (16*32 + 2).”h]”hX“A feature can be disabled either using a command-line parameter or because it failed to be enabled. The command-line parameter clearcpuid= can be used to disable features using the feature number as defined in /arch/x86/include/asm/cpufeatures.h. For instance, User Mode Instruction Protection can be disabled using clearcpuid=514. The number 514 is calculated from #define X86_FEATURE_UMIP (16*32 + 2).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K·hj÷h²hubhï)”}”(hŒòIn addition, there exists a variety of custom command-line parameters that disable specific features. The list of parameters includes, but is not limited to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using "no5lvl".”h]”hŒöIn addition, there exists a variety of custom command-line parameters that disable specific features. The list of parameters includes, but is not limited to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using “no5lvlâ€.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¾hj÷h²hubeh}”(h]”Œ$the-feature-is-disabled-at-boot-time”ah ]”h"]”Œ$the feature is disabled at boot-time”ah$]”h&]”uh1hÈhjqh²hh³hÇh´K¶ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ*The feature was known to be non-functional”h]”hŒ*The feature was known to be non-functional”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj,h²hh³hÇh´KÄubhï)”}”(hXBThe feature was known to be non-functional because a dependency was missing at runtime. For example, AVX flags will not show up if XSAVE feature is disabled since they depend on XSAVE feature. Another example would be broken CPUs and them missing microcode patches. Due to that, the kernel decides not to enable a feature.”h]”hXBThe feature was known to be non-functional because a dependency was missing at runtime. For example, AVX flags will not show up if XSAVE feature is disabled since they depend on XSAVE feature. Another example would be broken CPUs and them missing microcode patches. Due to that, the kernel decides not to enable a feature.”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÆhj,h²hubeh}”(h]”Œ*the-feature-was-known-to-be-non-functional”ah ]”h"]”Œ*the feature was known to be non-functional”ah$]”h&]”uh1hÈhjqh²hh³hÇh´KÄubeh}”(h]”Œ2flags-are-missing-when-one-or-more-of-these-happen”ah ]”h"]”Œ2flags are missing when one or more of these happen”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KŸubeh}”(h]”Œx86-feature-flags”ah ]”h"]”Œx86 feature flags”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j†Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j`j]j(j%jëjèj`j]j•j’j¼j¹jãjàjnjkj1j.jfjcjXjUj¦j£jÍjÊjôjñj)j&jPjMuŒ nametypes”}”(j`‰j(‰jë‰j`‰j•‰j¼‰jã‰jn‰j1‰jf‰jX‰j¦‰j͉jô‰j)‰jP‰uh}”(j]hÊj%hÝjèj+j]j<j’jcj¹j˜jàj¿jkjîj.j jcj4jUjqj£j‚jÊj©jñjÐj&j÷jMj,uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.