[PATCH] x86/spec-ctrl: Update hardware hints

Andrew Cooper posted 1 patch 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230530153452.1123823-1-andrew.cooper3@citrix.com
xen/arch/x86/include/asm/msr-index.h | 2 +-
xen/arch/x86/spec_ctrl.c             | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
[PATCH] x86/spec-ctrl: Update hardware hints
Posted by Andrew Cooper 10 months ago
 * Rename IBRS_ALL to EIBRS.  EIBRS is the term that everyone knows, and this
   makes ARCH_CAPS_EIBRS match the X86_FEATURE_EIBRS form.
 * Print RRSBA too, which is also a hint about behaviour.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
---
 xen/arch/x86/include/asm/msr-index.h | 2 +-
 xen/arch/x86/spec_ctrl.c             | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/include/asm/msr-index.h b/xen/arch/x86/include/asm/msr-index.h
index 082fb2e0d9ae..12aeb1a93909 100644
--- a/xen/arch/x86/include/asm/msr-index.h
+++ b/xen/arch/x86/include/asm/msr-index.h
@@ -67,7 +67,7 @@
 
 #define MSR_ARCH_CAPABILITIES               0x0000010a
 #define  ARCH_CAPS_RDCL_NO                  (_AC(1, ULL) <<  0)
-#define  ARCH_CAPS_IBRS_ALL                 (_AC(1, ULL) <<  1)
+#define  ARCH_CAPS_EIBRS                    (_AC(1, ULL) <<  1)
 #define  ARCH_CAPS_RSBA                     (_AC(1, ULL) <<  2)
 #define  ARCH_CAPS_SKIP_L1DFL               (_AC(1, ULL) <<  3)
 #define  ARCH_CAPS_SSB_NO                   (_AC(1, ULL) <<  4)
diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index 50d467f74cf8..cd5ea6aa52d9 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -409,10 +409,11 @@ static void __init print_details(enum ind_thunk thunk)
      * 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%s%s%s%s%s%s%s\n",
+    printk("  Hardware hints:%s%s%s%s%s%s%s%s%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_EIBRS)                          ? " EIBRS"          : "",
            (caps & ARCH_CAPS_RSBA)                           ? " RSBA"           : "",
+           (caps & ARCH_CAPS_RRSBA)                          ? " RRSBA"          : "",
            (caps & ARCH_CAPS_SKIP_L1DFL)                     ? " SKIP_L1DFL"     : "",
            (e8b  & cpufeat_mask(X86_FEATURE_SSB_NO)) ||
            (caps & ARCH_CAPS_SSB_NO)                         ? " SSB_NO"         : "",
-- 
2.30.2


Re: [PATCH] x86/spec-ctrl: Update hardware hints
Posted by Jan Beulich 10 months ago
On 30.05.2023 17:34, Andrew Cooper wrote:
>  * Rename IBRS_ALL to EIBRS.  EIBRS is the term that everyone knows, and this
>    makes ARCH_CAPS_EIBRS match the X86_FEATURE_EIBRS form.
>  * Print RRSBA too, which is also a hint about behaviour.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>