From: Zhenzhong Duan <[email protected]> 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]> Reviewed-by: Cédric Le Goater <[email protected]> Link: https://lore.kernel.org/qemu-devel/[email protected] Signed-off-by: Cédric Le Goater <[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 1b6e5065a3267ab08d2d3fea3c5b4965a80947e8..2d7d3a464577ee258fac869e508e1b79aef2b53e 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.51.0
