qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps
Date: Wed, 14 Sep 2016 20:50:38 +1000
User-agent: Mutt/1.7.0 (2016-08-17)

On Wed, Sep 14, 2016 at 04:17:26PM +0800, Peter Xu wrote:
> On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote:
> 
> [...]
> 
> > Peter suggested commenting this next to the IOTLBEntry definition, and
> > I think that's probably ok for now.
> 
> Looks like we have something already (just not that obvious):
> 
> /**
>  * memory_region_notify_iommu: notify a change in an IOMMU translation entry.
>  *
>  * @mr: the memory region that was changed
>  * @entry: the new entry in the IOMMU translation table.  The entry
>  *         replaces all old entries for the same virtual I/O address range.
>  *         Deleted entries have address@hidden == 0.
>  */
> void memory_region_notify_iommu(MemoryRegion *mr,
>                                 IOMMUTLBEntry entry);
> 
> Though it's quite simple, it did explain that perm==0 is for deleted
> entries.

That is definitely not sufficient.  It misses the crucial point is
that @perm != 0 is NOT ALLOWED if there was an existing mapping at
that address.

It's not that we really _need_ to support in-place change.  The point
is that we want to keep our interface contracts simple and clear.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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