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))) {
> +
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