KVM: SEV: set SNP AP as runnable on VPML run request#19
Open
00xc wants to merge 1 commit intococonut-svsm:svsm-planes-v6.17from
Open
KVM: SEV: set SNP AP as runnable on VPML run request#1900xc wants to merge 1 commit intococonut-svsm:svsm-planes-v6.17from
00xc wants to merge 1 commit intococonut-svsm:svsm-planes-v6.17from
Conversation
Set snp_ap_runnable to 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 pending KVM_REQ_UPDATE_PROTECTED_GUEST_STATE request. This request will be honored by vcpu_enter_guest(), resetting the vCPU, and setting its mp_state in sev_snp_init_protected_guest_state() to KVM_MP_STATE_UNINITIALIZED, unless snp_ap_runnable is 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") Signed-off-by: Carlos López <clopez@suse.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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")