lkml.org 
[lkml]   [2021]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: XSAVE / RDPKRU on Intel 11th Gen Core CPUs
On Tue, Nov 9, 2021 at 8:43 AM Brian Geffon <bgeffon@google.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

\
 
 \ /
  Last update: 2021-11-09 15:15    [W:0.600 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site