]> Git Repo - qemu.git/commitdiff
vfio: Fix debug output for int128 values
authorAlexey Kardashevskiy <[email protected]>
Thu, 3 Oct 2013 15:10:09 +0000 (09:10 -0600)
committerAlex Williamson <[email protected]>
Thu, 3 Oct 2013 15:10:09 +0000 (09:10 -0600)
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 <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
hw/misc/vfio.c

index 0c9bb95815750ebbff96b752d66a3724ba2153ac..68e25bd8c3d9bbb95be47f8f35821aab1105e2d0 100644 (file)
@@ -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;
     }
 
This page took 0.033993 seconds and 4 git commands to generate.