From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC4is-0001rh-Di for qemu-devel@nongnu.org; Wed, 21 Aug 2013 05:29:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VC4il-00007p-Vl for qemu-devel@nongnu.org; Wed, 21 Aug 2013 05:29:02 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:51232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC4il-00007b-PY for qemu-devel@nongnu.org; Wed, 21 Aug 2013 05:28:55 -0400 Received: by mail-pa0-f52.google.com with SMTP id kq13so617025pab.39 for ; Wed, 21 Aug 2013 02:28:55 -0700 (PDT) From: Alexey Kardashevskiy Date: Wed, 21 Aug 2013 19:28:37 +1000 Message-Id: <1377077318-12966-2-git-send-email-aik@ozlabs.ru> In-Reply-To: <1377077318-12966-1-git-send-email-aik@ozlabs.ru> References: <1377077318-12966-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH 1/2] vfio: Fix debug output for int128 values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Paolo Bonzini , Alex Williamson , Alexander Graf 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 --- 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 adcd23d..e917f03 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