]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SEV: Decouple the need to sync the GHCB SA from the need to free the SA
authorSean Christopherson <seanjc@google.com>
Fri, 29 May 2026 18:35:41 +0000 (20:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Jun 2026 14:43:56 +0000 (16:43 +0200)
commitf041dc80de4abbdd0909d871bf64f3f87d2350ff
tree5a5002e6212bd420e3e0168d53991b8cf8876e2c
parent08385c5e1814edee829ffe475d559ed730354335
KVM: SEV: Decouple the need to sync the GHCB SA from the need to free the SA

Decouple synchronizing the GHCB SA from freeing/unpinning the SA, so that
the free/unpin path can be reused when freeing a vCPU.

Opportunistically add a WARN to harden KVM against stomping over (and thus
leaking) an already-allocated scratch area.

Cc: stable@vger.kernel.org
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20260501202250.2115252-17-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20260529183549.1104619-17-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c