[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/cpuid: Half revert "x86/cpuid: Drop special_features[]"

  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 8 Jun 2021 17:19:01 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 08 Jun 2021 16:21:12 +0000
  • Ironport-hdrordr: A9a23:BAyZOqCTTR7UTv3lHemg55DYdb4zR+YMi2TC1yhKJyC9Ffbo8P xG/c5rsSMc5wxwZJhNo7y90cq7MBbhHPxOkOos1N6ZNWGM0gaVxelZnO3fKlbbehEWmNQz6U 4ZSdkdNOHN
  • Ironport-sdr: g3FRmaIpO0D+TVKbxTrl0zqm/Y0UhMpAVeVB5MVKkvNUNMfT1bItSwsiPfIXCafrlknXmrct02 vucAmrrtKHCNmQAylpIHMSYSN0g8D0jtSvbfLo/OXsb14y67kMcpwYemKwz8l7KhZkmnJjTwYd uz9sz7QbygzZUCo4sLCCJAog4Mm/9APaw9D/QapmHV4739z+ciwumYph6wJMtz+qeI1stkoiDv nKqrQ/oJOk59i5XmYkEaFO0VChBEg4wKuYjOqwdpRJsQdGqS0fdsoZ4y8kggBrp8O/toFUMP7y pXI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

xen-cpuid does print out the list of special features, and this is helpful to

Fixes: ba6950fb070 ("x86/cpuid: Drop special_features[]")
Reported-by: Jan Beulich <JBeulich@xxxxxxxx>
Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>

Note - this deliberately doesn't insert ifdefary, because it is pointless.  It
adds to constructing/parsing time, and nothing in Xen can gain access to this
without an explicit introduction of INIT_SPECIAL_FEATURES again, which will be
obvious during code review.
 xen/tools/gen-cpuid.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
index c6b5056a8d..b953648b65 100755
--- a/xen/tools/gen-cpuid.py
+++ b/xen/tools/gen-cpuid.py
@@ -362,6 +362,8 @@ def write_results(state):
 #define INIT_KNOWN_FEATURES { \\\n%s\n}
+#define INIT_SPECIAL_FEATURES { \\\n%s\n}
 #define INIT_PV_DEF_FEATURES { \\\n%s\n}
 #define INIT_PV_MAX_FEATURES { \\\n%s\n}
@@ -382,6 +384,7 @@ def write_results(state):
 """ % (state.nr_entries,
        next(featureset_to_uint32s(state.common_1d, 1)),
        format_uint32s(state, state.names.keys(), 4),
+       format_uint32s(state, state.raw['!'], 4),
        format_uint32s(state, state.pv_def, 4),
        format_uint32s(state, state.pv_max, 4),
        format_uint32s(state, state.hvm_shadow_def, 4),



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.