Re: [RFC PATCH v2] x86/arch_prctl: Add ARCH_SET_XCR0 to set XCR0 per-thread

From: Peter Zijlstra
Date: Tue Apr 07 2020 - 08:21:26 EST


On Mon, Apr 06, 2020 at 09:12:59PM -0400, Keno Fischer wrote:
> This is a follow-up to my from two-years ago [1]. I've been using
> rebased versions of that patch locally for my needs, but I've had
> more people ask me about this patch recently, so I figured, I'd
> have another go at this. Even if this doesn't make it into mainline,
> I figure I can at least improve the quality of the patch for others
> who want to use it. That's said, here's how this version is
> different from v1:

Aside of having an inconsistent comment style and whitespace damage, it
adds exports without a module user.

But my main reason for replying is asking: 'What the heck for?'

You had a fairly long changelog detailing what the patchd does; but I've
failed to find a single word on _WHY_ we want to do any of that.