KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog
authorJarkko Sakkinen <jarkko@profian.com>
Thu, 28 Jul 2022 05:09:19 +0000 (08:09 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Jul 2022 18:02:06 +0000 (14:02 -0400)
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 <jarkko@kernel.org>
Suggested-by: Harald Hoyer <harald@profian.com>
Signed-off-by: Jarkko Sakkinen <jarkko@profian.com>
Message-Id: <20220728050919.24113-1-jarkko@profian.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c

index 309bcdb2f929e684c3deba0808229cf4c6964d5d..1b70e6d68113b46a93decb4129ee28ecbcb1a9f4 100644 (file)
@@ -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;
 }