[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c58fd502-52a4-cb0f-6e7f-e9cc00627313@arm.com>
Date: Mon, 17 Feb 2020 15:50:48 +0000
From: Robin Murphy <robin.murphy@....com>
To: Christoph Hellwig <hch@...radead.org>,
"Isaac J. Manjarres" <isaacm@...eaurora.org>
Cc: pratikp@...eaurora.org, linux-kernel@...r.kernel.org,
Liam Mark <lmark@...eaurora.org>,
iommu@...ts.linux-foundation.org, kernel-team@...roid.com
Subject: Re: [RFC PATCH] iommu/dma: Allow drivers to reserve an iova range
On 17/02/2020 8:01 am, Christoph Hellwig wrote:
> On Fri, Feb 14, 2020 at 02:58:16PM -0800, Isaac J. Manjarres wrote:
>> From: Liam Mark <lmark@...eaurora.org>
>>
>> Some devices have a memory map which contains gaps or holes.
>> In order for the device to have as much IOVA space as possible,
>> allow its driver to inform the DMA-IOMMU layer that it should
>> not allocate addresses from these holes.
>
> Layering violation. dma-iommu is the translation layer between the
> DMA API and the IOMMU API. And calls into it from drivers performing
> DMA mappings need to go through the DMA API (and be documented there).
+1
More than that, though, we already have "holes in the address space"
support for the sake of PCI host bridge windows - assuming this is the
same kind of thing (i.e. the holes are between memory regions and other
resources in PA space, so are only relevant once address translation
comes into the picture), then this is IOMMU API level stuff, so even a
DMA API level interface would be inappropriate.
Robin.
Powered by blists - more mailing lists