Re: [PATCH] iommu/vt-d: Return the correct dma mask when we are bypassing the IOMMU

From: Arvind Sankar
Date: Wed Oct 16 2019 - 15:15:57 EST


On Thu, Oct 10, 2019 at 09:26:37AM +0800, Lu Baolu wrote:
> Hi,
>
> On 10/8/19 10:33 PM, Arvind Sankar wrote:
> > We must return a mask covering the full physical RAM when bypassing the
> > IOMMU mapping. Also, in iommu_need_mapping, we need to check using
> > dma_direct_get_required_mask to ensure that the device's dma_mask can
> > cover physical RAM before deciding to bypass IOMMU mapping.
> >
> > Fixes: 249baa547901 ("dma-mapping: provide a better default ->get_required_mask")
> > Reported-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> > Tested-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> > Originally-by: Christoph Hellwig <hch@xxxxxx>
> > Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> > Fixed-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> > Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
>
> This patch looks good to me.
>
> Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
>

Hi Christoph, will you be taking this through your dma-mapping branch?

Thanks.