Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-03 Thread Sven Peter via iommu
On Fri, Sep 3, 2021, at 17:45, Robin Murphy wrote: > On 2021-09-03 16:16, Sven Peter wrote: > > > > > > On Thu, Sep 2, 2021, at 21:42, Robin Murphy wrote: > >> On 2021-09-02 19:19, Sven Peter wrote: > >>> > >>> > >>> On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote: > > My biggest

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-03 Thread Alyssa Rosenzweig
> > On the IOMMU API level you have much more information available about the > > actual > > hardware and can prepare the buffers in a way that makes both devices happy. > > That's why iommu_map_sgtable combined with iovad->granule aligned sgt > > entries > > can actually guarantee to map the

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-03 Thread Robin Murphy
On 2021-09-03 16:16, Sven Peter wrote: On Thu, Sep 2, 2021, at 21:42, Robin Murphy wrote: On 2021-09-02 19:19, Sven Peter wrote: On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote: My biggest issue is that I do not understand how this function is supposed to be used correctly. It

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-03 Thread Sven Peter via iommu
On Thu, Sep 2, 2021, at 21:42, Robin Murphy wrote: > On 2021-09-02 19:19, Sven Peter wrote: > > > > > > On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote: > >>> My biggest issue is that I do not understand how this function is supposed > >>> to be used correctly. It would work fine as-is

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-02 Thread Robin Murphy
On 2021-09-02 19:19, Sven Peter wrote: On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote: My biggest issue is that I do not understand how this function is supposed to be used correctly. It would work fine as-is if it only ever gets passed buffers allocated by the coherent API but

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-02 Thread Sven Peter via iommu
On Wed, Sep 1, 2021, at 23:10, Alyssa Rosenzweig wrote: > > My biggest issue is that I do not understand how this function is supposed > > to be used correctly. It would work fine as-is if it only ever gets passed > > buffers > > allocated by the coherent API but there's not way to check or

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-01 Thread Alyssa Rosenzweig
> My biggest issue is that I do not understand how this function is supposed > to be used correctly. It would work fine as-is if it only ever gets passed > buffers > allocated by the coherent API but there's not way to check or guarantee that. > There may also be callers making assumptions that

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-09-01 Thread Sven Peter via iommu
On Tue, Aug 31, 2021, at 23:30, Alyssa Rosenzweig wrote: > I use this function for cross-device sharing on the M1 display driver. > Arguably this is unsafe but it works on 16k kernels and if you want to > test the function on 4k, you know where my code is. > My biggest issue is that I do not

Re: [PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-08-31 Thread Alyssa Rosenzweig
I use this function for cross-device sharing on the M1 display driver. Arguably this is unsafe but it works on 16k kernels and if you want to test the function on 4k, you know where my code is. On Sat, Aug 28, 2021 at 05:36:37PM +0200, Sven Peter wrote: > Pretend that iommu_dma_get_sgtable is not

[PATCH v2 3/8] iommu/dma: Disable get_sgtable for granule > PAGE_SIZE

2021-08-28 Thread Sven Peter via iommu
Pretend that iommu_dma_get_sgtable is not implemented when granule > PAGE_SIZE since I can neither test this function right now nor do I fully understand how it is used. Signed-off-by: Sven Peter --- drivers/iommu/dma-iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git