From: Keir Fraser Date: Thu, 25 Oct 2007 13:57:08 +0000 (+0100) Subject: hvm: Improve and limit the messages for unexpected mmio accesses to X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14828^2~45 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d3d542204164ea14ac2a118e6b00a8119ce597b2;p=xen.git hvm: Improve and limit the messages for unexpected mmio accesses to the platform device. Signed-off-by: Ben Guthro Signed-off-by: Gary Grebus --- diff --git a/tools/ioemu/hw/xen_platform.c b/tools/ioemu/hw/xen_platform.c index ae7b2a5ff8..9eaf35269c 100644 --- a/tools/ioemu/hw/xen_platform.c +++ b/tools/ioemu/hw/xen_platform.c @@ -36,14 +36,24 @@ static void platform_ioport_map(PCIDevice *pci_dev, int region_num, 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; }