€•¯uŒ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Œ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ŒyHowever, the amount of feature flags is growing by the CPU generation, leading to unparseable and unwieldy /proc/cpuinfo.”h]”hŒyHowever, the amount of feature flags is growing by the 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.”…””}”(hhø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.”…””}”(hjhž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 ”…””}”(hj"hžhhŸNh NubhŒemphasis”“”)”}”(hŒ *enabled*”h]”hŒenabled”…””}”(hj,hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hj"ubhŒ and ”…””}”(hj"hžhhŸNh Nubj+)”}”(hŒ *supports*”h]”hŒsupports”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hj"ubhX*. 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.”…””}”(hj"hž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”…””}”(hjVhž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”…””}”(hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K*hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjfhžhhŸh³h Nubjj)”}”(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&]”uh1jihjfhžhhŸh³h Nubjj)”}”(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&]”uh1jihjfhžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jdhŸ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.”…””}”(hj9hž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´hjhž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”…””}”(hjRhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjOhž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].”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K`hjOhž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.”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KfhjOhžhubeh}”(h]”Œ0flags-can-be-from-scattered-cpuid-based-features”ah ]”h"]”Œ0flags can be from scattered cpuid-based features”ah$]”h&]”uh1h´hjhž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´hjhž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´hjhž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”…””}”(hjühž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.”…””}”(hj hž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”…””}”(hj#hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj hž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.”…””}”(hj1hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K”hj hž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.”…””}”(hj?hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K™hj hž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”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj]hž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”…””}”(hjqhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjnhž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.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K¤hjnhžhubeh}”(h]”Œ.the-hardware-does-not-enumerate-support-for-it”ah ]”h"]”Œ.the hardware does not enumerate support for it”ah$]”h&]”uh1h´hj]hž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´hj]hž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Û)”}”(hXFor example, if 5-level-paging is not enabled when building (i.e., CONFIG_X86_5LEVEL is not selected) the flag "la57" will not show up [#f1]_. Even though the feature will still be detected via CPUID, the kernel disables it by clearing via setup_clear_cpu_cap(X86_FEATURE_LA57).”h]”(hŒ‹For example, if 5-level-paging is not enabled when building (i.e., CONFIG_X86_5LEVEL is not selected) the flag “la57†will not show up ”…””}”(hjÍhžhhŸNh NubhŒfootnote_reference”“”)”}”(hŒ[#f1]_”h]”hŒ1”…””}”(hj×hžhhŸNh Nubah}”(h]”Œid1”ah ]”h"]”h$]”h&]”Œauto”KŒrefid”Œf1”Œdocname”Œarch/x86/cpuinfo”uh1jÕhjÍŒresolved”KubhŒ‰. Even though the feature will still be detected via CPUID, the kernel disables it by clearing via setup_clear_cpu_cap(X86_FEATURE_LA57).”…””}”(hjÍhžhhŸNh Nubeh}”(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´hj]hžhhŸh³h K®ubhµ)”}”(hhh]”(hº)”}”(hŒ$The feature is disabled at boot-time”h]”hŒ$The feature is disabled at boot-time”…””}”(hjhž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´hj]hž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”…””}”(hj6hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj3hž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.”…””}”(hjDhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KÆhj3hžhubhŒfootnote”“”)”}”(hŒ.5-level paging uses linear address of 57 bits.”h]”(hŒlabel”“”)”}”(hhh]”hŒ1”…””}”(hjZhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jXhjThžhhŸNh NubhÛ)”}”(hjVh]”hŒ.5-level paging uses linear address of 57 bits.”…””}”(hjghžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KÌhjTubeh}”(h]”jèah ]”h"]”Œf1”ah$]”h&]”jáajæKjéjêuh1jRhŸh³h KÌhj3hžhubeh}”(h]”Œ*the-feature-was-known-to-be-non-functional”ah ]”h"]”Œ*the feature was known to be non-functional”ah$]”h&]”uh1h´hj]hž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”}”Œf1”]”j×asŒrefids”}”jè]”j×asŒnameids”}”(jjjjj×jÔjLjIjj~j¨j¥jÏjÌjZjWjjjRjOjˆj…j’jj¹j¶jûjøj0j-j€j}jxjèuŒ nametypes”}”(j‰j‰j׉jL‰j‰j¨‰jωjZ‰j‰jR‰jˆ‰j’‰j¹‰jû‰j0‰j€‰jxˆuh}”(jh¶jhÉjÔjjIj(j~jOj¥j„jÌj«jWjÚjjùjOj j…j]jjnj¶j•jøj¼jáj×j-jþj}j3jèjTuŒ footnote_refs”}”jö]”j×asŒ citation_refs”}”Œ autofootnotes”]”jTaŒautofootnote_refs”]”j×aŒsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jÄKs…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.