* Re: [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically [not found] <201907041000221336892@zte.com.cn> @ 2019-07-04 12:21 ` Paolo Bonzini 0 siblings, 0 replies; 4+ messages in thread From: Paolo Bonzini @ 2019-07-04 12:21 UTC (permalink / raw) To: wang.yi59 Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, xue.zhihong, up2wing, wang.liang82 On 04/07/19 04:00, wang.yi59@zte.com.cn wrote: > Do you mean we can remove ioapic_debug and apic_debug totally? If so, > I would like to send a v2 patch to delete these two macros. :-) > Yes, please. Paolo ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/4] kvm: x86: introduce CONFIG_KVM_DEBUG @ 2019-07-01 6:21 Yi Wang 2019-07-01 6:21 ` [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically Yi Wang 0 siblings, 1 reply; 4+ messages in thread From: Yi Wang @ 2019-07-01 6:21 UTC (permalink / raw) To: pbonzini Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, xue.zhihong, wang.yi59, up2wing, wang.liang82 This series introduce CONFIG_KVM_DEBUG, using which we can make the invoking *_debug in KVM simly and uniform. FYI: the former discussion can been found in: https://www.spinics.net/lists/kvm/msg187026.html Yi Wang (4): kvm: x86: Add CONFIG_KVM_DEBUG kvm: x86: allow set apic and ioapic debug dynamically kvm: x86: replace MMU_DEBUG with CONFIG_KVM_DEBUG kvm: x86: convert TSC pr_debugs to be gated by CONFIG_KVM_DEBUG arch/x86/kvm/Kconfig | 8 ++++++++ arch/x86/kvm/ioapic.c | 2 +- arch/x86/kvm/lapic.c | 5 ++++- arch/x86/kvm/mmu.c | 5 ++--- arch/x86/kvm/x86.c | 18 ++++++++++++------ 5 files changed, 27 insertions(+), 11 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically 2019-07-01 6:21 [PATCH 0/4] kvm: x86: introduce CONFIG_KVM_DEBUG Yi Wang @ 2019-07-01 6:21 ` Yi Wang 2019-07-03 16:23 ` Paolo Bonzini 0 siblings, 1 reply; 4+ messages in thread From: Yi Wang @ 2019-07-01 6:21 UTC (permalink / raw) To: pbonzini Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, xue.zhihong, wang.yi59, up2wing, wang.liang82 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)) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically 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 0 siblings, 1 reply; 4+ messages in thread From: Paolo Bonzini @ 2019-07-03 16:23 UTC (permalink / raw) To: Yi Wang Cc: rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, xue.zhihong, up2wing, wang.liang82 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] kvm: x86: allow set apic and ioapic debug dynamically 2019-07-03 16:23 ` Paolo Bonzini @ 2019-07-03 16:27 ` Liran Alon 0 siblings, 0 replies; 4+ messages in thread From: Liran Alon @ 2019-07-03 16:27 UTC (permalink / raw) To: Paolo Bonzini Cc: Yi Wang, rkrcmar, tglx, mingo, bp, hpa, x86, kvm, linux-kernel, xue.zhihong, up2wing, wang.liang82 > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-04 12:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
2019-07-01 6:21 [PATCH 0/4] kvm: x86: introduce 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 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®