| Date | Mon, 21 Jun 2021 20:00:06 +0200 | From | Borislav Petkov <> | Subject | Re: [patch V3 27/66] x86/fpu: Rename copy_xregs_to_kernel() and copy_kernel_to_xregs() |
| |
On Fri, Jun 18, 2021 at 04:18:50PM +0200, Thomas Gleixner wrote: > The function names for xsave[s]/xrstor[s] operations are horribly named and > a permanent source of confusion. > > Rename: > copy_xregs_to_kernel() to os_xsave() > copy_kernel_to_xregs() to os_xrstor() > > These are truly low level wrappers around the actual instructions > XSAVE[OPT]/XRSTOR and XSAVES/XRSTORS with the twist that the selection > based on the available CPU features happens with an alternative to avoid > conditionals all over the place and to provide the best performance for hot > pathes.
"paths".
You need more elisp magic here. :)
> @@ -385,7 +390,7 @@ extern int copy_fpregs_to_fpstate(struct > static inline void __copy_kernel_to_fpregs(union fpregs_state *fpstate, u64 mask) > { > if (use_xsave()) { > - copy_kernel_to_xregs(&fpstate->xsave, mask); > + os_xrstor(&fpstate->xsave, mask);
Yeah, this reads funny now:
if use xsave, then xrstor.
and then later
if use xsave, then xsave.
where latter makes perfect sense but former makes you stop and think for a bit.
:-)
Regardless, it is still move in the right direction.
Reviewed-by: Borislav Petkov <bp@suse.de>
-- Regards/Gruss, Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
|