Re: [PATCH v3 2/4] x86/kvm: Change print code to use pr_*() format

From: Zhenzhong Duan
Date: Thu Oct 03 2019 - 06:34:00 EST


On 2019/10/3 1:15, Sean Christopherson wrote:

On Mon, Sep 30, 2019 at 08:44:37PM +0800, Zhenzhong Duan wrote:
pr_*() is preferred than printk(KERN_* ...), after change all the print
in arch/x86/kernel/kvm.c will have "KVM: xxx" style.

No functional change.

Suggested-by: Vitaly Kuznetsov<vkuznets@xxxxxxxxxx>
This wasn't really suggested by Vitaly, he just requested it be done in a
separate patch.

Will fix.


Signed-off-by: Zhenzhong Duan<zhenzhong.duan@xxxxxxxxxx>
Cc: Paolo Bonzini<pbonzini@xxxxxxxxxx>
Cc: Radim Krcmar<rkrcmar@xxxxxxxxxx>
Cc: Sean Christopherson<sean.j.christopherson@xxxxxxxxx>
Cc: Vitaly Kuznetsov<vkuznets@xxxxxxxxxx>
Cc: Wanpeng Li<wanpengli@xxxxxxxxxxx>
Cc: Jim Mattson<jmattson@xxxxxxxxxx>
Cc: Joerg Roedel<joro@xxxxxxxxxx>
Cc: Thomas Gleixner<tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar<mingo@xxxxxxxxxx>
Cc: Borislav Petkov<bp@xxxxxxxxx>
Cc: "H. Peter Anvin"<hpa@xxxxxxxxx>
---
arch/x86/kernel/kvm.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index a4f108d..ce4f578 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -7,6 +7,8 @@
* Authors: Anthony Liguori<aliguori@xxxxxxxxxx>
*/
+#define pr_fmt(fmt) "KVM: " fmt
Not a fan of "KVM" as the prefix as it's easily confused with KVM the
hypervisor. Maybe "kvm_guest"?

Yeah, looks better, will change to"kvm_guest". Thanks

Zhenzhong