Skip to content

Commit c7586aa

Browse files
jallen-amdsean-jc
authored andcommitted
KVM: SVM: Update dump_vmcb with shadow stack save area additions
Add shadow stack VMCB fields to dump_vmcb. PL0_SSP, PL1_SSP, PL2_SSP, PL3_SSP, and U_CET are part of the SEV-ES save area and are encrypted, but can be decrypted and dumped if the guest policy allows debugging. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: John Allen <john.allen@amd.com> Link: https://lore.kernel.org/r/20250919223258.1604852-38-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent c5ba494 commit c7586aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3410,6 +3410,10 @@ static void dump_vmcb(struct kvm_vcpu *vcpu)
34103410
"rip:", save->rip, "rflags:", save->rflags);
34113411
pr_err("%-15s %016llx %-13s %016llx\n",
34123412
"rsp:", save->rsp, "rax:", save->rax);
3413+
pr_err("%-15s %016llx %-13s %016llx\n",
3414+
"s_cet:", save->s_cet, "ssp:", save->ssp);
3415+
pr_err("%-15s %016llx\n",
3416+
"isst_addr:", save->isst_addr);
34133417
pr_err("%-15s %016llx %-13s %016llx\n",
34143418
"star:", save01->star, "lstar:", save01->lstar);
34153419
pr_err("%-15s %016llx %-13s %016llx\n",
@@ -3434,6 +3438,13 @@ static void dump_vmcb(struct kvm_vcpu *vcpu)
34343438
pr_err("%-15s %016llx\n",
34353439
"sev_features", vmsa->sev_features);
34363440

3441+
pr_err("%-15s %016llx %-13s %016llx\n",
3442+
"pl0_ssp:", vmsa->pl0_ssp, "pl1_ssp:", vmsa->pl1_ssp);
3443+
pr_err("%-15s %016llx %-13s %016llx\n",
3444+
"pl2_ssp:", vmsa->pl2_ssp, "pl3_ssp:", vmsa->pl3_ssp);
3445+
pr_err("%-15s %016llx\n",
3446+
"u_cet:", vmsa->u_cet);
3447+
34373448
pr_err("%-15s %016llx %-13s %016llx\n",
34383449
"rax:", vmsa->rax, "rbx:", vmsa->rbx);
34393450
pr_err("%-15s %016llx %-13s %016llx\n",

0 commit comments

Comments
 (0)