aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2013-10-03 09:10:09 -0600
committerAlex Williamson <alex.williamson@redhat.com>2013-10-03 09:10:09 -0600
commit1d5bf692e55ae22b59083741d521e27db704846d (patch)
tree9e0d2ed9ea3f63dacee832973b7aca99f6e00387 /hw/misc
parentf16f39c3fc973c5d7cbc2224eefb4ef5eb1e64ff (diff)
downloadqemu-1d5bf692e55ae22b59083741d521e27db704846d.zip
qemu-1d5bf692e55ae22b59083741d521e27db704846d.tar.gz
qemu-1d5bf692e55ae22b59083741d521e27db704846d.tar.bz2
vfio: Fix debug output for int128 values
Memory regions can easily be 2^64 byte long and therefore overflow for just a bit but that is enough for int128_get64() to assert. This takes care of debug printing of huge section sizes. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/vfio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 0c9bb95..68e25bd 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -2084,7 +2084,8 @@ static void vfio_listener_region_add(MemoryListener *listener,
if (vfio_listener_skipped_section(section)) {
DPRINTF("SKIPPING region_add %"HWADDR_PRIx" - %"PRIx64"\n",
section->offset_within_address_space,
- section->offset_within_address_space + section->size - 1);
+ section->offset_within_address_space +
+ int128_get64(int128_sub(section->size, int128_one())));
return;
}
@@ -2129,7 +2130,8 @@ static void vfio_listener_region_del(MemoryListener *listener,
if (vfio_listener_skipped_section(section)) {
DPRINTF("SKIPPING region_del %"HWADDR_PRIx" - %"PRIx64"\n",
section->offset_within_address_space,
- section->offset_within_address_space + section->size - 1);
+ section->offset_within_address_space +
+ int128_get64(int128_sub(section->size, int128_one())));
return;
}