From: Andrew Cooper <andrew.cooper3@citrix.com>
Date: Fri, 4 Jul 2025 17:53:15 +0100
Subject: x86/xen-cpuid: Fix backports of new features

Xen 4.18 doesn't automatically generate feature names like Xen 4.19 does, and
these hunks were missed on prior security fixes.

Fixes: 8bced9a15c8c ("x86/spec-ctrl: Support for SRSO_U/S_NO and SRSO_MSR_FIX")
Fixes: f132c82fa65d ("x86/spec-ctrl: Synthesise ITS_NO to guests on unaffected hardware")
Fixes: dba055661292 ("x86/spec-ctrl: Support Intel's new PB-OPT")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -195,7 +195,7 @@ static const char *str_e21a[32] =
 
     [26] = "REZ",           [27] = "sbpb",
     [28] = "ibpb-brtype",   [29] = "srso-no",
-    [30] = "REZ",           [31] = "REZ",
+    [30] = "srso-us-no",    [31] = "srso-msr-fix",
 };
 
 static const char *str_7b1[32] =
@@ -222,7 +222,7 @@ static const char *str_7d2[32] =
     [6 ... 31] = "REZ",
 };
 
-static const char *str_m10Al[32] =
+static const char *str_m10Al[64] =
 {
     [ 0] = "rdcl-no",             [ 1] = "eibrs",
     [ 2] = "rsba",                [ 3] = "skip-l1dfl",
@@ -240,12 +240,9 @@ static const char *str_m10Al[32] =
     [26] = "gds-no",              [27] = "rfds-no",
     [28] = "rfds-clear",          [29] = "REZ",
 
-    [30 ... 31] = "REZ",
-};
+    [30 ... 61] = "REZ",
 
-static const char *str_m10Ah[32] =
-{
-    [0 ... 31] = "REZ",
+    [62] = "its-no",              [63] = "REZ",
 };
 
 static struct {
@@ -271,7 +268,7 @@ static struct {
     { "CPUID 0x00000007:1.ecx",     "7c1", str_7c1 },
     { "CPUID 0x00000007:1.edx",     "7d1", str_7d1 },
     { "MSR_ARCH_CAPS.lo",         "m10Al", str_m10Al },
-    { "MSR_ARCH_CAPS.hi",         "m10Ah", str_m10Ah },
+    { "MSR_ARCH_CAPS.hi",         "m10Ah", str_m10Al + 32 },
 };
 
 #define COL_ALIGN "24"
