From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v1 2/2] dma-mapping-common: add DMA attribute - DMA_ATTR_IOMMU_BYPASS Date: Mon, 2 Nov 2015 15:51:15 +0100 Message-ID: <20151102145115.GB2876@suse.de> References: <1445789224-28032-1-git-send-email-shamir.rabinovitch@oracle.com> <1446079332.3405.273.camel@infradead.org> <1446081046.1856.55.camel@kernel.crashing.org> <3880193.j0XDKyhAXH@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <3880193.j0XDKyhAXH@wuerfel> Sender: linux-arch-owner@vger.kernel.org List-Archive: List-Post: To: Arnd Bergmann Cc: Benjamin Herrenschmidt , David Woodhouse , Shamir Rabinovitch , corbet@lwn.net, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, Andy Lutomirski , Christian Borntraeger , Cornelia Huck , Sebastian Ott , Paolo Bonzini , Christoph Hellwig , KVM , Martin Schwidefsky , linux-s390 List-ID: On Fri, Oct 30, 2015 at 11:32:06AM +0100, Arnd Bergmann wrote: > I wonder if the 'iommu=force' attribute is too coarse-grained though, > and if we should perhaps allow a per-device setting on architectures > that allow this. Yeah, definitly. Currently we only have iommu=pt to enable pass-through mode for _all_ devices. I think it makes sense to introduce a per-device opt-in for pass-through, but have it configured by the user and not by the device driver. If the user enables the IOMMU in his system, he expects to be secure against DMA attacks. If drivers could opt-out, every protection would be voided. Joerg