aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-10-13 14:06:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-10-13 14:06:22 +0100
commit96292515c07e3a99f5a29540ed2f257b1ff75111 (patch)
tree714354892129c34757d7d8792537fba5a43af6b3 /softmmu
parentb37da837630ca7cdbc45de4c5339bbfc6d21beed (diff)
parent6125673eaf711247405e796604204bb7d74090f4 (diff)
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging
Trivial Patches Pull request 20201013 # gpg: Signature made Tue 13 Oct 2020 12:49:59 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-for-5.2-pull-request: meson.build: drop duplicate 'sparc64' entry mingw: fix error __USE_MINGW_ANSI_STDIO redefined target/sparc/int32_helper: Remove duplicated 'Tag Overflow' entry goldfish_rtc: change MemoryRegionOps endianness to DEVICE_NATIVE_ENDIAN hw/char/serial: remove duplicate .class_init in serial_mm_info block/blkdebug: fix memory leak hw/pci: Fix typo in PCI hot-plug error message softmmu/memory: Log invalid memory accesses hw/acpi/piix4: Rename piix4_pm_add_propeties() to piix4_pm_add_properties() vmdk: fix maybe uninitialized warnings tests/test-char: Use a proper fallthrough comment hw/block/nvme: Simplify timestamp sum target/i386/cpu: Update comment that mentions Texinfo qemu-img-cmds.hx: Update comment that mentions Texinfo Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/memory.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/softmmu/memory.c b/softmmu/memory.c
index fa280a19f7..403ff3abc9 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/log.h"
#include "qapi/error.h"
#include "cpu.h"
#include "exec/memory.h"
@@ -1353,10 +1354,18 @@ bool memory_region_access_valid(MemoryRegion *mr,
{
if (mr->ops->valid.accepts
&& !mr->ops->valid.accepts(mr->opaque, addr, size, is_write, attrs)) {
+ qemu_log_mask(LOG_GUEST_ERROR, "Invalid access at addr "
+ "0x%" HWADDR_PRIX ", size %u, "
+ "region '%s', reason: rejected\n",
+ addr, size, memory_region_name(mr));
return false;
}
if (!mr->ops->valid.unaligned && (addr & (size - 1))) {
+ qemu_log_mask(LOG_GUEST_ERROR, "Invalid access at addr "
+ "0x%" HWADDR_PRIX ", size %u, "
+ "region '%s', reason: unaligned\n",
+ addr, size, memory_region_name(mr));
return false;
}
@@ -1367,6 +1376,13 @@ bool memory_region_access_valid(MemoryRegion *mr,
if (size > mr->ops->valid.max_access_size
|| size < mr->ops->valid.min_access_size) {
+ qemu_log_mask(LOG_GUEST_ERROR, "Invalid access at addr "
+ "0x%" HWADDR_PRIX ", size %u, "
+ "region '%s', reason: invalid size "
+ "(min:%u max:%u)\n",
+ addr, size, memory_region_name(mr),
+ mr->ops->valid.min_access_size,
+ mr->ops->valid.max_access_size);
return false;
}
return true;