Re: [PATCH] x86/fpu: Use consistent test for X86_FEATURE_XSAVES

From: Borislav Petkov
Date: Wed Feb 03 2021 - 06:27:34 EST


On Tue, Feb 02, 2021 at 06:40:52PM -0800, Chang S. Bae wrote:
> When XSAVES is present, the kernel always takes advantage of it, and XSAVES
> always uses compacted format.
>
> The macro using_compacted_format() implies that using compacted format may

Not a macro.

> be possible without XSAVES (say by using XSAVEC), but that is not possible
> here, so delete that confusing macro and simply test for what we want to
> know in the first place -- if we have XSAVES or not.

Who's "we"?

> @@ -500,20 +500,6 @@ int xfeature_size(int xfeature_nr)
> return eax;
> }
>
> -/*
> - * 'XSAVES' implies two different things:
> - * 1. saving of supervisor/system state
> - * 2. using the compacted format
> - *
> - * Use this function when dealing with the compacted format so
> - * that it is obvious which aspect of 'XSAVES' is being handled
> - * by the calling code.

@dhansen, are you still hung up on that "obvious aspect" or can we kill
this?

--
Regards/Gruss,
Boris.

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