* [PATCH] x86/cpuid: Drop special_features[]
@ 2021-06-07 12:41 Andrew Cooper
2021-06-07 12:56 ` Jan Beulich
2021-06-08 6:18 ` Jan Beulich
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cooper @ 2021-06-07 12:41 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné, Wei Liu
While the ! annotation is useful to indicate that something special is
happening, an array of bits is not. Drop it, to prevent mistakes.
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>
---
xen/arch/x86/cpuid.c | 2 --
xen/include/asm-x86/cpuid.h | 1 -
xen/tools/gen-cpuid.py | 3 ---
3 files changed, 6 deletions(-)
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 958caf35da..2079a30ae4 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -14,7 +14,6 @@
#include <asm/xstate.h>
const uint32_t known_features[] = INIT_KNOWN_FEATURES;
-const uint32_t special_features[] = INIT_SPECIAL_FEATURES;
static const uint32_t __initconst pv_max_featuremask[] = INIT_PV_MAX_FEATURES;
static const uint32_t hvm_shadow_max_featuremask[] = INIT_HVM_SHADOW_MAX_FEATURES;
@@ -1132,7 +1131,6 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
static void __init __maybe_unused build_assertions(void)
{
BUILD_BUG_ON(ARRAY_SIZE(known_features) != FSCAPINTS);
- BUILD_BUG_ON(ARRAY_SIZE(special_features) != FSCAPINTS);
BUILD_BUG_ON(ARRAY_SIZE(pv_max_featuremask) != FSCAPINTS);
BUILD_BUG_ON(ARRAY_SIZE(hvm_shadow_max_featuremask) != FSCAPINTS);
BUILD_BUG_ON(ARRAY_SIZE(hvm_hap_max_featuremask) != FSCAPINTS);
diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h
index 7baf6c9628..46904061d0 100644
--- a/xen/include/asm-x86/cpuid.h
+++ b/xen/include/asm-x86/cpuid.h
@@ -14,7 +14,6 @@
#include <public/sysctl.h>
extern const uint32_t known_features[FSCAPINTS];
-extern const uint32_t special_features[FSCAPINTS];
void init_guest_cpuid(void);
diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
index b953648b65..c6b5056a8d 100755
--- a/xen/tools/gen-cpuid.py
+++ b/xen/tools/gen-cpuid.py
@@ -362,8 +362,6 @@ 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}
@@ -384,7 +382,6 @@ 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),
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpuid: Drop special_features[]
2021-06-07 12:41 [PATCH] x86/cpuid: Drop special_features[] Andrew Cooper
@ 2021-06-07 12:56 ` Jan Beulich
2021-06-08 6:18 ` Jan Beulich
1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2021-06-07 12:56 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Roger Pau Monné, Wei Liu, Xen-devel
On 07.06.2021 14:41, Andrew Cooper wrote:
> While the ! annotation is useful to indicate that something special is
> happening, an array of bits is not. Drop it, to prevent mistakes.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpuid: Drop special_features[]
2021-06-07 12:41 [PATCH] x86/cpuid: Drop special_features[] Andrew Cooper
2021-06-07 12:56 ` Jan Beulich
@ 2021-06-08 6:18 ` Jan Beulich
2021-06-08 8:46 ` Andrew Cooper
1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2021-06-08 6:18 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Roger Pau Monné, Wei Liu, Xen-devel
On 07.06.2021 14:41, Andrew Cooper wrote:
> While the ! annotation is useful to indicate that something special is
> happening, an array of bits is not. Drop it, to prevent mistakes.
>
> 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>
> ---
> xen/arch/x86/cpuid.c | 2 --
> xen/include/asm-x86/cpuid.h | 1 -
> xen/tools/gen-cpuid.py | 3 ---
> 3 files changed, 6 deletions(-)
As osstest points out this didn't go quite far enough, or too far:
Either XC_FEATUREMASK_SPECIAL also needs dropping (including its uses
in libxenguest and xen-cpuid) or, considering exposing this
information via xen-cpuid isn't entirely without purpose, the script
part of the original change needs undoing or making conditional e.g.
upon __XEN__.
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpuid: Drop special_features[]
2021-06-08 6:18 ` Jan Beulich
@ 2021-06-08 8:46 ` Andrew Cooper
2021-06-08 9:01 ` Jan Beulich
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2021-06-08 8:46 UTC (permalink / raw)
To: Jan Beulich; +Cc: Roger Pau Monné, Wei Liu, Xen-devel
On 08/06/2021 07:18, Jan Beulich wrote:
> On 07.06.2021 14:41, Andrew Cooper wrote:
>> While the ! annotation is useful to indicate that something special is
>> happening, an array of bits is not. Drop it, to prevent mistakes.
>>
>> 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>
>> ---
>> xen/arch/x86/cpuid.c | 2 --
>> xen/include/asm-x86/cpuid.h | 1 -
>> xen/tools/gen-cpuid.py | 3 ---
>> 3 files changed, 6 deletions(-)
> As osstest points out this didn't go quite far enough, or too far:
> Either XC_FEATUREMASK_SPECIAL also needs dropping (including its uses
> in libxenguest and xen-cpuid) or, considering exposing this
> information via xen-cpuid isn't entirely without purpose, the script
> part of the original change needs undoing or making conditional e.g.
> upon __XEN__.
Yes - Gitlab CI didn't spot, because there is a different breakage from
PV32 blocking things.
I think I'll reinstate the gen-cpuid.py hunks because having xen-cpuid
print out the bits when asked is helpful.
~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpuid: Drop special_features[]
2021-06-08 8:46 ` Andrew Cooper
@ 2021-06-08 9:01 ` Jan Beulich
0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2021-06-08 9:01 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Roger Pau Monné, Wei Liu, Xen-devel
On 08.06.2021 10:46, Andrew Cooper wrote:
> On 08/06/2021 07:18, Jan Beulich wrote:
>> On 07.06.2021 14:41, Andrew Cooper wrote:
>>> While the ! annotation is useful to indicate that something special is
>>> happening, an array of bits is not. Drop it, to prevent mistakes.
>>>
>>> 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>
>>> ---
>>> xen/arch/x86/cpuid.c | 2 --
>>> xen/include/asm-x86/cpuid.h | 1 -
>>> xen/tools/gen-cpuid.py | 3 ---
>>> 3 files changed, 6 deletions(-)
>> As osstest points out this didn't go quite far enough, or too far:
>> Either XC_FEATUREMASK_SPECIAL also needs dropping (including its uses
>> in libxenguest and xen-cpuid) or, considering exposing this
>> information via xen-cpuid isn't entirely without purpose, the script
>> part of the original change needs undoing or making conditional e.g.
>> upon __XEN__.
>
> Yes - Gitlab CI didn't spot, because there is a different breakage from
> PV32 blocking things.
Oh, what further problem do we have? What I can see there (picking a
random build log) is the failure from the change here ...
> I think I'll reinstate the gen-cpuid.py hunks because having xen-cpuid
> print out the bits when asked is helpful.
And maybe put the #define inside "#ifndef __XEN__" then?
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-08 9:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 12:41 [PATCH] x86/cpuid: Drop special_features[] Andrew Cooper
2021-06-07 12:56 ` Jan Beulich
2021-06-08 6:18 ` Jan Beulich
2021-06-08 8:46 ` Andrew Cooper
2021-06-08 9:01 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).