>>> On 04.01.17 at 13:39, <andrew.coop...@citrix.com> wrote:
>  static void __init calculate_pv_max_policy(void)
>  {
>      struct cpuid_policy *p = &pv_max_policy;
> +    uint32_t pv_featureset[FSCAPINTS], host_featureset[FSCAPINTS];
>      unsigned int i;
>  
> +    cpuid_policy_to_featureset(&host_policy, host_featureset);
> +
>      for ( i = 0; i < FSCAPINTS; ++i )
>          pv_featureset[i] = host_featureset[i] & pv_featuremask[i];

While at init time we shouldn't be tight on stack space, it would still
feel better if you didn't put two such (growing in the future) arrays
on the stack. Would you consider it unreasonable to do

    cpuid_policy_to_featureset(&host_policy, pv_featureset);
    for ( i = 0; i < FSCAPINTS; ++i )
        pv_featureset[i] &= pv_featuremask[i];

(and then similarly for HVM)? Either way
Reviewed-by: Jan Beulich <jbeul...@suse.com>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to