[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 1/9] memory: add section range info for IOMMU
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v8 1/9] memory: add section range info for IOMMU notifier |
Date: |
Thu, 6 Apr 2017 18:52:55 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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 <address@hidden>
> > Signed-off-by: Peter Xu <address@hidden>
> Looks good to me.
> Reviewed-by: Eric Auger <address@hidden>
Thanks!
-- peterx