From: Jarkko Sakkinen Date: Thu, 28 Jul 2022 05:09:19 +0000 (+0300) Subject: KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6fac42f127b8e8464b8c13036dfed825981881d9;p=linux.git KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog As Virtual Machine Save Area (VMSA) is essential in troubleshooting attestation, dump it to the klog with the KERN_DEBUG level of priority. Cc: Jarkko Sakkinen Suggested-by: Harald Hoyer Signed-off-by: Jarkko Sakkinen Message-Id: <20220728050919.24113-1-jarkko@profian.com> Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 309bcdb2f929e..1b70e6d68113b 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -603,6 +603,9 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm) save->xss = svm->vcpu.arch.ia32_xss; save->dr6 = svm->vcpu.arch.dr6; + pr_debug("Virtual Machine Save Area (VMSA):\n"); + print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, save, sizeof(*save), false); + return 0; }