On Fri, Sep 02, 2016 at 02:15:04PM +1000, David Gibson wrote: > What!? I see no reason you need a different notifier, just fix the > implementation of the current one. As a bonus this will also give you > working VFIO passthrough with vIOMMU on x86, something which should > work already, but doesn't.
Hi, David, Do you mean that we can enhance the interface to suite the two needs? E.g., adding a "IOTLB notification type" definition: - "full": for those who is listening on all mapping changes including additions (VFIO use case) - "cache_only": for those who only cares about cache invalidations (device IOTLB, aka, vhost use case) We can: - add notify type when we register the notifiers (e.g., when VFIO registers IOMMU notifier, it should specify the type as "full", so it won't receive notification if it's device IOTLB invalidations). - pass this type when trigger the notification, so for each IOMMU notify handler, it can selectively disgard the notification. Not sure whether above makes sense. -- peterx