From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avQNW-0002I7-B6 for qemu-devel@nongnu.org; Wed, 27 Apr 2016 10:23:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avQNS-0003Sf-DX for qemu-devel@nongnu.org; Wed, 27 Apr 2016 10:23:46 -0400 Date: Wed, 27 Apr 2016 16:23:32 +0200 From: Joerg Roedel Message-ID: <20160427142331.GH17926@8bytes.org> References: <1461245745-6710-1-git-send-email-mst@redhat.com> <20160421135416.GE11775@citrix.com> <1461759501.118304.149.camel@infradead.org> <20160427153345-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160427153345-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH V2 RFC] fixup! virtio: convert to use DMA api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: David Woodhouse , Kevin Wolf , Wei Liu , Andy Lutomirski , qemu-block@nongnu.org, Christian Borntraeger , Jason Wang , Stefano Stabellini , qemu-devel@nongnu.org, peterx@redhat.com, linux-kernel@vger.kernel.org, Amit Shah , iommu@lists.linux-foundation.org, Stefan Hajnoczi , kvm@vger.kernel.org, cornelia.huck@de.ibm.com, pbonzini@redhat.com, virtualization@lists.linux-foundation.org, Anthony PERARD On Wed, Apr 27, 2016 at 04:37:04PM +0300, Michael S. Tsirkin wrote: > One correction: it's a feature of the device in the system. > There could be a mix of devices bypassing and not > bypassing the IOMMU. No, it really is not. A device can't chose to bypass the IOMMU. But the IOMMU can chose to let the device bypass. So any fix here belongs into the platform/iommu code too and not into some driver. > Sounds good. And a way to detect appropriate devices could > be by looking at the feature flag, perhaps? Again, no! The way to detect that is to look into the iommu description structures provided by the firmware. They provide everything necessary to tell the iommu code which devices are not translated. Joerg