Re: [PATCH v1] x86/fpu: Remove opmask state from avx512_timestamp check

From: Borislav Petkov
Date: Fri Oct 15 2021 - 10:40:47 EST


On Thu, Oct 14, 2021 at 10:49:25AM -0500, Noah Goldstein wrote:
> Is there a cost to the change I am not seeing?

The cost is having yet another macro in our crazy FPU code because
apparently everything but the kitchen sink is being put into xstates.

So I'd suggest you carve out that timestamp update into a separate
function, i.e., something like fpu_update_avx_timestamp() or so - and
add the macro in it along with the comment explaining what and why
is being tracked.

So that that functionality is separated out of the main flow,
save_fpregs_to_fpstate() simply calls it and it doesn't get in the way
of the next rewrite of the FPU code to accomodate new crap^W features.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette