From: "Shah, Amit" <Amit.Shah@amd.com>
To: "pawan.kumar.gupta@linux.intel.com" <pawan.kumar.gupta@linux.intel.com>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"kai.huang@intel.com" <kai.huang@intel.com>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
"daniel.sneddon@linux.intel.com" <daniel.sneddon@linux.intel.com>,
"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"seanjc@google.com" <seanjc@google.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"Moger, Babu" <Babu.Moger@amd.com>,
"Das1, Sandipan" <Sandipan.Das@amd.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"bp@alien8.de" <bp@alien8.de>,
"Kaplan, David" <David.Kaplan@amd.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 1/2] x86: cpu/bugs: add support for AMD ERAPS feature
Date: Mon, 4 Nov 2024 08:57:29 +0000 [thread overview]
Message-ID: <c3fbf18a4ec015039388617ed899db98272cf181.camel@amd.com> (raw)
In-Reply-To: <20241031225900.k3epw7xej757kz4d@desk>
On Thu, 2024-10-31 at 16:03 -0700, Pawan Gupta wrote:
> On Thu, Oct 31, 2024 at 04:39:24PM +0100, Amit Shah wrote:
> > From: Amit Shah <amit.shah@amd.com>
> >
> > Remove explicit RET stuffing / filling on VMEXITs and context
> > switches on AMD CPUs with the ERAPS feature (Turin+).
> >
> > With the Enhanced Return Address Prediction Security feature, any
> > hardware TLB flush results in flushing of the RSB (aka RAP in AMD
> > spec).
> > This guarantees an RSB flush across context switches.
>
> Is it that the mov to CR3 triggers the RSB flush?
The INVPCID instruction, that causes the TLB flush, is the trigger
here.
> > Feature documented in AMD PPR 57238.
>
> I couldn't find ERAPS feature description here, I could only manage
> to find
> the bit position:
>
> 24 ERAPS. Read-only. Reset: 1. Indicates support for enhanced
> return
> address predictor security.
>
> Could you please point me to the document/section where this is
> described?
Unfortunately, that's all we have right now in the official
documentation.
I've put up some notes in
https://amitshah.net/2024/11/eraps-reduces-software-tax-for-hardware-bugs/
Thanks,
Amit
next prev parent reply other threads:[~2024-11-04 8:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 15:39 [PATCH 0/2] Add support for the ERAPS feature Amit Shah
2024-10-31 15:39 ` [PATCH 1/2] x86: cpu/bugs: add support for AMD " Amit Shah
2024-10-31 23:03 ` Pawan Gupta
2024-11-04 8:57 ` Shah, Amit [this message]
2024-11-04 14:52 ` Andrew Cooper
2024-11-04 15:00 ` Shah, Amit
2024-10-31 23:11 ` Dave Hansen
2024-11-04 8:58 ` Shah, Amit
2024-11-04 16:11 ` Dave Hansen
2024-11-04 16:13 ` Shah, Amit
2024-11-04 16:26 ` Dave Hansen
2024-11-04 17:22 ` Shah, Amit
2024-11-04 17:45 ` Dave Hansen
2024-11-05 0:04 ` Andrew Cooper
2024-11-05 10:39 ` Shah, Amit
2024-11-05 14:54 ` Kaplan, David
2024-11-05 16:19 ` Dave Hansen
2024-11-05 16:25 ` Shah, Amit
2024-10-31 15:39 ` [PATCH 2/2] x86: kvm: svm: add support for ERAPS and FLUSH_RAP_ON_VMRUN Amit Shah
2024-10-31 23:13 ` Pawan Gupta
2024-11-01 4:14 ` kernel test robot
2024-11-01 9:26 ` Amit Shah
2024-11-04 5:18 ` Borislav Petkov
2024-11-04 11:16 ` Shah, Amit
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=c3fbf18a4ec015039388617ed899db98272cf181.camel@amd.com \
--to=amit.shah@amd.com \
--cc=Babu.Moger@amd.com \
--cc=David.Kaplan@amd.com \
--cc=Sandipan.Das@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.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