All of lore.kernel.org
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Linux PCI" <linux-pci@vger.kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Andrew Maier" <andrew.maier@eideticom.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] PCI/P2PDMA: Add AMD Zen 2 root complex to the list of allowed bridges
Date: Thu, 23 Jul 2020 14:45:37 -0600	[thread overview]
Message-ID: <7d013200-3257-9f91-cace-4c43947a7f78@deltatee.com> (raw)
In-Reply-To: <CADnq5_NMKK83GaNA+w85MR8bqDbFqvcdvn9MCqZtLwctJKmOUw@mail.gmail.com>



On 2020-07-23 2:18 p.m., Alex Deucher wrote:
> On Thu, Jul 23, 2020 at 4:11 PM Logan Gunthorpe <logang@deltatee.com> wrote:
>>
>>
>>
>> On 2020-07-23 1:57 p.m., Bjorn Helgaas wrote:
>>> [+cc Andrew, Armen, hpa]
>>>
>>> On Thu, Jul 23, 2020 at 02:01:17PM -0400, Alex Deucher wrote:
>>>> On Thu, Jul 23, 2020 at 1:43 PM Logan Gunthorpe <logang@deltatee.com> wrote:
>>>>>
>>>>> The AMD Zen 2 root complex (Starship/Matisse) was tested for P2PDMA
>>>>> transactions between root ports and found to work. Therefore add it
>>>>> to the list.
>>>>>
>>>>> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
>>>>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>>>>> Cc: Christian König <christian.koenig@amd.com>
>>>>> Cc: Huang Rui <ray.huang@amd.com>
>>>>> Cc: Alex Deucher <alexdeucher@gmail.com>
>>>>
>>>> Starting with Zen, all AMD platforms support P2P for reads and writes.
>>>
>>> What's the plan for getting out of the cycle of "update this list for
>>> every new chip"?  Any new _DSMs planned, for instance?
>>
>> Well there was an effort to add capabilities in the PCI spec to describe
>> this but, as far as I know, they never got anywhere, and hardware still
>> doesn't self describe with this.
>>
>>> A continuous trickle of updates like this is not really appealing.  So
>>> far we have:
>>>
>>>   7d5b10fcb81e ("PCI/P2PDMA: Add AMD Zen Raven and Renoir Root Ports to whitelist")
>>>   7b94b53db34f ("PCI/P2PDMA: Add Intel Sky Lake-E Root Ports B, C, D to the whitelist")
>>>   bc123a515cb7 ("PCI/P2PDMA: Add Intel SkyLake-E to the whitelist")
>>>   494d63b0d5d0 ("PCI/P2PDMA: Whitelist some Intel host bridges")
>>>   0f97da831026 ("PCI/P2PDMA: Allow P2P DMA between any devices under AMD ZEN Root Complex")
>>>
>>> And that's just from the last year, not including this patch.
>>
>> Yes, it's not ideal. But most of these are adding old devices as people
>> test and care about running on those platforms -- a lot of this is
>> bootstrapping the list. I'd expect this to slow down a bit as by now we
>> have hopefully got a lot of the existing platforms people care about.
>> But we'd still probably expect to be adding a new Intel and AMD devices
>> about once a year as they produce new hardware designs.
>>
>> Unless, the Intel and AMD folks know of a way to detect this, or even to
>> query if a root complex is newer than a certain generation, I'm not sure
>> what else we can do here.
> 
> I started a thread internally to see if I can find a way.  FWIW,
> pre-ZEN parts also support p2p DMA, but only for writes.  If I can get
> a definitive list, maybe we could switch to a blacklist for the old
> ones?

It would have to be an AMD specific list, falling back to the general
whitelist.... I suppose we can also mine the pci_ids database for Intel
root complexes and create a blacklist there too. But there are a lot
more root complexes outside of the x86 world...

Logan

  reply	other threads:[~2020-07-23 20:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 17:43 [PATCH] PCI/P2PDMA: Add AMD Zen 2 root complex to the list of allowed bridges Logan Gunthorpe
2020-07-23 18:01 ` Alex Deucher
2020-07-23 19:57   ` Bjorn Helgaas
2020-07-23 20:10     ` Logan Gunthorpe
2020-07-23 20:18       ` Alex Deucher
2020-07-23 20:45         ` Logan Gunthorpe [this message]
2020-07-24 16:07         ` Alex Deucher
2020-07-24 19:20           ` Logan Gunthorpe
2020-07-24 15:06       ` Bjorn Helgaas
2020-07-24 15:56         ` Logan Gunthorpe
2020-07-27  9:20           ` Jonathan Cameron

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=7d013200-3257-9f91-cace-4c43947a7f78@deltatee.com \
    --to=logang@deltatee.com \
    --cc=alexdeucher@gmail.com \
    --cc=andrew.maier@eideticom.com \
    --cc=bhelgaas@google.com \
    --cc=christian.koenig@amd.com \
    --cc=helgaas@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ray.huang@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.