linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, "Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] PCI/P2PDMA: Root complex whitelist should not apply when an IOMMU is present
Date: Tue, 18 Jun 2019 14:51:35 -0600	[thread overview]
Message-ID: <69724119-5037-000c-a711-856703c60429@deltatee.com> (raw)
In-Reply-To: <20190618204007.GB110859@google.com>



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.

Thanks,

Logan

  reply	other threads:[~2019-06-18 20:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 20:12 [PATCH] PCI/P2PDMA: Root complex whitelist should not apply when an IOMMU is present Logan Gunthorpe
2019-06-18 20:40 ` Bjorn Helgaas
2019-06-18 20:51   ` Logan Gunthorpe [this message]
2019-06-18 23:50     ` Logan Gunthorpe
2019-06-19  9:26       ` Koenig, Christian
2019-06-19  9:29         ` Christoph Hellwig
2019-06-19  9:39           ` Koenig, Christian
     [not found] <a98bff67-a76e-4ddc-a317-96f2bdc9af72@email.android.com>
2019-05-22 20:41 ` Logan Gunthorpe
2019-05-23  8:12   ` Koenig, Christian
2019-05-23  9:43     ` Christoph Hellwig
2019-05-23  9:48       ` Koenig, Christian
2019-05-23  9:50         ` Christoph Hellwig
2019-05-23 10:06           ` Koenig, Christian
2019-05-23 10:26             ` Christoph Hellwig
2019-05-23 15:59               ` Logan Gunthorpe
2019-05-23 15:53           ` Logan Gunthorpe
2019-05-23 15:59             ` Christoph Hellwig
2019-05-24 12:40               ` Koenig, Christian
2019-05-24 14:12                 ` Christoph Hellwig
2019-05-24 16:18                   ` Logan Gunthorpe
2019-05-24 16:06                 ` Logan Gunthorpe
2019-05-23 16:14         ` Logan Gunthorpe
2019-05-23 15:47     ` Logan Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69724119-5037-000c-a711-856703c60429@deltatee.com \
    --to=logang@deltatee.com \
    --cc=christian.koenig@amd.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).