Re: [PATCH] PCI/P2PDMA: Root complex whitelist should not apply when an IOMMU is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019-06-18 2:51 p.m., Logan Gunthorpe wrote:
> On 2019-06-18 2:40 p.m., Bjorn Helgaas wrote:
>> On Wed, May 22, 2019 at 02:12:52PM -0600, Logan Gunthorpe wrote:
>>> Presently, there is no path to DMA map P2PDMA memory, so if a TLP
>>> targeting this memory hits the root complex and an IOMMU is present,
>>> the IOMMU will reject the transaction, even if the RC would support
>>> P2PDMA.
>>>
>>> So until the kernel knows to map these DMA addresses in the IOMMU,
>>> we should not enable the whitelist when an IOMMU is present.
>>>
>>> While we are at it, remove the comment mentioning future work
>>> to add a white list.
>>
>> There was a lot of discussion about this.  Did everybody come to a
>> consensus about what should be done?  Can you post a patch with
>> reviewed-by if appropriate?
> 
> I think we have consensus that it's broken and needs to be fixed for the
> short term. Preferably before 5.3. I'm not sure we have consensus on the
> proper fix.
> 
> The two easy things I can see to do is to either revert it or add the
> iommu_is_present() check that I did in the above patch.
> 
> @Christian, which do you prefer? I think I'd prefer the
> iommu_is_present() route as it maintains the information about
> white-listed devices and is easier to change once we have the correct
> solution.
> 
> I can send a patch tomorrow one way or another.

Also, looks like one of my clients has an interest in seeing work like
this happen. So I'll be writing some patches in the next couple weeks to
do this properly. I'll try to send them to the lists early next cycle.

Logan



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux