[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d869bdf-5ca7-d2ea-cc85-eb461b37b207@intel.com>
Date: Wed, 26 Feb 2020 15:40:30 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Dave Hansen <dave.hansen@...el.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org
Cc: "H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve
existing changes
On 2/26/2020 3:32 PM, Dave Hansen wrote:
> On 2/26/20 3:16 PM, Sean Christopherson wrote:
>> Explicitly set X86_FEATURE_OSPKE via set_cpu_cap() instead of calling
>> get_cpu_cap() to pull the feature bit from CPUID after enabling CR4.PKE.
>
> First of all,
>
> Acked-by: Dave Hansen <dave.hansen@...ux.intel.com>
>
> I don't remember whether it was you or someone else inside Intel, but
> someone was tripping over this recently.
>
> I do think we need a bit more care in how we deal with dynamic CPUID
> bits. I think you'd agree that it's a bit haphazard. For instance, I
> went looking for where we set X86_FEATURE_OSXSAVE after the
>
> cr4_set_bits(X86_CR4_OSXSAVE);
>
> inside fpu__init_cpu_xstate() makes it appear. I couldn't find one, not
> that we would notice since we suppress it from /proc/cpuinfo.
>
I tripped over it. It's possible someone else has as well, but I haven't
heard from anyone else.
Thanks,
Jake
Powered by blists - more mailing lists