public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/2] nosnp sev command line support
@ 2024-10-10 12:14 Pavan Kumar Paluri
  2024-10-10 12:14 ` [PATCH v6 1/2] x86, KVM:SVM: Move sev specific parsing into arch/x86/virt/svm Pavan Kumar Paluri
  2024-10-10 12:14 ` [PATCH v6 2/2] x86 KVM:SVM: Provide "nosnp" boot option for sev kernel command line Pavan Kumar Paluri
  0 siblings, 2 replies; 10+ messages in thread
From: Pavan Kumar Paluri @ 2024-10-10 12:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-doc, linux-coco, Borislav Petkov, Thomas Gleixner,
	Ingo Molnar, Dave Hansen, Eric Van Tassell, Tom Lendacky,
	Ashish Kalra, Michael Roth, H . Peter Anvin, Peter Zijlstra,
	Pavan Kumar Paluri, Dhaval Giani

Provide "nosnp" boot option via "sev=nosnp" kernel command line to
prevent SEV-SNP [1] capable host kernel from enabling SEV-SNP and
initializing Reverse Map Table (RMP)

Setting 'nosnp' avoids the RMP check overhead in memory accesses when
users do not want to run SEV-SNP guests.

On providing sev=nosnp via kernel command line:
cat /sys/module/kvm_amd/parameters/sev_snp should be "N".

The patchset is based on tip/master.

Reference:
[1] https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/24593.pdf

Changelog:
=========
v5:
  * Update cover-letter and Documentation to include information on why
    nosnp command line option is required (Dave Hansen)
  * Remove <asm/cache.h> stray header introduced in the previous
    versions because of __read_mostly attribute that is now moved into
    virt/svm/cmdline.c
  * Link: https://lore.kernel.org/all/20240930231102.123403-1-papaluri@amd.com/

v4:
  * Move __read_mostly attribute to place where sev_cfg is declared (Tom)
  * Link: https://lore.kernel.org/all/20240922033626.29038-1-papaluri@amd.com/

Pavan Kumar Paluri (2):
  x86, KVM:SVM: Move sev specific parsing into arch/x86/virt/svm
  x86 KVM:SVM: Provide "nosnp" boot option for sev kernel command line

 .../arch/x86/x86_64/boot-options.rst          |  5 +++
 arch/x86/coco/sev/core.c                      | 44 -------------------
 arch/x86/include/asm/sev-common.h             | 27 ++++++++++++
 arch/x86/virt/svm/Makefile                    |  1 +
 arch/x86/virt/svm/cmdline.c                   | 39 ++++++++++++++++
 5 files changed, 72 insertions(+), 44 deletions(-)
 create mode 100644 arch/x86/virt/svm/cmdline.c


base-commit: 00d91979d23c88d3f50870e22fc9cec3f5e26a2a
-- 
2.34.1


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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 12:14 [PATCH v6 0/2] nosnp sev command line support Pavan Kumar Paluri
2024-10-10 12:14 ` [PATCH v6 1/2] x86, KVM:SVM: Move sev specific parsing into arch/x86/virt/svm Pavan Kumar Paluri
2024-10-11 16:21   ` Borislav Petkov
2024-10-11 16:35     ` Tom Lendacky
2024-10-11 16:48       ` Borislav Petkov
2024-10-11 16:55         ` Tom Lendacky
2024-10-11 16:59           ` Borislav Petkov
2024-10-11 17:08             ` Paluri, PavanKumar
2024-10-11 22:16               ` Borislav Petkov
2024-10-10 12:14 ` [PATCH v6 2/2] x86 KVM:SVM: Provide "nosnp" boot option for sev kernel command line Pavan Kumar Paluri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox