• Peter Gonda's avatar
    KVM: SVM: Only dump VMSA to klog at KERN_DEBUG level · 0bd8bd2f
    Peter Gonda authored
    Explicitly print the VMSA dump at KERN_DEBUG log level, KERN_CONT uses
    KERNEL_DEFAULT if the previous log line has a newline, i.e. if there's
    nothing to continuing, and as a result the VMSA gets dumped when it
    shouldn't.
    
    The KERN_CONT documentation says it defaults back to KERNL_DEFAULT if the
    previous log line has a newline. So switch from KERN_CONT to
    print_hex_dump_debug().
    
    Jarkko pointed this out in reference to the original patch. See:
    https://lore.kernel.org/all/YuPMeWX4uuR1Tz3M@kernel.org/
    print_hex_dump(KERN_DEBUG, ...) was pointed out there, but
    print_hex_dump_debug() should similar.
    
    Fixes: 6fac42f1 ("KVM: SVM: Dump Virtual Machine Save Area (VMSA) to klog")
    Signed-off-by: default avatarPeter Gonda <pgonda@google.com>
    Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
    Cc: Jarkko Sakkinen <jarkko@kernel.org>
    Cc: Harald Hoyer <harald@profian.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: x86@kernel.org
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: kvm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Message-Id: <20221104142220.469452-1-pgonda@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    0bd8bd2f
sev.c 76.5 KB