summary refs log tree commit diff stats
path: root/hw
diff options
context:
space:
mode:
authorAleksandar Markovic <aleksandar.qemu.devel@gmail.com>2020-05-18 22:09:19 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-05-26 13:21:12 +0200
commitc707f06fb1d9b09e5d442e72f6f3dcd021671a90 (patch)
treec0c1725ad234aab8f21c3de733c10a415e01898c /hw
parent5298722edad2d40baac9c2326c6d492ad2b0211a (diff)
downloadfocaccia-qemu-c707f06fb1d9b09e5d442e72f6f3dcd021671a90.tar.gz
focaccia-qemu-c707f06fb1d9b09e5d442e72f6f3dcd021671a90.zip
hw/mips/malta: Add some logging for bad register offset cases
Log the cases where a guest attempts read or write using bad
register offset.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Message-id: <20200518200920.17344-21-aleksandar.qemu.devel@gmail.com>
[PMD: Replaced TARGET_FMT_lx by HWADDR_PRIX]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/mips/malta.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index e4c4de1b4e..b673a3a248 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -427,10 +427,9 @@ static uint64_t malta_fpga_read(void *opaque, hwaddr addr,
         break;
 
     default:
-#if 0
-        printf("malta_fpga_read: Bad register offset 0x" TARGET_FMT_lx "\n",
-               addr);
-#endif
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "malta_fpga_read: Bad register addr 0x%"HWADDR_PRIX"\n",
+                      addr);
         break;
     }
     return val;
@@ -515,10 +514,9 @@ static void malta_fpga_write(void *opaque, hwaddr addr,
         break;
 
     default:
-#if 0
-        printf("malta_fpga_write: Bad register offset 0x" TARGET_FMT_lx "\n",
-               addr);
-#endif
+        qemu_log_mask(LOG_GUEST_ERROR,
+                      "malta_fpga_write: Bad register addr 0x%"HWADDR_PRIX"\n",
+                      addr);
         break;
     }
 }