Currently the maximum of iommu address space is 64bit. So when a maximum iommu memory section is deleted, it's in scope [0, 2^64). Add a assertion for that.
Suggested-by: Cédric Le Goater <[email protected]> Signed-off-by: Zhenzhong Duan <[email protected]> --- hw/vfio/listener.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c index c6bb58f520..62766d8c46 100644 --- a/hw/vfio/listener.c +++ b/hw/vfio/listener.c @@ -715,6 +715,7 @@ static void vfio_listener_region_del(MemoryListener *listener, bool unmap_all = false; if (int128_eq(llsize, int128_2_64())) { + assert(!iova); unmap_all = true; llsize = int128_zero(); } -- 2.47.1
