xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/CPUID: move some static masks into .init
@ 2020-07-15  7:45 Jan Beulich
  2020-07-31 14:55 ` Ping: " Jan Beulich
  2021-04-01 14:13 ` Roger Pau Monné
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Beulich @ 2020-07-15  7:45 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

Except for hvm_shadow_max_featuremask and deep_features they're
referenced by __init functions only.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -16,12 +16,15 @@
 const uint32_t known_features[] = INIT_KNOWN_FEATURES;
 const uint32_t special_features[] = INIT_SPECIAL_FEATURES;
 
-static const uint32_t pv_max_featuremask[] = INIT_PV_MAX_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;
-static const uint32_t hvm_hap_max_featuremask[] = INIT_HVM_HAP_MAX_FEATURES;
-static const uint32_t pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
-static const uint32_t hvm_shadow_def_featuremask[] = INIT_HVM_SHADOW_DEF_FEATURES;
-static const uint32_t hvm_hap_def_featuremask[] = INIT_HVM_HAP_DEF_FEATURES;
+static const uint32_t __initconst hvm_hap_max_featuremask[] =
+    INIT_HVM_HAP_MAX_FEATURES;
+static const uint32_t __initconst pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
+static const uint32_t __initconst hvm_shadow_def_featuremask[] =
+    INIT_HVM_SHADOW_DEF_FEATURES;
+static const uint32_t __initconst hvm_hap_def_featuremask[] =
+    INIT_HVM_HAP_DEF_FEATURES;
 static const uint32_t deep_features[] = INIT_DEEP_FEATURES;
 
 static int __init parse_xen_cpuid(const char *s)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Ping: [PATCH] x86/CPUID: move some static masks into .init
  2020-07-15  7:45 [PATCH] x86/CPUID: move some static masks into .init Jan Beulich
@ 2020-07-31 14:55 ` Jan Beulich
  2021-04-01  8:14   ` Ping²: " Jan Beulich
  2021-04-01 14:13 ` Roger Pau Monné
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2020-07-31 14:55 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu, Roger Pau Monné; +Cc: xen-devel

On 15.07.2020 09:45, Jan Beulich wrote:
> Except for hvm_shadow_max_featuremask and deep_features they're
> referenced by __init functions only.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/arch/x86/cpuid.c
> +++ b/xen/arch/x86/cpuid.c
> @@ -16,12 +16,15 @@
>  const uint32_t known_features[] = INIT_KNOWN_FEATURES;
>  const uint32_t special_features[] = INIT_SPECIAL_FEATURES;
>  
> -static const uint32_t pv_max_featuremask[] = INIT_PV_MAX_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;
> -static const uint32_t hvm_hap_max_featuremask[] = INIT_HVM_HAP_MAX_FEATURES;
> -static const uint32_t pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
> -static const uint32_t hvm_shadow_def_featuremask[] = INIT_HVM_SHADOW_DEF_FEATURES;
> -static const uint32_t hvm_hap_def_featuremask[] = INIT_HVM_HAP_DEF_FEATURES;
> +static const uint32_t __initconst hvm_hap_max_featuremask[] =
> +    INIT_HVM_HAP_MAX_FEATURES;
> +static const uint32_t __initconst pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
> +static const uint32_t __initconst hvm_shadow_def_featuremask[] =
> +    INIT_HVM_SHADOW_DEF_FEATURES;
> +static const uint32_t __initconst hvm_hap_def_featuremask[] =
> +    INIT_HVM_HAP_DEF_FEATURES;
>  static const uint32_t deep_features[] = INIT_DEEP_FEATURES;
>  
>  static int __init parse_xen_cpuid(const char *s)
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Ping²: [PATCH] x86/CPUID: move some static masks into .init
  2020-07-31 14:55 ` Ping: " Jan Beulich
@ 2021-04-01  8:14   ` Jan Beulich
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2021-04-01  8:14 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu, Roger Pau Monné; +Cc: xen-devel

On 31.07.2020 16:55, Jan Beulich wrote:
> On 15.07.2020 09:45, Jan Beulich wrote:
>> Except for hvm_shadow_max_featuremask and deep_features they're
>> referenced by __init functions only.
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> --- a/xen/arch/x86/cpuid.c
>> +++ b/xen/arch/x86/cpuid.c
>> @@ -16,12 +16,15 @@
>>  const uint32_t known_features[] = INIT_KNOWN_FEATURES;
>>  const uint32_t special_features[] = INIT_SPECIAL_FEATURES;
>>  
>> -static const uint32_t pv_max_featuremask[] = INIT_PV_MAX_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;
>> -static const uint32_t hvm_hap_max_featuremask[] = INIT_HVM_HAP_MAX_FEATURES;
>> -static const uint32_t pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
>> -static const uint32_t hvm_shadow_def_featuremask[] = INIT_HVM_SHADOW_DEF_FEATURES;
>> -static const uint32_t hvm_hap_def_featuremask[] = INIT_HVM_HAP_DEF_FEATURES;
>> +static const uint32_t __initconst hvm_hap_max_featuremask[] =
>> +    INIT_HVM_HAP_MAX_FEATURES;
>> +static const uint32_t __initconst pv_def_featuremask[] = INIT_PV_DEF_FEATURES;
>> +static const uint32_t __initconst hvm_shadow_def_featuremask[] =
>> +    INIT_HVM_SHADOW_DEF_FEATURES;
>> +static const uint32_t __initconst hvm_hap_def_featuremask[] =
>> +    INIT_HVM_HAP_DEF_FEATURES;
>>  static const uint32_t deep_features[] = INIT_DEEP_FEATURES;
>>  
>>  static int __init parse_xen_cpuid(const char *s)

While I seem to recall that you, Andrew, said on irc that this change
may need almost immediate reverting with some further work you were
meaning to do, this work hasn't surfaced in the 8.5 months this patch
has been pending. Therefore I think I should have gone in right at
the time. Even if it's going to get (partly) reverted over time, I
think until such time it is benefitial to have that data moved to
.init. I therefore intend to commit this, again if need be without
any acks, once the tree is fully open again.

Jan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/CPUID: move some static masks into .init
  2020-07-15  7:45 [PATCH] x86/CPUID: move some static masks into .init Jan Beulich
  2020-07-31 14:55 ` Ping: " Jan Beulich
@ 2021-04-01 14:13 ` Roger Pau Monné
  1 sibling, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2021-04-01 14:13 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Andrew Cooper, Wei Liu

On Wed, Jul 15, 2020 at 09:45:47AM +0200, Jan Beulich wrote:
> Except for hvm_shadow_max_featuremask and deep_features they're
> referenced by __init functions only.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

AFAICT those are still only used by __init functions:

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

And making those non-init when required is trivial.

Thanks, Roger.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-01 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-15  7:45 [PATCH] x86/CPUID: move some static masks into .init Jan Beulich
2020-07-31 14:55 ` Ping: " Jan Beulich
2021-04-01  8:14   ` Ping²: " Jan Beulich
2021-04-01 14:13 ` Roger Pau Monné

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