linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/3] Add support for the ERAPS feature
@ 2024-11-11 16:39 Amit Shah
  2024-11-11 16:39 ` [RFC PATCH v2 1/3] x86: cpu/bugs: update SpectreRSB comments for AMD Amit Shah
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Amit Shah @ 2024-11-11 16:39 UTC (permalink / raw)
  To: linux-kernel, kvm, x86, linux-doc
  Cc: amit.shah, thomas.lendacky, bp, tglx, peterz, jpoimboe,
	pawan.kumar.gupta, corbet, mingo, dave.hansen, hpa, seanjc,
	pbonzini, daniel.sneddon, kai.huang, sandipan.das,
	boris.ostrovsky, Babu.Moger, david.kaplan, dwmw, andrew.cooper3,
	Amit Shah

Newer AMD CPUs (Zen5+) have the ERAPS feature bit that allows us to remove the
RSB filling loops required during context switches and VM exits.

This patchset implements the feature to:
* remove the need for RSB filling on context switches and VMEXITs in host and
  guests
* allow KVM guests to use the full default RSB stack

The feature isn't yet part of an APM update that details its working, so this
is still tagged as RFC.

The v1 posting resulted in some questions on patch 1 -- I've included the
context and comments in the commit text for patch 1 in this posting.

v2:
* reword comments to highlight context switch as the main trigger for RSB
  flushes in hardware (Dave Hansen)
* Split out outdated comment updates in (v1) patch1 to be a standalone
  patch1 in this series, to reinforce RSB filling is only required for RSB
  poisoning cases for AMD
  * Remove mentions of BTC/BTC_NO (Andrew Cooper)
* Add braces in case stmt (kernel test robot)
* s/boot_cpu_has/cpu_feature_enabled (Boris Petkov)

Amit Shah (3):
  x86: cpu/bugs: update SpectreRSB comments for AMD
  x86: cpu/bugs: add support for AMD ERAPS feature
  x86: kvm: svm: add support for ERAPS and FLUSH_RAP_ON_VMRUN

 Documentation/admin-guide/hw-vuln/spectre.rst |  5 ++-
 arch/x86/include/asm/cpufeatures.h            |  1 +
 arch/x86/include/asm/nospec-branch.h          | 12 +++++
 arch/x86/include/asm/svm.h                    |  6 ++-
 arch/x86/kernel/cpu/bugs.c                    | 34 ++++++++------
 arch/x86/kvm/cpuid.c                          | 18 +++++++-
 arch/x86/kvm/svm/svm.c                        | 44 +++++++++++++++++++
 arch/x86/kvm/svm/svm.h                        | 15 +++++++
 8 files changed, 117 insertions(+), 18 deletions(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2024-11-18 10:16 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 16:39 [RFC PATCH v2 0/3] Add support for the ERAPS feature Amit Shah
2024-11-11 16:39 ` [RFC PATCH v2 1/3] x86: cpu/bugs: update SpectreRSB comments for AMD Amit Shah
2024-11-11 17:01   ` Dave Hansen
2024-11-11 19:33   ` Josh Poimboeuf
2024-11-11 19:58     ` Kaplan, David
2024-11-11 20:39       ` Josh Poimboeuf
2024-11-11 20:40         ` Josh Poimboeuf
2024-11-12  0:30           ` Josh Poimboeuf
2024-11-12  0:29     ` Andrew Cooper
2024-11-12  1:46       ` Josh Poimboeuf
2024-11-12 11:58         ` Borislav Petkov
2024-11-13 21:24           ` Josh Poimboeuf
2024-11-13 21:37             ` Borislav Petkov
2024-11-14  0:43               ` Josh Poimboeuf
2024-11-14  7:47                 ` Borislav Petkov
2024-11-14  9:47                   ` Ingo Molnar
2024-11-14  9:54                     ` Borislav Petkov
2024-11-12 15:16         ` Shah, Amit
2024-11-12 21:43         ` Pawan Gupta
2024-11-13 20:21           ` Josh Poimboeuf
2024-11-14  1:55             ` Pawan Gupta
2024-11-14  2:31               ` Josh Poimboeuf
2024-11-14  8:01                 ` Pawan Gupta
2024-11-15  5:48                   ` Josh Poimboeuf
2024-11-15 14:44                     ` Kaplan, David
2024-11-15 17:05                       ` Josh Poimboeuf
2024-11-15 17:50                     ` Pawan Gupta
2024-11-15 18:10                       ` Josh Poimboeuf
2024-11-18 10:15                         ` Shah, Amit
2024-11-11 16:39 ` [RFC PATCH v2 2/3] x86: cpu/bugs: add support for AMD ERAPS feature Amit Shah
2024-11-11 18:57   ` Dave Hansen
2024-11-13 10:33     ` Shah, Amit
2024-11-11 16:39 ` [RFC PATCH v2 3/3] x86: kvm: svm: add support for ERAPS and FLUSH_RAP_ON_VMRUN Amit Shah
2024-11-11 19:02   ` Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).