mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/spec-ctrl: Split the "Hardware features" diagnostic line
Separate the read-only hints from the features requiring active actions on
Xen's behalf.
Also take the opportunity split the IBRS/IBPB and IBPB mess. More features
with overlapping enumeration are on the way, and and it is not useful to split
them like this.
No practical change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 565ebcda97)
[Forward ported over XSA-404]
This commit is contained in:
1 parent
8a2cc1ed1a
commit
f614e3c51a
1 file changed
+29
-22
+29
-22
@@ -322,28 +322,35 @@ static void __init print_details(enum ind_thunk thunk, uint64_t caps)
|
||||
|
||||
printk("Speculative mitigation facilities:\n");
|
||||
|
||||
/* Hardware features which pertain to speculative mitigations. */
|
||||
printk(" Hardware features:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_IBRSB)) ? " IBRS/IBPB" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_STIBP)) ? " STIBP" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_L1D_FLUSH)) ? " L1D_FLUSH" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_SSBD)) ? " SSBD" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_MD_CLEAR)) ? " MD_CLEAR" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_SRBDS_CTRL)) ? " SRBDS_CTRL" : "",
|
||||
(e8b & cpufeat_mask(X86_FEATURE_IBPB)) ? " IBPB" : "",
|
||||
(caps & ARCH_CAPS_IBRS_ALL) ? " IBRS_ALL" : "",
|
||||
(caps & ARCH_CAPS_RDCL_NO) ? " RDCL_NO" : "",
|
||||
(caps & ARCH_CAPS_RSBA) ? " RSBA" : "",
|
||||
(caps & ARCH_CAPS_SKIP_L1DFL) ? " SKIP_L1DFL": "",
|
||||
(caps & ARCH_CAPS_SSB_NO) ? " SSB_NO" : "",
|
||||
(caps & ARCH_CAPS_MDS_NO) ? " MDS_NO" : "",
|
||||
(caps & ARCH_CAPS_TSX_CTRL) ? " TSX_CTRL" : "",
|
||||
(caps & ARCH_CAPS_TAA_NO) ? " TAA_NO" : "",
|
||||
(caps & ARCH_CAPS_SBDR_SSDP_NO) ? " SBDR_SSDP_NO" : "",
|
||||
(caps & ARCH_CAPS_FBSDP_NO) ? " FBSDP_NO" : "",
|
||||
(caps & ARCH_CAPS_PSDP_NO) ? " PSDP_NO" : "",
|
||||
(caps & ARCH_CAPS_FB_CLEAR) ? " FB_CLEAR" : "",
|
||||
(caps & ARCH_CAPS_FB_CLEAR_CTRL) ? " FB_CLEAR_CTRL" : "");
|
||||
/*
|
||||
* Hardware read-only information, stating immunity to certain issues, or
|
||||
* suggestions of which mitigation to use.
|
||||
*/
|
||||
printk(" Hardware hints:%s%s%s%s%s%s%s%s%s%s\n",
|
||||
(caps & ARCH_CAPS_RDCL_NO) ? " RDCL_NO" : "",
|
||||
(caps & ARCH_CAPS_IBRS_ALL) ? " IBRS_ALL" : "",
|
||||
(caps & ARCH_CAPS_RSBA) ? " RSBA" : "",
|
||||
(caps & ARCH_CAPS_SKIP_L1DFL) ? " SKIP_L1DFL" : "",
|
||||
(caps & ARCH_CAPS_SSB_NO) ? " SSB_NO" : "",
|
||||
(caps & ARCH_CAPS_MDS_NO) ? " MDS_NO" : "",
|
||||
(caps & ARCH_CAPS_TAA_NO) ? " TAA_NO" : "",
|
||||
(caps & ARCH_CAPS_SBDR_SSDP_NO) ? " SBDR_SSDP_NO" : "",
|
||||
(caps & ARCH_CAPS_FBSDP_NO) ? " FBSDP_NO" : "",
|
||||
(caps & ARCH_CAPS_PSDP_NO) ? " PSDP_NO" : "");
|
||||
|
||||
/* Hardware features which need driving to mitigate issues. */
|
||||
printk(" Hardware features:%s%s%s%s%s%s%s%s%s%s\n",
|
||||
(e8b & cpufeat_mask(X86_FEATURE_IBPB)) ||
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_IBRSB)) ? " IBPB" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_IBRSB)) ? " IBRS" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_STIBP)) ? " STIBP" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_SSBD)) ? " SSBD" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_L1D_FLUSH)) ? " L1D_FLUSH" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_MD_CLEAR)) ? " MD_CLEAR" : "",
|
||||
(_7d0 & cpufeat_mask(X86_FEATURE_SRBDS_CTRL)) ? " SRBDS_CTRL" : "",
|
||||
(caps & ARCH_CAPS_TSX_CTRL) ? " TSX_CTRL" : "",
|
||||
(caps & ARCH_CAPS_FB_CLEAR) ? " FB_CLEAR" : "",
|
||||
(caps & ARCH_CAPS_FB_CLEAR_CTRL) ? " FB_CLEAR_CTRL" : "");
|
||||
|
||||
/* Compiled-in support which pertains to mitigations. */
|
||||
if ( IS_ENABLED(CONFIG_INDIRECT_THUNK) || IS_ENABLED(CONFIG_SHADOW_PAGING) )
|
||||
|
||||