]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/misc/vfio.c
memory: make section size a 128-bit integer
[mirror_qemu.git] / hw / misc / vfio.c
index 693a9ffddafbba85b0b6788b21afcd483a890c20..c89676b3ffd68867c681e37219b0be8d82f18bbf 100644 (file)
@@ -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) {