diff mbox series

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

Message ID 20210608161901.1894-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series x86/cpuid: Half revert "x86/cpuid: Drop special_features[]" | expand

Commit Message

Andrew Cooper June 8, 2021, 4:19 p.m. UTC
xen-cpuid does print out the list of special features, and this is helpful to
keep.

Fixes: ba6950fb070 ("x86/cpuid: Drop special_features[]")
Reported-by: Jan Beulich <JBeulich@suse.com>
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
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>
CC: Sander Eikelenboom <linux@eikelenboom.it>

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(+)

Comments

Jan Beulich June 8, 2021, 4:23 p.m. UTC | #1
On 08.06.2021 18:19, Andrew Cooper wrote:
> xen-cpuid does print out the list of special features, and this is helpful to
> keep.
> 
> Fixes: ba6950fb070 ("x86/cpuid: Drop special_features[]")
> Reported-by: Jan Beulich <JBeulich@suse.com>
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

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),