Re: [patch V2 18/52] x86/fpu: Get rid of using_compacted_format()

Borislav Petkov
2021-06-17T12:00:06Z

On Mon, Jun 14, 2021 at 05:44:26PM +0200, Thomas Gleixner wrote:
> @@ -590,9 +576,9 @@ static void do_extra_xstate_size_checks(
> check_xstate_against_struct(i);
> /*
> * Supervisor state components can be managed only by
> - * XSAVES, which is compacted-format only.
> + * XSAVES.
> */
> - if (!using_compacted_format())
> + if (!static_cpu_has(X86_FEATURE_XSAVES))
> XSTATE_WARN_ON(xfeature_is_supervisor(i));
>
> /* Align from the end of the previous feature */
> @@ -602,9 +588,9 @@ static void do_extra_xstate_size_checks(
> * The offset of a given state in the non-compacted
> * format is given to us in a CPUID leaf. We check
> * them for being ordered (increasing offsets) in
> - * setup_xstate_features().
> + * setup_xstate_features(). XSAVES uses compacted format.
> */
> - if (!using_compacted_format())
> + if (!static_cpu_has(X86_FEATURE_XSAVES))

both: cpu_feature_enabled()

and yes, I have complained about that one in the past so good riddance.

Reviewed-by: Borislav Petkov <bp@suse.de>

Btw, that patch looks like it could be moved to the beginning of the
patchset, right after the urgent fixes as it is an independent cleanup.

Thx.

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg