On Thu, Apr 06, 2017 at 12:42:54PM +0200, Auger Eric wrote: > Hi Peter, > On 06/04/2017 09:08, Peter Xu wrote: > > In this patch, IOMMUNotifier.{start|end} are introduced to store section > > information for a specific notifier. When notification occurs, we not > > only check the notification type (MAP|UNMAP), but also check whether the > > notified iova range overlaps with the range of specific IOMMU notifier, > > and skip those notifiers if not in the listened range. > > > > When removing an region, we need to make sure we removed the correct > > VFIOGuestIOMMU by checking the IOMMUNotifier.start address as well. > > > > This patch is solving the problem that vfio-pci devices receive > > duplicated UNMAP notification on x86 platform when vIOMMU is there. The > > issue is that x86 IOMMU has a (0, 2^64-1) IOMMU region, which is > > splitted by the (0xfee00000, 0xfeefffff) IRQ region. AFAIK > > this (splitted IOMMU region) is only happening on x86. > I think this is likely to happen on other architectures too as "reserved > regions" are now exported to the user space.
Good to know this. > > > > This patch also helps vhost to leverage the new interface as well, so > > that vhost won't get duplicated cache flushes. In that sense, it's an > > slight performance improvement. > > > > Suggested-by: David Gibson <da...@gibson.dropbear.id.au> > > Signed-off-by: Peter Xu <pet...@redhat.com> > Looks good to me. > Reviewed-by: Eric Auger <eric.au...@redhat.com> Thanks! -- peterx