From: AlexChen <alex.chen@huawei.com>
To: <pbonzini@redhat.com>, <chenhc@lemote.com>, <pasic@linux.ibm.com>,
<borntraeger@de.ibm.com>, <mtosatti@redhat.com>,
<cohuck@redhat.com>
Cc: <kvm@vger.kernel.org>, <qemu-devel@nongnu.org>,
<qemu-s390x@nongnu.org>, <zhengchuan@huawei.com>,
<zhang.zhanghailiang@huawei.com>
Subject: [PATCH 2/4] kvm: Replace DEBUG_KVM with CONFIG_DEBUG_KVM
Date: Wed, 28 Oct 2020 15:11:30 +0800 [thread overview]
Message-ID: <5F9919A2.9080205@huawei.com> (raw)
In-Reply-To: <5F991331.4020604@huawei.com>
Now we can control the definition of DPRINTF by CONFIG_DEBUG_KVM,
so let's replace DEBUG_KVM with CONFIG_DEBUG_KVM.
Signed-off-by: AlexChen <alex.chen@huawei.com>
---
accel/kvm/kvm-all.c | 3 +--
target/i386/kvm.c | 4 +---
target/mips/kvm.c | 6 ++++--
target/s390x/kvm.c | 6 +++---
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 9ef5daf4c5..fc6d99a731 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -60,9 +60,8 @@
*/
#define PAGE_SIZE qemu_real_host_page_size
-//#define DEBUG_KVM
-#ifdef DEBUG_KVM
+#ifdef CONFIG_DEBUG_KVM
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index cf46259534..3e9344aed5 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -50,9 +50,7 @@
#include "exec/memattrs.h"
#include "trace.h"
-//#define DEBUG_KVM
-
-#ifdef DEBUG_KVM
+#ifdef CONFIG_DEBUG_KVM
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index 72637a1e02..a0b979e6d2 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -28,10 +28,12 @@
#include "exec/memattrs.h"
#include "hw/boards.h"
-#define DEBUG_KVM 0
+#ifndef CONFIG_DEBUG_KVM
+#define CONFIG_DEBUG_KVM 0
+#endif
#define DPRINTF(fmt, ...) \
- do { if (DEBUG_KVM) { fprintf(stderr, fmt, ## __VA_ARGS__); } } while (0)
+ do { if (CONFIG_DEBUG_KVM) { fprintf(stderr, fmt, ## __VA_ARGS__); } } while (0)
static int kvm_mips_fpu_cap;
static int kvm_mips_msa_cap;
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index f13eff688c..8bc9e1e468 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -52,12 +52,12 @@
#include "hw/s390x/s390-virtio-hcall.h"
#include "hw/s390x/pv.h"
-#ifndef DEBUG_KVM
-#define DEBUG_KVM 0
+#ifndef CONFIG_DEBUG_KVM
+#define CONFIG_DEBUG_KVM 0
#endif
#define DPRINTF(fmt, ...) do { \
- if (DEBUG_KVM) { \
+ if (CONFIG_DEBUG_KVM) { \
fprintf(stderr, fmt, ## __VA_ARGS__); \
} \
} while (0)
--
2.19.1
WARNING: multiple messages have this Message-ID (diff)
From: AlexChen <alex.chen@huawei.com>
To: <pbonzini@redhat.com>, <chenhc@lemote.com>, <pasic@linux.ibm.com>,
<borntraeger@de.ibm.com>, <mtosatti@redhat.com>,
<cohuck@redhat.com>
Cc: zhengchuan@huawei.com, qemu-s390x@nongnu.org,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
zhang.zhanghailiang@huawei.com
Subject: [PATCH 2/4] kvm: Replace DEBUG_KVM with CONFIG_DEBUG_KVM
Date: Wed, 28 Oct 2020 15:11:30 +0800 [thread overview]
Message-ID: <5F9919A2.9080205@huawei.com> (raw)
In-Reply-To: <5F991331.4020604@huawei.com>
Now we can control the definition of DPRINTF by CONFIG_DEBUG_KVM,
so let's replace DEBUG_KVM with CONFIG_DEBUG_KVM.
Signed-off-by: AlexChen <alex.chen@huawei.com>
---
accel/kvm/kvm-all.c | 3 +--
target/i386/kvm.c | 4 +---
target/mips/kvm.c | 6 ++++--
target/s390x/kvm.c | 6 +++---
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 9ef5daf4c5..fc6d99a731 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -60,9 +60,8 @@
*/
#define PAGE_SIZE qemu_real_host_page_size
-//#define DEBUG_KVM
-#ifdef DEBUG_KVM
+#ifdef CONFIG_DEBUG_KVM
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index cf46259534..3e9344aed5 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -50,9 +50,7 @@
#include "exec/memattrs.h"
#include "trace.h"
-//#define DEBUG_KVM
-
-#ifdef DEBUG_KVM
+#ifdef CONFIG_DEBUG_KVM
#define DPRINTF(fmt, ...) \
do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
#else
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index 72637a1e02..a0b979e6d2 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -28,10 +28,12 @@
#include "exec/memattrs.h"
#include "hw/boards.h"
-#define DEBUG_KVM 0
+#ifndef CONFIG_DEBUG_KVM
+#define CONFIG_DEBUG_KVM 0
+#endif
#define DPRINTF(fmt, ...) \
- do { if (DEBUG_KVM) { fprintf(stderr, fmt, ## __VA_ARGS__); } } while (0)
+ do { if (CONFIG_DEBUG_KVM) { fprintf(stderr, fmt, ## __VA_ARGS__); } } while (0)
static int kvm_mips_fpu_cap;
static int kvm_mips_msa_cap;
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index f13eff688c..8bc9e1e468 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -52,12 +52,12 @@
#include "hw/s390x/s390-virtio-hcall.h"
#include "hw/s390x/pv.h"
-#ifndef DEBUG_KVM
-#define DEBUG_KVM 0
+#ifndef CONFIG_DEBUG_KVM
+#define CONFIG_DEBUG_KVM 0
#endif
#define DPRINTF(fmt, ...) do { \
- if (DEBUG_KVM) { \
+ if (CONFIG_DEBUG_KVM) { \
fprintf(stderr, fmt, ## __VA_ARGS__); \
} \
} while (0)
--
2.19.1
next prev parent reply other threads:[~2020-10-28 22:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5F97FD61.4060804@huawei.com>
2020-10-28 7:11 ` [PATCH 0/4] kvm: Add a --enable-debug-kvm option to configure AlexChen
2020-10-28 7:11 ` AlexChen
2020-10-28 7:44 ` Paolo Bonzini
2020-10-28 7:44 ` Paolo Bonzini
2020-10-28 8:20 ` Cornelia Huck
2020-10-28 8:20 ` Cornelia Huck
2020-10-29 6:13 ` AlexChen
2020-10-29 6:13 ` AlexChen
[not found] ` <5F991331.4020604@huawei.com>
2020-10-28 7:11 ` [PATCH 1/4] configure: " AlexChen
2020-10-28 7:11 ` AlexChen
2020-10-28 7:11 ` AlexChen [this message]
2020-10-28 7:11 ` [PATCH 2/4] kvm: Replace DEBUG_KVM with CONFIG_DEBUG_KVM AlexChen
[not found] ` <5F9914EE.8050209@huawei.com>
2020-10-28 7:11 ` [PATCH 3/4] kvm: make printf always compile in debug output AlexChen
2020-10-28 7:11 ` AlexChen
[not found] ` <5F991641.4050606@huawei.com>
2020-10-28 7:11 ` [PATCH 4/4] i386/kvm: " AlexChen
2020-10-28 7:11 ` AlexChen
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=5F9919A2.9080205@huawei.com \
--to=alex.chen@huawei.com \
--cc=borntraeger@de.ibm.com \
--cc=chenhc@lemote.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=zhang.zhanghailiang@huawei.com \
--cc=zhengchuan@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.