Re: [PATCH v2 1/3] iommu/s390: Fix duplicate domain attachments

Jason Gunthorpe
2022-09-27T16:57:37Z

On Tue, Sep 27, 2022 at 06:33:48PM +0200, Niklas Schnelle wrote:

> Not sure what the non-MSI reservation is for? It does seem like x86_64
> also uses this for quite large ranges.

There are lots of things that are unsuitable for DMA on x86 platforms,
unfortunately.. But yeah, I'm not sure either.

> This is because I'm getting a map request for an IOVA in the reserved
> region.

How come? iova_reserve_iommu_regions() reads the reserved regions and
loads them as reserved into the iovad which should cause
iommu_dma_alloc_iova() and alloc_iova_fast() to not return values in
those ranges.

It all looks like it is supposed to work

Did something go wrong in the initialization order perhaps?

Jason