]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen: Fix incorrect taint constant
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Jun 2023 09:48:59 +0000 (10:48 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Jun 2023 15:10:28 +0000 (16:10 +0100)
Insecure is the word being looked for here.  Especially given the nature of
the sole caller, and the (correct) comment next to it.

Also update the taint marker from 'U' to 'I' for consistency; this isn't
expected to impact anyone in practice.

Fixes: 82c0d3d491cc ("xen: Add an unsecure Taint type")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/arch/arm/cpuerrata.c
xen/common/kernel.c
xen/include/xen/lib.h

index 1abacfe5bb67c48a77fcdd78cf1a10cf71129218..d0658aedb6aa56c354a06c828040280501383b84 100644 (file)
@@ -695,7 +695,7 @@ void __init enable_errata_workarounds(void)
                     "**** Only trusted guests should be used.                             ****\n");
 
         /* Taint the machine has being insecure */
-        add_taint(TAINT_MACHINE_UNSECURE);
+        add_taint(TAINT_MACHINE_INSECURE);
     }
 #endif
 }
index f7b1f65f373c5eb6fb99976fe9fa20a9db5cc7cc..b8b845763d9dc07458780373ffdaf8a005a74fd2 100644 (file)
@@ -343,8 +343,8 @@ unsigned int tainted;
  *  'C' - Console output is synchronous.
  *  'E' - An error (e.g. a machine check exceptions) has been injected.
  *  'H' - HVM forced emulation prefix is permitted.
+ *  'I' - Platform is insecure (usually due to an errata on the platform).
  *  '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).
  *
  *      The string is overwritten by the next call to print_taint().
@@ -354,7 +354,7 @@ char *print_tainted(char *str)
     if ( tainted )
     {
         snprintf(str, TAINT_STRING_MAX_LEN, "Tainted: %c%c%c%c%c%c",
-                 tainted & TAINT_MACHINE_UNSECURE ? 'U' : ' ',
+                 tainted & TAINT_MACHINE_INSECURE ? 'I' : ' ',
                  tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
                  tainted & TAINT_SYNC_CONSOLE ? 'C' : ' ',
                  tainted & TAINT_ERROR_INJECT ? 'E' : ' ',
index e914ccade09595a94833d41b780c54238846c3ab..75ae7489b9f0c64b89f6045c2dfaf8407c898aaf 100644 (file)
@@ -201,7 +201,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c);
 #define TAINT_MACHINE_CHECK             (1u << 1)
 #define TAINT_ERROR_INJECT              (1u << 2)
 #define TAINT_HVM_FEP                   (1u << 3)
-#define TAINT_MACHINE_UNSECURE          (1u << 4)
+#define TAINT_MACHINE_INSECURE          (1u << 4)
 #define TAINT_CPU_OUT_OF_SPEC           (1u << 5)
 extern unsigned int tainted;
 #define TAINT_STRING_MAX_LEN            20