On Thu, Sep 23, 2021 at 04:59:24PM -0600, Alex Williamson wrote: > I think this dropped the call to vfio_update_pgsize_bitmap(), which > would leave iommu->pgsize_bitmap = 0 for a container hosting only mdev > devices, which leads us to undefined behavior when we're using ffs on > it to validate maps, unmaps, dirty bitmap support, etc. Did I miss > this getting moved elsewhere? Thanks, I think you are right, but I'd suggest to add a call in vfio_iommu_type1_open() so that the pgsize_bitmap is never invalid in the first place. Calling vfio_update_pgsize_bitmap() in places that don't change the domain_list is pretty confusing. Jason