lkml.org 
[lkml]   [2019]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 02/10] iommu/vt-d: Use per-device dma_ops
>  /* Check if the dev needs to go through non-identity map and unmap process.*/
> static bool iommu_need_mapping(struct device *dev)
> {
> - int ret;
> -
> if (iommu_dummy(dev))
> return false;
>
> - ret = identity_mapping(dev);
> - if (ret) {
> - u64 dma_mask = *dev->dma_mask;
> -
> - if (dev->coherent_dma_mask && dev->coherent_dma_mask < dma_mask)
> - dma_mask = dev->coherent_dma_mask;
> -
> - if (dma_mask >= dma_get_required_mask(dev))
> - return false;

Don't we need to keep this bit so that we still allow the IOMMU
to act if the device has a too small DMA mask to address all memory in
the system, even if if it should otherwise be identity mapped?

\
 
 \ /
  Last update: 2019-07-25 07:50    [W:0.310 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site