[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9027b5f1-545b-e11b-ca8f-f1e0bd701634@arm.com>
Date: Mon, 29 Jul 2019 14:13:44 +0100
From: Robin Murphy <robin.murphy@....com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>,
Christoph Hellwig <hch@....de>
Cc: Tom Murphy <tmurphy@...sta.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Linuxarm <linuxarm@...wei.com>,
"Wangzhou (B)" <wangzhou1@...ilicon.com>
Subject: Re: [PATCH 07/24] iommu/dma: Move domain lookup into
__iommu_dma_{map, unmap}
Hi Shameer,
On 29/07/2019 13:12, Shameerali Kolothum Thodi wrote:
> Hi Robin,
>
>> -----Original Message-----
>> From: iommu-bounces@...ts.linux-foundation.org
>> [mailto:iommu-bounces@...ts.linux-foundation.org] On Behalf Of Christoph
>> Hellwig
>> Sent: 20 May 2019 08:30
>> To: Robin Murphy <robin.murphy@....com>
>> Cc: Tom Murphy <tmurphy@...sta.com>; Catalin Marinas
>> <catalin.marinas@....com>; Will Deacon <will.deacon@....com>;
>> linux-kernel@...r.kernel.org; iommu@...ts.linux-foundation.org;
>> linux-arm-kernel@...ts.infradead.org
>> Subject: [PATCH 07/24] iommu/dma: Move domain lookup into
>> __iommu_dma_{map, unmap}
>>
>> From: Robin Murphy <robin.murphy@....com>
>>
>> Most of the callers don't care, and the couple that do already have the
>> domain to hand for other reasons are in slow paths where the (trivial)
>> overhead of a repeated lookup will be utterly immaterial.
>
> On a Hisilicon ARM64 platform with 5.3-rc1, a F_TRANSALTION error from
> smmuv3 is reported when an attempt is made to assign a ixgbe vf dev to a
> Guest.
>
> [ 196.747107] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x10 received:
> [ 196.747109] arm-smmu-v3 arm-smmu-v3.0.auto: 0x00000180 00000010
> [ 196.747110] arm-smmu-v3 arm-smmu-v3.0.auto: 0x0000020100000000
> [ 196.747111] arm-smmu-v3 arm-smmu-v3.0.auto: 0x00000000ffffe040
> [ 196.747113] arm-smmu-v3 arm-smmu-v3.0.auto: 0x00000000ffffe000
>
> Git bisect points to this patch.
>
> Please see below.
[...]
>> *iommu_dma_get_msi_page(struct device *dev,
>> if (!msi_page)
>> return NULL;
>>
>> - iova = __iommu_dma_map(dev, msi_addr, size, prot, domain);
>> + iova = __iommu_dma_map(dev, msi_addr, size, prot);
>
> I think the domain here is retrieved using iommu_get_domain_for_dev()
> which may not be the default domain returned by iommu_get_dma_domain().
Urgh, yes, how did I manage to miss that? :(
I doubt this patch reverts cleanly, but I don't think it needs to be
completely undone anyway; give me a moment...
Robin.
>
> Please check and let me know.
>
> Thanks,
> Shameer
>
>> if (iova == DMA_MAPPING_ERROR)
>> goto out_free_page;
>> --
>> 2.20.1
>>
>> _______________________________________________
>> iommu mailing list
>> iommu@...ts.linux-foundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/iommu
Powered by blists - more mailing lists