From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh9GM-0005RW-PS for qemu-devel@nongnu.org; Tue, 06 Sep 2016 01:49:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bh9GG-0004tz-UA for qemu-devel@nongnu.org; Tue, 06 Sep 2016 01:49:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bh9GG-0004tk-OP for qemu-devel@nongnu.org; Tue, 06 Sep 2016 01:49:32 -0400 Date: Tue, 6 Sep 2016 13:49:27 +0800 From: Peter Xu Message-ID: <20160906054927.GC21051@pxdev.xzpeter.org> References: <1473060081-17835-1-git-send-email-peterx@redhat.com> <20160906050617.GB16479@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160906050617.GB16479@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH 0/3] memory: add IOMMU notifier type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-devel@nongnu.org, mst@redhat.com, jasowang@redhat.com, vkaplans@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, pbonzini@redhat.com, cornelia.huck@de.ibm.com, dgibson@redhat.com On Tue, Sep 06, 2016 at 03:06:17PM +1000, David Gibson wrote: > On Mon, Sep 05, 2016 at 03:21:18PM +0800, Peter Xu wrote: > > In the thread: > > > > https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg00254.html > > > > Alex proposed a way for vhost DMAR to be enabled without breaking > > existing protections on vIOMMU and device assignments. This series > > tried to implement the idea, by introducing a IOMMU notifier type for > > each IOMMU memory region. > > Hrm, I'm pretty dubious about this concept, since it's basically just > an interim hack for an incomplete notifier implementation on x86. > What makes just fixing the notifier so difficult? Aviv is working on the full notifier support for that. It's been months since his last post though. If he cannot continue it (due to any reason), I can take it over. But for now, we may still need to wait for his patches to fully enable a complete notifier mechanism. I don't know how POWER works to provide a complete notifier, and whether POWER can selectively enable the notified items... But for Intel VT-d, it provided two choices: by default, only cache invalidations are notified (even, we can disalbe cache invaliations), but if one want to have a complete notifier, just set the CM bit to 1. So I just think it'll be cool if we can support both cases. E.g., for vhost, it does not need to be notified with newly added entries, but only cache invalidations. IMHO we can't just force vhost to use a complete notifier while actually it only needs part of it. Thanks, -- peterx