Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-04 Thread VMware
On 9/4/19 2:22 PM, Christoph Hellwig wrote: 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

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-04 Thread Christoph Hellwig
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)

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-04 Thread VMware
On 9/4/19 8:58 AM, Christoph Hellwig wrote: On Tue, Sep 03, 2019 at 10:46:18PM +0200, Thomas Hellström (VMware) wrote: 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

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread Andy Lutomirski
On Tue, Sep 3, 2019 at 1:46 PM Thomas Hellström (VMware) wrote: > > 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

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread VMware
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

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread VMware
On 9/3/19 5:14 PM, Dave Hansen wrote: On 9/3/19 6:15 AM, Thomas Hellström (VMware) wrote: The force_dma_unencrypted symbol is needed by TTM to set up the correct page protection when memory encryption is active. Export it. It would be great if this had enough background that I didn't have to

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread Christoph Hellwig
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 >

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread Dave Hansen
On 9/3/19 6:15 AM, Thomas Hellström (VMware) wrote: > The force_dma_unencrypted symbol is needed by TTM to set up the correct > page protection when memory encryption is active. Export it. It would be great if this had enough background that I didn't have to look at patch 4 to figure out what TTM

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread VMware
Hi, Christoph, On 9/3/19 3:46 PM, Christoph Hellwig wrote: On Tue, Sep 03, 2019 at 03:15:01PM +0200, Thomas Hellström (VMware) wrote: From: Thomas Hellstrom The force_dma_unencrypted symbol is needed by TTM to set up the correct page protection when memory encryption is active. Export it.

Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread Christoph Hellwig
On Tue, Sep 03, 2019 at 03:15:01PM +0200, Thomas Hellström (VMware) wrote: > From: Thomas Hellstrom > > The force_dma_unencrypted symbol is needed by TTM to set up the correct > page protection when memory encryption is active. Export it. NAK. This is a helper for the core DMA code and drivers

[PATCH v2 1/4] x86/mm: Export force_dma_unencrypted

2019-09-03 Thread VMware
From: Thomas Hellstrom The force_dma_unencrypted symbol is needed by TTM to set up the correct page protection when memory encryption is active. Export it. Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin"