Received: from eggs.gnu.org ([2001:4830:134:3::10]:42638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgotc-0005jM-KA for qemu-devel@nongnu.org; Mon, 05 Sep 2016 04:04:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgotY-0006n7-8f for qemu-devel@nongnu.org; Mon, 05 Sep 2016 04:04:47 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgotY-0006n0-1y for qemu-devel@nongnu.org; Mon, 05 Sep 2016 04:04:44 -0400 Received: by mail-wm0-x22b.google.com with SMTP id w12so26202226wmf.0 for ; Mon, 05 Sep 2016 01:04:43 -0700 (PDT) Sender: Paolo Bonzini References: <1473060081-17835-1-git-send-email-peterx@redhat.com> <1473060081-17835-3-git-send-email-peterx@redhat.com> From: Paolo Bonzini Message-ID: <2112298c-fe2a-c74f-7a68-a92625cd3533@redhat.com> Date: Mon, 5 Sep 2016 10:04:42 +0200 MIME-Version: 1.0 In-Reply-To: <1473060081-17835-3-git-send-email-peterx@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu , qemu-devel@nongnu.org Cc: mst@redhat.com, jasowang@redhat.com, vkaplans@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, cornelia.huck@de.ibm.com, dgibson@redhat.com On 05/09/2016 09:21, Peter Xu wrote: > void memory_region_notify_iommu(MemoryRegion *mr, > - IOMMUTLBEntry entry) > + IOMMUTLBEntry entry, IOMMUAccessFlags flag) > { > assert(memory_region_is_iommu(mr)); > + assert(flag == mr->iommu_notify_flag); > notifier_list_notify(&mr->iommu_notify, &entry); > } Shouldn't it be possible to have IOMMU_RW and IOMMU_NONE on the same IOMMU, if the IOMMU supports IOMMU_RW at all? Thanks, Paolo