]> xenbits.xensource.com Git - xen.git/commitdiff
x86/spec-ctrl: Use a taint for CET without MSR_SPEC_CTRL
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Jun 2023 10:09:11 +0000 (11:09 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 15:02:54 +0000 (16:02 +0100)
Reword the comment for 'S' to include an incompatible set of features on the
same core.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 3f63f4510422c29fda7ba238b880cbb53eca34fe)

xen/arch/x86/spec_ctrl.c
xen/common/kernel.c

index 701843311c2bb23c5610ba82220298ea9ce242cf..302a53fa12aa92a80332e68543548ce8b359fab7 100644 (file)
@@ -1139,7 +1139,10 @@ void __init init_speculation_mitigations(void)
     if ( read_cr4() & X86_CR4_CET )
     {
         if ( !has_spec_ctrl )
+        {
             printk(XENLOG_WARNING "?!? CET active, but no MSR_SPEC_CTRL?\n");
+            add_taint(TAINT_CPU_OUT_OF_SPEC);
+        }
         else if ( opt_ibrs == -1 )
             opt_ibrs = ibrs = true;
 
index 7ed96521f97a62310ab0f325993886d9782358e2..9f22399063a751e9d5e32668af5a5009771e81df 100644 (file)
@@ -339,7 +339,7 @@ unsigned int tainted;
  *  'H' - HVM forced emulation prefix is permitted.
  *  'M' - Machine had a machine check experience.
  *  'U' - Platform is unsecure (usually due to an errata on the platform).
- *  'S' - Out of spec CPU (One core has a feature incompatible with others).
+ *  'S' - Out of spec CPU (Incompatible features on one or more cores).
  *
  *      The string is overwritten by the next call to print_taint().
  */