mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
vfio/listener: Add an assertion for unmap_all
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 <clg@redhat.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20251009040134.334251-4-zhenzhong.duan@intel.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
b30823e561
commit
271fec6f18
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user