[PATCH 0/4] KVM: SEV: Support direct setting of VMSA for SEV-SNP guests
From: Jörg Rödel
Date: Thu Jun 11 2026 - 08:37:20 EST
From: Joerg Roedel <joerg.roedel@xxxxxxx>
Hi,
Here is a set of patches to support the VMM to provide a VMSA directly
to KVM which will then be used by the BSP of the SEV-SNP VM. The
use-case is IGVM loading, where the IGVM file contains a VMSA image
which must be loaded into the initial memory image of the VM as-is to
guarantee the expected launch measurement.
The first patch re-works guest-VMSA handling and streamlines the state
handling to make it more clear and maintainable. That patch accounts
for the biggest part if the changes.
I have tested these changes together with the planes patches and
COCONUT-SVSM and can confirm that the launch measurment is correct
again with these changes.
The changes are based on previous work by Roy Hopkins[1].
Please review.
Thanks,
Joerg
[1] https://github.com/torvalds/linux/commit/e00e081276b2cd9f1400ec5b1a9cd97f8b5c4d58
Joerg Roedel (4):
kvm: svm: Streamline VMSA setting for VCPUs
kvm: svm: Defer VMSA allocation to LAUNCH_FINISH stage
kvm: svm: Support guest-provided VMSA for launching
kvm: svm: Support KVM_SEV_SNP_PAGE_TYPE_VMSA at SNP_LAUNCH_UPDATE
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/svm/sev.c | 419 +++++++++++++++++++++++---------
arch/x86/kvm/svm/svm.h | 32 ++-
arch/x86/kvm/x86.c | 1 +
include/uapi/linux/kvm.h | 1 +
5 files changed, 337 insertions(+), 117 deletions(-)
--
2.53.0