@@ -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
@@ -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
@@ -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;
@@ -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)
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(-)