Re: [Qemu-devel] [PATCH v3 09/12] intel-iommu: maintain per-device iova ranges

2018-05-17 Thread Peter Xu
On Thu, May 17, 2018 at 04:59:24PM +0800, Peter Xu wrote: [...] > +/* Update local IOVA mapped ranges */ > +if (entry->perm) { > +if (mapped) { > +/* If it's exactly the same translation, skip */ > +if (!memcmp(mapped, , sizeof(target))) { > +

[Qemu-devel] [PATCH v3 09/12] intel-iommu: maintain per-device iova ranges

2018-05-17 Thread Peter Xu
For each VTDAddressSpace, now we maintain what IOVA ranges we have mapped and what we have not. With that information, now we only send MAP or UNMAP when necessary. Say, we don't send MAP notifies if we know we have already mapped the range, meanwhile we don't send UNMAP notifies if we know we