Commit 2f5f8fb
committed
KVM: SEV: Save the SEV policy if and only if LAUNCH_START succeeds
Wait until LAUNCH_START fully succeeds to set a VM's SEV/SNP policy so
that KVM doesn't keep a potentially stale policy. In practice, the issue
is benign as the policy is only used to detect if the VMSA can be
decrypted, and the VMSA only needs to be decrypted if LAUNCH_UPDATE and
thus LAUNCH_START succeeded.
Fixes: 962e2b6 ("KVM: SVM: Decrypt SEV VMSA in dump_vmcb() if debugging is enabled")
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Kim Phillips <kim.phillips@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20250821213841.3462339-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent a311fce commit 2f5f8fb
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
587 | | - | |
588 | 586 | | |
589 | 587 | | |
590 | 588 | | |
| |||
632 | 630 | | |
633 | 631 | | |
634 | 632 | | |
| 633 | + | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
2205 | 2204 | | |
2206 | 2205 | | |
2207 | 2206 | | |
2208 | | - | |
2209 | | - | |
2210 | 2207 | | |
2211 | 2208 | | |
2212 | 2209 | | |
| |||
2222 | 2219 | | |
2223 | 2220 | | |
2224 | 2221 | | |
| 2222 | + | |
2225 | 2223 | | |
2226 | 2224 | | |
2227 | 2225 | | |
| |||
0 commit comments