From: Marc Marí <5.markm...@gmail.com> Modify debug macros as explained in https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03642.html
Signed-off-by: Marc Marí <5.markm...@gmail.com> --- target-i386/kvm.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 4389959..9d511ff 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -34,16 +34,19 @@ #include <asm/hyperv.h> #include "hw/pci/pci.h" -//#define DEBUG_KVM +//#define DEBUG_KVM 1 -#ifdef DEBUG_KVM -#define DPRINTF(fmt, ...) \ - do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) \ - do { } while (0) +#ifndef DEBUG_KVM +#define DEBUG_KVM 0 #endif +#define DPRINTF(fmt, ...) \ + do { \ + if(DEBUG_KVM) { \ + fprintf(stderr, fmt, ## __VA_ARGS__); \ + } \ + } while (0) + #define MSR_KVM_WALL_CLOCK 0x11 #define MSR_KVM_SYSTEM_TIME 0x12 -- 1.7.10.4