* [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog @ 2022-07-28 5:09 Jarkko Sakkinen 2022-07-28 15:15 ` Paolo Bonzini 0 siblings, 1 reply; 3+ messages in thread From: Jarkko Sakkinen @ 2022-07-28 5:09 UTC (permalink / raw) To: Paolo Bonzini Cc: Jarkko Sakkinen, Jarkko Sakkinen, Harald Hoyer, Sean Christopherson, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H. Peter Anvin, open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86), open list:X86 ARCHITECTURE (32-BIT AND 64-BIT) 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> --- arch/x86/kvm/svm/sev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 0c240ed04f96..6d44aaba321a 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; } -- 2.37.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog 2022-07-28 5:09 [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog Jarkko Sakkinen @ 2022-07-28 15:15 ` Paolo Bonzini 2022-07-29 12:03 ` Jarkko Sakkinen 0 siblings, 1 reply; 3+ messages in thread From: Paolo Bonzini @ 2022-07-28 15:15 UTC (permalink / raw) To: Jarkko Sakkinen Cc: Jarkko Sakkinen, Harald Hoyer, Sean Christopherson, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H. Peter Anvin, open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86), open list:X86 ARCHITECTURE (32-BIT AND 64-BIT) On 7/28/22 07:09, Jarkko Sakkinen wrote: > 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> > --- > arch/x86/kvm/svm/sev.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c > index 0c240ed04f96..6d44aaba321a 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; > } > Queued, thanks. Paolo ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog 2022-07-28 15:15 ` Paolo Bonzini @ 2022-07-29 12:03 ` Jarkko Sakkinen 0 siblings, 0 replies; 3+ messages in thread From: Jarkko Sakkinen @ 2022-07-29 12:03 UTC (permalink / raw) To: Paolo Bonzini Cc: Jarkko Sakkinen, Harald Hoyer, Sean Christopherson, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H. Peter Anvin, open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86), open list:X86 ARCHITECTURE (32-BIT AND 64-BIT) On Thu, Jul 28, 2022 at 05:15:43PM +0200, Paolo Bonzini wrote: > On 7/28/22 07:09, Jarkko Sakkinen wrote: > > 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> > > --- > > arch/x86/kvm/svm/sev.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c > > index 0c240ed04f96..6d44aaba321a 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; > > } > > Queued, thanks. > > Paolo Ugh, I made a mistake, sorry. It should have been: print_hex_dump(KERN_DEBUG, "VMSA:", DUMP_PREFIX_NONE, 16, 1, save, sizeof(*save), false); I sent wrong version of the patch. BR, Jarkko ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-29 12:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-28 5:09 [PATCH] KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog Jarkko Sakkinen 2022-07-28 15:15 ` Paolo Bonzini 2022-07-29 12:03 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox