From: Daniel Vetter Subject: Re: [PATCH v2 0/4] Have TTM support SEV encryption with coherent memory Date: Tue, 3 Sep 2019 17:18:50 +0200 Message-ID: <20190903151850.GB2112@phenom.ffwll.local> References: <20190903131504.18935-1-thomas_os@shipmail.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20190903131504.18935-1-thomas_os@shipmail.org> Sender: linux-kernel-owner@vger.kernel.org To: Thomas =?iso-8859-1?Q?Hellstr=F6m_=28VMware=29?= Cc: dri-devel@lists.freedesktop.org, pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Tue, Sep 03, 2019 at 03:15:00PM +0200, Thomas Hellström (VMware) wrote: > With SEV memory encryption and in some cases also with SME memory > encryption, coherent memory is unencrypted. In those cases, TTM doesn't > set up the correct page protection. Fix this by having the TTM > coherent page allocator call into the platform code to determine whether > coherent memory is encrypted or not, and modify the page protection if > it is not. > > v2: > - Use force_dma_unencrypted() rather than sev_active() to catch also the > special SME encryption cases. We should probably cc Christoph Hellwig on this ... better to hear his screams before merging than afterwards. As much as I don't support screaming maintainers, that seems the least bad option here. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch