Re: [PATCH] x86/fpu: Use consistent test for X86_FEATURE_XSAVES
From: Dave Hansen
Date: Wed Feb 03 2021 - 10:43:22 EST
On 2/3/21 3:23 AM, Borislav Petkov wrote:
>> -/*
>> - * '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?
I still want the compacted-format handling code to be marked. You can
do that with new comments:
/* Note: XSAVES always uses compacted format: */
if (boot_cpu_has(X86_FEATURE_XSAVES)) {
or, leave it as-is:
if (using_compacted_format()) {
...
Otherwise, we assume that every human being that looks at this code
*KNOWS* that XSAVES==compacted. That's not a great assumption.