diff options
Diffstat (limited to 'hw/misc/vfio.c')
-rw-r--r-- | hw/misc/vfio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 693a9ff..c89676b 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -1953,7 +1953,7 @@ static void vfio_listener_region_add(MemoryListener *listener, } iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); - end = (section->offset_within_address_space + section->size) & + end = (section->offset_within_address_space + int128_get64(section->size)) & TARGET_PAGE_MASK; if (iova >= end) { @@ -1997,7 +1997,7 @@ static void vfio_listener_region_del(MemoryListener *listener, } iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); - end = (section->offset_within_address_space + section->size) & + end = (section->offset_within_address_space + int128_get64(section->size)) & TARGET_PAGE_MASK; if (iova >= end) { |