lkml.org 
[lkml]   [2019]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] dma-mapping: force unencryped devices are always addressing limited
Date
On 11/28/19 8:51 AM, hch@lst.de wrote:
> On Wed, Nov 27, 2019 at 06:22:57PM +0000, Thomas Hellstrom wrote:
>>> bool dma_addressing_limited(struct device *dev)
>>> {
>>> + if (force_dma_unencrypted(dev))
>>> + return true;
>>> return min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) <
>>> dma_get_required_mask(dev);
>>> }
>> Any chance to have the case
>>
>> (swiotlb_force == SWIOTLB_FORCE)
>>
>> also included?
> We have a hard time handling that in generic code. Do we have any
> good use case for SWIOTLB_FORCE not that we have force_dma_unencrypted?
> I'd love to be able to get rid of it..
>
IIRC the justification for it is debugging. Drivers that don't do
syncing correctly or have incorrect assumptions of initialization of DMA
memory will not work properly when SWIOTLB is forced. We recently found
a vmw_pvscsi device flaw that way...

/Thomas




\
 
 \ /
  Last update: 2019-11-28 09:02    [W:0.060 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site