From: Liran Alon <liran.alon@oracle.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Yi Wang <wang.yi59@zte.com.cn>,
rkrcmar@redhat.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn,
up2wing@gmail.com, wang.liang82@zte.com.cn
Subject: Re: [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically
Date: Wed, 3 Jul 2019 19:27:47 +0300 [thread overview]
Message-ID: <076EBA72-1C86-4E9F-8821-2F49645E03CA@oracle.com> (raw)
In-Reply-To: <685680d5-f642-0c48-08f2-8c73026ccaf0@redhat.com>
> On 3 Jul 2019, at 19:23, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 01/07/19 08:21, Yi Wang wrote:
>> There are two *_debug() macros in kvm apic source file:
>> - ioapic_debug, which is disable using #if 0
>> - apic_debug, which is commented
>>
>> Maybe it's better to control these two macros using CONFIG_KVM_DEBUG,
>> which can be set in make menuconfig.
>>
>> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
>> ---
>> arch/x86/kvm/ioapic.c | 2 +-
>> arch/x86/kvm/lapic.c | 5 ++++-
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
>> index 1add1bc..8099253 100644
>> --- a/arch/x86/kvm/ioapic.c
>> +++ b/arch/x86/kvm/ioapic.c
>> @@ -45,7 +45,7 @@
>> #include "lapic.h"
>> #include "irq.h"
>>
>> -#if 0
>> +#ifdef CONFIG_KVM_DEBUG
>> #define ioapic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg)
>> #else
>> #define ioapic_debug(fmt, arg...)
>> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
>> index 4924f83..dfff5c6 100644
>> --- a/arch/x86/kvm/lapic.c
>> +++ b/arch/x86/kvm/lapic.c
>> @@ -54,8 +54,11 @@
>> #define PRIu64 "u"
>> #define PRIo64 "o"
>>
>> -/* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
>> +#ifdef CONFIG_KVM_DEBUG
>> +#define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg)
>> +#else
>> #define apic_debug(fmt, arg...) do {} while (0)
>> +#endif
>>
>> /* 14 is the version for Xeon and Pentium 8.4.8*/
>> #define APIC_VERSION (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16))
>>
>
> I would just drop all of them. I've never used them in years, the kvm
> tracepoints are enough.
>
> Paolo
As someone who have done many LAPIC/IOAPIC debugging, I tend to agree. :)
-Liran
next prev parent reply other threads:[~2019-07-03 16:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 6:21 [PATCH 0/4] kvm: x86: introduce CONFIG_KVM_DEBUG Yi Wang
2019-07-01 6:21 ` [PATCH 1/4] kvm: x86: Add CONFIG_KVM_DEBUG Yi Wang
2019-07-01 6:21 ` [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically Yi Wang
2019-07-03 16:23 ` Paolo Bonzini
2019-07-03 16:27 ` Liran Alon [this message]
2019-07-01 6:21 ` [PATCH 3/4] kvm: x86: replace MMU_DEBUG with CONFIG_KVM_DEBUG Yi Wang
2019-07-01 6:21 ` [PATCH 4/4] kvm: x86: convert TSC pr_debugs to be gated by CONFIG_KVM_DEBUG Yi Wang
2019-07-03 16:25 ` Paolo Bonzini
2019-07-03 16:26 ` [PATCH 0/4] kvm: x86: introduce CONFIG_KVM_DEBUG Paolo Bonzini
[not found] <201907041000221336892@zte.com.cn>
2019-07-04 12:21 ` [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=076EBA72-1C86-4E9F-8821-2F49645E03CA@oracle.com \
--to=liran.alon@oracle.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=up2wing@gmail.com \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=x86@kernel.org \
--cc=xue.zhihong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®