[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220729122150.601-1-jarkko@profian.com>
Date: Fri, 29 Jul 2022 15:21:50 +0300
From: Jarkko Sakkinen <jarkko@...fian.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Jarkko Sakkinen <jarkko@...fian.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Harald Hoyer <harald@...fian.com>,
Sean Christopherson <seanjc@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
"H. Peter Anvin" <hpa@...or.com>,
kvm@...r.kernel.org (open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)),
linux-kernel@...r.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND
64-BIT))
Subject: [PATCH v2] 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 <jarkko@...nel.org>
Suggested-by: Harald Hoyer <harald@...fian.com>
Signed-off-by: Jarkko Sakkinen <jarkko@...fian.com>
---
arch/x86/kvm/svm/sev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 0c240ed04f96..c91a905436d5 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -603,6 +603,10 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm)
save->xss = svm->vcpu.arch.ia32_xss;
save->dr6 = svm->vcpu.arch.dr6;
+ if (printk_ratelimit()) {
+ print_hex_dump(KERN_DEBUG, "VMSA", DUMP_PREFIX_NONE, 16, 1, save, sizeof(*save), false);
+ }
+
return 0;
}
--
v2:
- Use KERN_DEBUG for print_hex_dump()
- Check for ratelimit.
2.37.1
Powered by blists - more mailing lists