[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 2/3] vfio: Fix debug output for int128 values
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-devel] [PATCH v3 2/3] vfio: Fix debug output for int128 values |
Date: |
Thu, 22 Aug 2013 21:29:24 +1000 |
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 <address@hidden>
---
hw/misc/vfio.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 017e693..dfe3a80 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -1928,7 +1928,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;
}
@@ -1973,7 +1974,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;
}
--
1.8.4.rc4
- [Qemu-devel] [PATCH v3 0/3] vfio: fixes for better support for 128 bit memory section sizes, Alexey Kardashevskiy, 2013/08/22
- [Qemu-devel] [PATCH v3 1/3] int128: add int128_exts64(), Alexey Kardashevskiy, 2013/08/22
- [Qemu-devel] [PATCH v3 2/3] vfio: Fix debug output for int128 values,
Alexey Kardashevskiy <=
- [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alexey Kardashevskiy, 2013/08/22
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alex Williamson, 2013/08/28
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alexey Kardashevskiy, 2013/08/28
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alex Williamson, 2013/08/28
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alexey Kardashevskiy, 2013/08/28
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Paolo Bonzini, 2013/08/29
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alexey Kardashevskiy, 2013/08/29
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Paolo Bonzini, 2013/08/29
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Alexey Kardashevskiy, 2013/08/30
- Re: [Qemu-devel] [PATCH v3 3/3] vfio: Fix 128 bit handling, Paolo Bonzini, 2013/08/30