Skip to contentSkip to conversation

limit mmio messages

PATCH New Ben Guthro 1 participant 1 message Oct 24, 2007

lore
Share & tools
lore

Ben Guthro

author
#0 lore raw

PATCH 1/1 limit mmio messages

Improve/limit the messages for unexpected mmio accesses to the platform device.

tools/ioemu/hw/xen_platform.c +12 -2
diff -r 0acbc89f2486 tools/ioemu/hw/xen_platform.c
@@ -37,14 +37,24 @@ static void platform_ioport_map(PCIDevic
 
 static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
 {
-    fprintf(logfile, "Warning: try read from xen platform mmio space\n");
+    static int warnings = 0;
+    if (warnings < 5) {
+	    fprintf(logfile, "Warning: attempted read from physical address "
+		    "0x%lx in xen platform mmio space\n", addr);
+	    warnings++;
+    }
     return 0;
 }
 
 static void platform_mmio_write(void *opaque, target_phys_addr_t addr,
 			       uint32_t val)
 {
-    fprintf(logfile, "Warning: try write to xen platform mmio space\n");
+    static int warnings = 0;
+    if (warnings < 5) {
+	    fprintf(logfile, "Warning: attempted write of 0x%x to physical "
+		    "address 0x%lx in xen platform mmio space\n", val, addr);
+	    warnings++;
+    }
     return;
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel