Re: [PATCH v9 4/5] x86/xsave: Make XSAVE check the base CPUID features before enabling

Andi Kleen
2017-10-13T17:48:52Z

> > + /*
> > + * Clear XSAVE features that are disabled in the normal CPUID.
> > + */
> > + for (i = 0; i < ARRAY_SIZE(xsave_cpuid_features); i++) {
> > + if (!boot_cpu_has(xsave_cpuid_features[i]))
> > + xfeatures_mask &= ~BIT(i);
> > + }
> > +
> > xfeatures_mask &= fpu__get_supported_xfeatures_mask();
> >
> > /* Enable xstate instructions to be able to continue with initialization: */
>
> This patch has similar problems to the ones I reported against 2/5.

I'm not clear what I'm supposed to change here. The array cannot be __initdata
because it is used at cpu hotplug. Nothing else seems to apply.

-Andi