[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b23d73d450d284bbefc4f23d8a7f0798517e24e.camel@amd.com>
Date: Mon, 4 Nov 2024 08:58:41 +0000
From: "Shah, Amit" <Amit.Shah@....com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "dave.hansen@...el.com"
<dave.hansen@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-doc@...r.kernel.org"
<linux-doc@...r.kernel.org>, "x86@...nel.org" <x86@...nel.org>
CC: "corbet@....net" <corbet@....net>, "boris.ostrovsky@...cle.com"
<boris.ostrovsky@...cle.com>, "kai.huang@...el.com" <kai.huang@...el.com>,
"pawan.kumar.gupta@...ux.intel.com" <pawan.kumar.gupta@...ux.intel.com>,
"jpoimboe@...nel.org" <jpoimboe@...nel.org>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "daniel.sneddon@...ux.intel.com"
<daniel.sneddon@...ux.intel.com>, "Lendacky, Thomas"
<Thomas.Lendacky@....com>, "seanjc@...gle.com" <seanjc@...gle.com>,
"mingo@...hat.com" <mingo@...hat.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "tglx@...utronix.de" <tglx@...utronix.de>, "Moger,
Babu" <Babu.Moger@....com>, "Das1, Sandipan" <Sandipan.Das@....com>,
"hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
<peterz@...radead.org>, "bp@...en8.de" <bp@...en8.de>, "Kaplan, David"
<David.Kaplan@....com>
Subject: Re: [PATCH 1/2] x86: cpu/bugs: add support for AMD ERAPS feature
On Thu, 2024-10-31 at 16:11 -0700, Dave Hansen wrote:
> On 10/31/24 08:39, Amit Shah wrote:
> ...
> > 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.
>
> Check out the APM, volume 2: "5.5.1 Process Context Identifier"
>
> ... when system software switches address spaces (by writing
> ...
> CR3[62:12]), the processor may use TLB mappings previously
> stored for that address space and PCID, providing that bit
> 63 of
> the source operand is set to 1.
>
> tl;dr: PCIDs mean you don't necessarily flush the TLB on context
> switches.
Right - thanks, I'll have to reword that to say the RSB is flushed
along with the TLB - so any action that causes the TLB to be flushed
will also cause the RSB to be flushed.
Powered by blists - more mailing lists