From 924d4599cc3cb5247e1a274b52681884d13aaab3 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Fri, 16 Feb 2018 15:58:01 -0500 Subject: [PATCH] qemu-log: add log category for MMU info Running barebox on qemu-system-mips* with '-d unimp' overloads stderr by very very many mips_cpu_handle_mmu_fault() messages: mips_cpu_handle_mmu_fault address=b80003fd ret 0 physical 00000000180003fd prot 3 mips_cpu_handle_mmu_fault address=a0800884 ret 0 physical 0000000000800884 prot 3 mips_cpu_handle_mmu_fault pc a080cd80 ad b80003fd rw 0 mmu_idx 0 So it's very difficult to find LOG_UNIMP message. The mips_cpu_handle_mmu_fault() messages appear on enabling ANY logging! It's not very handy. Adding separate log category for *_cpu_handle_mmu_fault() logging fixes the problem. Backports commit 339aaf5b7f26d1e638641c59a44883b7654bd8ea from qemu --- qemu/include/qemu/log.h | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/include/qemu/log.h b/qemu/include/qemu/log.h index 34e35b2d..22700eab 100644 --- a/qemu/include/qemu/log.h +++ b/qemu/include/qemu/log.h @@ -36,6 +36,7 @@ static inline bool qemu_log_enabled(void) #define CPU_LOG_RESET (1 << 9) #define LOG_UNIMP (1 << 10) #define LOG_GUEST_ERROR (1 << 11) +#define CPU_LOG_MMU (1 << 12) #define CPU_LOG_TB_NOCHAIN (1 << 13) /* Returns true if a bit is set in the current loglevel mask