]> www.infradead.org Git - linux.git/commit
x86/sev: Check for the presence of an SVSM in the SNP secrets page
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 5 Jun 2024 15:18:45 +0000 (10:18 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 11 Jun 2024 05:22:46 +0000 (07:22 +0200)
commit878e70dbd26e234e6e6941dac3a233af6f632184
treea72b58480c89933154a92ba6546de8e03778b48f
parentb547fc2c9927a95808ef93d7fbd5dd70679fb501
x86/sev: Check for the presence of an SVSM in the SNP secrets page

During early boot phases, check for the presence of an SVSM when running
as an SEV-SNP guest.

An SVSM is present if not running at VMPL0 and the 64-bit value at offset
0x148 into the secrets page is non-zero. If an SVSM is present, save the
SVSM Calling Area address (CAA), located at offset 0x150 into the secrets
page, and set the VMPL level of the guest, which should be non-zero, to
indicate the presence of an SVSM.

  [ bp: Touchups. ]

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/9d3fe161be93d4ea60f43c2a3f2c311fe708b63b.1717600736.git.thomas.lendacky@amd.com
Documentation/arch/x86/amd-memory-encryption.rst
arch/x86/boot/compressed/sev.c
arch/x86/include/asm/sev-common.h
arch/x86/include/asm/sev.h
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c