[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADyq12yrcJkxALo4muEnR3Nm2yyZAvtabN3RY4fm1DSqtNTF0A@mail.gmail.com>
Date: Tue, 9 Nov 2021 09:14:16 -0500
From: Brian Geffon <bgeffon@...gle.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Guenter Roeck <groeck@...gle.com>,
Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...nel.org>, stable@...r.kernel.org,
"the arch/x86 maintainers" <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: XSAVE / RDPKRU on Intel 11th Gen Core CPUs
On Tue, Nov 9, 2021 at 8:43 AM Brian Geffon <bgeffon@...gle.com> wrote:
> What's interesting is that writing to init_pkru fails with -EINVAL for me,
> and I've traced it down to get_xsave_addr() returning NULL on the following
> check:
>
> /*
> * This assumes the last 'xsave*' instruction to
> * have requested that 'xfeature_nr' be saved.
> * If it did not, we might be seeing and old value
> * of the field in the buffer.
> *
> * This can happen because the last 'xsave' did not
> * request that this feature be saved (unlikely)
> * or because the "init optimization" caused it
> * to not be saved.
> */
> if (!(xsave->header.xfeatures & BIT_ULL(xfeature_nr)))
> return NULL;
>
Sorry, I should have probably also shared the value of xfeatures at
this point is 0x3: which appears to be: (X86_FEATURE_FPU |
X86_FEATURE_XMM)
Brian
Powered by blists - more mailing lists