On Mon, Nov 14, 2016 at 07:59:28PM -0500, Peter Xu wrote: > When one IOMMU memory region is splitted into multiple memory sections, > vfio will register multiple same notifiers to a vIOMMU for the same > region. That's not sensible. What we need is to register one IOMMU > notifier for each IOMMU region, not per section. > > Solution is simple - we traverse the container->giommu_list, and skip > the registration if memory region is already registered. > > To make vfio's region_add() short, vfio_listener_region_add_iommu() is > introduced. > > Signed-off-by: Peter Xu <[email protected]>
This patch will solve Aviv's issue that vfio_map_notify() will dump many error messages when device assignments are enabled with Intel vIOMMU. Alex, could you help verify whether this is the one that you suggested? I'd be glad to add your suggestted-by if you won't disagree. Thanks, -- peterx
