]> www.infradead.org Git - users/willy/xarray.git/commit
KVM: SVM: Invalidate "next" SNP VMSA GPA even on failure
authorSean Christopherson <seanjc@google.com>
Thu, 27 Feb 2025 01:25:41 +0000 (17:25 -0800)
committerSean Christopherson <seanjc@google.com>
Mon, 3 Mar 2025 15:34:56 +0000 (07:34 -0800)
commit4e96f010afb2815e33c9b15a695e0e0b4cb3cea6
tree69ff599c324a514369698df6cc0ab9306daa65bd
parent5279d6f7e43d9c5863411482943200bf5ab8a261
KVM: SVM: Invalidate "next" SNP VMSA GPA even on failure

When processing an SNP AP Creation event, invalidate the "next" VMSA GPA
even if acquiring the page/pfn for the new VMSA fails.  In practice, the
next GPA will never be used regardless of whether or not its invalidated,
as the entire flow is guarded by snp_ap_waiting_for_reset, and said guard
and snp_vmsa_gpa are always written as a pair.  But that's really hard to
see in the code.

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20250227012541.3234589-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c