Received: from eggs.gnu.org ([2001:4830:134:3::10]:46683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfhAh-0003HZ-9h for qemu-devel@nongnu.org; Fri, 02 Sep 2016 01:37:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfhAc-00009R-9T for qemu-devel@nongnu.org; Fri, 02 Sep 2016 01:37:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfhAc-00009A-3p for qemu-devel@nongnu.org; Fri, 02 Sep 2016 01:37:42 -0400 Date: Fri, 2 Sep 2016 13:37:33 +0800 From: Peter Xu Message-ID: <20160902053733.GB10595@pxdev.xzpeter.org> References: <1472526419-5900-1-git-send-email-jasowang@redhat.com> <1472526419-5900-11-git-send-email-jasowang@redhat.com> <20160829213702.536df0df@t450s.home> <76fb2f05-4f9c-3e91-d301-3e0a6d4cabaf@redhat.com> <20160901022929.GA3558@pxdev.xzpeter.org> <20160831204342.77fbe728@t450s.home> <20160901035848.GC3558@pxdev.xzpeter.org> <20160902141504.05950823@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160902141504.05950823@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH for 2.8 10/11] Revert "intel_iommu: Throw hw_error on notify_started" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Alex Williamson , Jason Wang , mst@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, cornelia.huck@de.ibm.com, wexu@redhat.com, vkaplans@redhat.com On Fri, Sep 02, 2016 at 02:15:04PM +1000, David Gibson wrote: > What!? I see no reason you need a different notifier, just fix the > implementation of the current one. As a bonus this will also give you > working VFIO passthrough with vIOMMU on x86, something which should > work already, but doesn't. Hi, David, Do you mean that we can enhance the interface to suite the two needs? E.g., adding a "IOTLB notification type" definition: - "full": for those who is listening on all mapping changes including additions (VFIO use case) - "cache_only": for those who only cares about cache invalidations (device IOTLB, aka, vhost use case) We can: - add notify type when we register the notifiers (e.g., when VFIO registers IOMMU notifier, it should specify the type as "full", so it won't receive notification if it's device IOTLB invalidations). - pass this type when trigger the notification, so for each IOMMU notify handler, it can selectively disgard the notification. Not sure whether above makes sense. -- peterx