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) [1].
On providing sev=nosnp via kernel command line:
cat /sys/module/kvm_amd/parameters/sev_snp should be "N".
This 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:
v3->v4:
* Remove an irrelevant header (Boris)
* Rebase on latest tip/master
v2->v3:
* Fix the build warning reported by kernel test robot
* https://lore.kernel.org/all/20240905143056.48216-1-papaluri@amd.com/
v1->v2:
* Pick R-b's from Tom.
* Include only those headers that provide the necessary definitions (Boris)
* Provide appropriate references to SEV, SNP and RMP (Matthew)
* https://lore.kernel.org/all/20240903003511.1530454-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 | 3 ++
arch/x86/coco/sev/core.c | 44 -------------------
arch/x86/include/asm/sev-common.h | 29 ++++++++++++
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: 6d3e8e28e20d250d2f3ebb3f5afb63848a2aebf9
--
2.34.1