From: Christoph Hellwig Subject: Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted Date: Wed, 4 Sep 2019 05:22:04 -0700 Message-ID: <20190904122204.GA16937@infradead.org> References: <20190903131504.18935-1-thomas_os@shipmail.org> <20190903131504.18935-2-thomas_os@shipmail.org> <20190903134627.GA2951@infradead.org> <20190903162204.GB23281@infradead.org> <558f1224-d157-5848-1752-1430a5b3947e@shipmail.org> <20190904065823.GA31794@infradead.org> <8698dc21-8679-b4a7-3179-71589fa33ab7@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: <8698dc21-8679-b4a7-3179-71589fa33ab7@shipmail.org> Sender: linux-kernel-owner@vger.kernel.org To: Thomas =?iso-8859-1?Q?Hellstr=F6m_=28VMware=29?= Cc: Christoph Hellwig , dri-devel@lists.freedesktop.org, pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, linux-kernel@vger.kernel.org, Thomas Hellstrom , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Heiko Carstens , Christian Borntraeger , Tom Lendacky , Christian =?iso-8859-1?Q?K=F6nig?= List-Id: dri-devel@lists.freedesktop.org On Wed, Sep 04, 2019 at 09:32:30AM +0200, Thomas Hellström (VMware) wrote: > That sounds great. Is there anything I can do to help out? I thought this > was more or less a dead end since the current dma_mmap_ API requires the > mmap_sem to be held in write mode (modifying the vma->vm_flags) whereas > fault() only offers read mode. But that would definitely work. We'll just need to split into a setup and faul phase. I have some sketches from a while ago, let me dust them off so that you can try them. > "If it's the latter, then I would like to reiterate that it would be better > that we work to come up with a long term plan to add what's missing to the > DMA api to help graphics drivers use coherent memory?" I don't think we need a long term plan. We've been adding features on an as-needed basis. And now that we have siginificanty less implementations of the API this actually becomes much easier as well.