From: Jacob Keller <jacob.e.keller@intel.com>
To: Dave Hansen <dave.hansen@intel.com>,
Sean Christopherson <sean.j.christopherson@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH] x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes
Date: Wed, 26 Feb 2020 15:40:30 -0800 [thread overview]
Message-ID: <3d869bdf-5ca7-d2ea-cc85-eb461b37b207@intel.com> (raw)
In-Reply-To: <950b249a-f47d-0adc-80dd-68d397e4de4f@intel.com>
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@linux.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
next prev parent reply other threads:[~2020-02-26 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 23:16 Sean Christopherson
2020-02-26 23:32 ` Dave Hansen
2020-02-26 23:40 ` Jacob Keller [this message]
2020-02-27 0:16 ` Jacob Keller
2020-02-27 18:01 ` Borislav Petkov
2020-02-27 18:20 ` Jacob Keller
2020-02-27 18:07 ` [tip: x86/urgent] " tip-bot2 for Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d869bdf-5ca7-d2ea-cc85-eb461b37b207@intel.com \
--to=jacob.e.keller@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®