[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <558f1224-d157-5848-1752-1430a5b3947e@shipmail.org>
Date: Tue, 3 Sep 2019 22:46:18 +0200
From: Thomas Hellström (VMware)
<thomas_os@...pmail.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: dri-devel@...ts.freedesktop.org, pv-drivers@...are.com,
linux-graphics-maintainer@...are.com, linux-kernel@...r.kernel.org,
Thomas Hellstrom <thellstrom@...are.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Tom Lendacky <thomas.lendacky@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted
On 9/3/19 6:22 PM, Christoph Hellwig wrote:
> On Tue, Sep 03, 2019 at 04:32:45PM +0200, Thomas Hellström (VMware) wrote:
>> Is this a layer violation concern, that is, would you be ok with a similar
>> helper for TTM, or is it that you want to force the graphics drivers into
>> adhering strictly to the DMA api, even when it from an engineering
>> perspective makes no sense?
> >From looking at DRM I strongly believe that making DRM use the DMA
> mapping properly makes a lot of sense from the engineering perspective,
> and this series is a good argument for that positions.
What I mean with "from an engineering perspective" is that drivers would
end up with a non-trivial amount of code supporting purely academic
cases: Setups where software rendering would be faster than gpu
accelerated, and setups on platforms where the driver would never run
anyway because the device would never be supported on that platform...
> If DRM was using
> the DMA properl we would not need this series to start with, all the
> SEV handling is hidden behind the DMA API. While we had occasional
> bugs in that support fixing it meant that it covered all drivers
> properly using that API.
That is not really true. The dma API can't handle faulting of coherent
pages which is what this series is really all about supporting also with
SEV active. To handle the case where we move graphics buffers or send
them to swap space while user-space have them mapped.
To do that and still be fully dma-api compliant we would ideally need,
for example, an exported dma_pgprot(). (dma_pgprot() by the way is still
suffering from one of the bugs that you mention above).
Still, I need a way forward and my questions weren't really answered by
this.
/Thomas
Powered by blists - more mailing lists