Commit c5961f6
KVM: SVM: Don't change target vCPU state on AP Creation VMGEXIT error
commit d26638b upstream.
If KVM rejects an AP Creation event, leave the target vCPU state as-is.
Nothing in the GHCB suggests the hypervisor is *allowed* to muck with vCPU
state on failure, let alone required to do so. Furthermore, kicking only
in the !ON_INIT case leads to divergent behavior, and even the "kick" case
is non-deterministic.
E.g. if an ON_INIT request fails, the guest can successfully retry if the
fixed AP Creation request is made prior to sending INIT. And if a !ON_INIT
fails, the guest can successfully retry if the fixed AP Creation request is
handled before the target vCPU processes KVM's
KVM_REQ_UPDATE_PROTECTED_GUEST_STATE.
Fixes: e366f92 ("KVM: SEV: Support SEV-SNP AP Creation NAE event")
Cc: stable@vger.kernel.org
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Link: https://lore.kernel.org/r/20250227012541.3234589-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8bc4675 commit c5961f6
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3969 | 3969 | | |
3970 | 3970 | | |
3971 | 3971 | | |
3972 | | - | |
3973 | | - | |
| 3972 | + | |
3974 | 3973 | | |
3975 | 3974 | | |
3976 | 3975 | | |
3977 | 3976 | | |
3978 | 3977 | | |
3979 | | - | |
3980 | | - | |
3981 | | - | |
3982 | 3978 | | |
3983 | 3979 | | |
3984 | 3980 | | |
| |||
4024 | 4020 | | |
4025 | 4021 | | |
4026 | 4022 | | |
| 4023 | + | |
4027 | 4024 | | |
4028 | 4025 | | |
4029 | 4026 | | |
4030 | 4027 | | |
4031 | 4028 | | |
4032 | | - | |
| 4029 | + | |
4033 | 4030 | | |
4034 | 4031 | | |
4035 | | - | |
| 4032 | + | |
| 4033 | + | |
4036 | 4034 | | |
4037 | 4035 | | |
4038 | 4036 | | |
4039 | 4037 | | |
4040 | 4038 | | |
| 4039 | + | |
4041 | 4040 | | |
4042 | 4041 | | |
4043 | 4042 | | |
| |||
0 commit comments