WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH][QEMU] limit mmio messages

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][QEMU] limit mmio messages
From: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2007 17:02:01 -0400
Cc: gary Grebus <ggrebus@xxxxxxxxxxxxxxx>
Delivery-date: Wed, 24 Oct 2007 14:20:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
Improve/limit the messages for unexpected mmio accesses to the platform
device.

Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxx>
Signed-off-by: Gary Grebus <ggrebus@xxxxxxxxxxxxxxx>

diff -r 0acbc89f2486 tools/ioemu/hw/xen_platform.c
--- a/tools/ioemu/hw/xen_platform.c     Wed Aug 08 18:15:07 2007 -0400
+++ b/tools/ioemu/hw/xen_platform.c     Wed Aug 08 18:15:07 2007 -0400
@@ -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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][QEMU] limit mmio messages, Ben Guthro <=