* 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
* 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
* 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
* [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
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®