]> Gentwo Git Trees - linux/.git/commit
KVM: SEV: Save the SEV policy if and only if LAUNCH_START succeeds
authorSean Christopherson <seanjc@google.com>
Thu, 21 Aug 2025 21:38:41 +0000 (14:38 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 8 Sep 2025 20:19:41 +0000 (13:19 -0700)
commit2f5f8fb9de095e9b255a89269827f1761c714690
tree92043a145f5a62d613f36e8745f1873f4ec432fc
parenta311fce2b694599cede76c5d7a0905336bc09803
KVM: SEV: Save the SEV policy if and only if LAUNCH_START succeeds

Wait until LAUNCH_START fully succeeds to set a VM's SEV/SNP policy so
that KVM doesn't keep a potentially stale policy.  In practice, the issue
is benign as the policy is only used to detect if the VMSA can be
decrypted, and the VMSA only needs to be decrypted if LAUNCH_UPDATE and
thus LAUNCH_START succeeded.

Fixes: 962e2b6152ef ("KVM: SVM: Decrypt SEV VMSA in dump_vmcb() if debugging is enabled")
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Kim Phillips <kim.phillips@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20250821213841.3462339-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c