]> git.hungrycats.org Git - linux/commit
KVM: SEV: Mark vCPU RUNNABLE after AP_CREATE, even if VMSA is unusable
authorSean Christopherson <seanjc@google.com>
Thu, 9 Jul 2026 20:49:33 +0000 (13:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Sep 2026 12:31:48 +0000 (14:31 +0200)
commit9a45e7b0b140a8ea1ea2333130f07de285ace3fd
tree0eb266f64468bf857e1f6e69fd9486cac4852b10
parenta3d45c2d645c6701e322ce7bb351b917d4436d9b
KVM: SEV: Mark vCPU RUNNABLE after AP_CREATE, even if VMSA is unusable

commit 98ade8c48c28c227fe2e80e545ff0c57cd4712a3 upstream.

Always mark the vCPU as RUNNABLE after responding to AP_CREATE, even if the
guest-specified VMSA is unusable, e.g. isn't backed by a memslot or doesn't
have a backing guest_memfd page.  If the VMSA is unusable, leaving the vCPU
in a non-running state will effectively hang the vCPU instead of reporting
an error to userspace.  This will also allow retrying the VMSA load in the
future, to fix a bug where KVM doesn't honor guest_memfd invalidation
events, e.g. if AP_CREATION races with PUNCH_HOLE.

Cc: stable@vger.kernel.org # 6.12.x
Reviewed-by: Michael Roth <michael.roth@amd.com>
Link: https://patch.msgid.link/20260709204948.1988414-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm/sev.c