qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] memory: add section range info for IOMMU notifi


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH] memory: add section range info for IOMMU notifier
Date: Thu, 24 Nov 2016 20:42:51 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Nov 24, 2016 at 03:04:35PM +1100, David Gibson wrote:

[...]

> > diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> > index 801578b..c3db115 100644
> > --- a/hw/vfio/common.c
> > +++ b/hw/vfio/common.c
> > @@ -455,6 +455,10 @@ static void vfio_listener_region_add(MemoryListener 
> > *listener,
> >          giommu->container = container;
> >          giommu->n.notify = vfio_iommu_map_notify;
> >          giommu->n.notifier_flags = IOMMU_NOTIFIER_ALL;
> > +        giommu->n.start = section->offset_within_address_space;
> 
> I think this needs to be offset_within_region rather than
> offset_within_address_space.  The IOVAs used in the IOMMUTLBEntry are
> relative to the MR, not the enclosing AS (in fact there could be
> several enclosing ASes with the right aliasing).  See for example
> put_tce_emu() - the (ioba - tcet->bus_offset) expression is
> effectively converting the AS relative ioba into an MR relative
> address.

Thanks for the pointer. Will fix (and the other place).

-- peterx



reply via email to

[Prev in Thread] Current Thread [Next in Thread]