KVM: SEV: set SNP AP as runnable on VPML run request #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set
snp_ap_runnableto true on a VMPL run request. This is needed because the destination vCPU may not have been run before, meaning that it will have a pendingKVM_REQ_UPDATE_PROTECTED_GUEST_STATErequest. This request will be honored byvcpu_enter_guest(), resetting the vCPU, and setting itsmp_stateinsev_snp_init_protected_guest_state()toKVM_MP_STATE_UNINITIALIZED, unlesssnp_ap_runnableis set to true.This results in the vCPU being infinitely stuck in the main loop in
vcpu_run(), as KVM will wait until an external signal sets the vCPU to a runnable state.Fixes: 4534503 ("kvm/amd: Treat SEV_SNP_RUN_VMPL as INIT-SIPI")