Received: by 10.213.65.68 with SMTP id h4csp1599706imn; Thu, 29 Mar 2018 07:39:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx486HSwpyIDrhhfMI/+d5xJe8iT4XZuFknFP6cuxWbFnBLeyrpoVyROeXuM29zQ3Podl80Q7 X-Received: by 2002:a17:902:6ac1:: with SMTP id i1-v6mr8500316plt.152.1522334355882; Thu, 29 Mar 2018 07:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522334355; cv=none; d=google.com; s=arc-20160816; b=aTvz02AmoJIdIW9b3rM+E8YhD/UuK6v9zedO+VNwis9qVGaUU3opMdLlLx9l/At6fD egjwxe4iTRrUcSmgy/i277J8tvMSJM6m9WlABHlHk5fly1VspaBeQlbqlLStftvUulV0 JhuhENCXySh+TSKrOZ/cEPPIKJ9qocrR/Np0zqa21ZTclQCTlsqtk+0fhgpcV3ClkSUF 1/SnYO6tafumr4w7jVKhPcV0Vrj/Ml4C6lv99kxByUW0+jipd2FZYInexjSEpKsedgTy ug3YeNlEVsviBdhcLg1Nxqm6n3wcqur64QNZGpFfiQXm4C5Fw1JSfyMUrNvpeMb2NjHG fO9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=1vZPQhxc6ohW52rVRn4ROX5aUhO1OrmyORs6AZFGP5M=; b=FTaIQuDyl1rUMtCx4liRDo8for+HyeFAk8Jf8D0E+3ZpAZrvuLMkgCewGcRj5iUIkF 8bYGrnxv2nGkGhJfTMhOj8lqpMITwp0CmvdObBF77TNegd33a3ONIMGiKAius07TRusz l1n/pI8beYskptKDqzY0suiREK80qmfPnXhLc8PrtTnu8K9X7V/vPAtG4q9f6PXxDST7 iUpC9AeU73mHiJQd9Gm6wmV4hYOI8Q3cvjGSMyDK6ukvNbCDmvlbJQf/0GUqD7l3fOfQ A38EaE0Tgd57u6USOrlUwKdy9MdgmmCcJK7JxddZyyIT9zuR1W9d9GZaDR68CA8jXUBx f5mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u4EF1sqZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si4046261pgc.87.2018.03.29.07.39.01; Thu, 29 Mar 2018 07:39:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=u4EF1sqZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbeC2Ohs (ORCPT + 99 others); Thu, 29 Mar 2018 10:37:48 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:52829 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbeC2Ohq (ORCPT ); Thu, 29 Mar 2018 10:37:46 -0400 Received: by mail-wm0-f49.google.com with SMTP id l9so11257410wmh.2; Thu, 29 Mar 2018 07:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1vZPQhxc6ohW52rVRn4ROX5aUhO1OrmyORs6AZFGP5M=; b=u4EF1sqZ9Wt0CVQ6ekoSTfkg2EPUNLb+cCXGjyTBkrPGq9T2wfr3sLhFU6rGwjiUKm fEyho1CdNj+q0FB2mBdmn+BohUInhDaZ1x+I89S1e/G6SccaPKM+S0sJZfpUDLzU7TZ7 FncpAQVaIMNQbNrFM8GDyftgmuoaSZqEv67tHwxh0imJV807EK/yIp8vSe6WMGOj/gpt xKuQs6158O0i6ID/y9qTPOYtNN7+7sCxrLupnvSwXh+dgmBP2ES3IleHB7o74wgouLE7 7oJ9jzyLFZE2Fu2jPwwz9DrkiUtBIl+n5xsT85HrH+7ycY+B+/029GnfuZnPZeXs/xud zXPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1vZPQhxc6ohW52rVRn4ROX5aUhO1OrmyORs6AZFGP5M=; b=hzdPxc2+CP4HLOMM6WL1sL0OP/BSqG0XEFIaEOmZpfYFSe5C+CoxExtZy9TVh+JOba wAoNNPjcXCgF2Cl/iEN6LjPOcMKjy4nRpbEjMFLhihBG1Sql8bJLtcejz1O58URm6yb4 G3BSmBnJtvCtAM5R8eUtxwFDi4y5Np9EITX9HqvwIWDiYzlx0QB+VJyfs0PCx2WpmXZX Ovaa1vN+iZctIiqSfoqSx5wTMYTu0WroTxgwN5Jo0616VjPfHx3gqXWCKAWxH+Mc/YfL 5OeQy7E2R4N3FLQg+FPdDYe8dIjjsUS4Gty0qQRPK4IBdlFZvDgFQxKnfwST5D4JENn0 9lNw== X-Gm-Message-State: AElRT7GDKjTrsPbjwHelMYk4dut2qaY+TLonlaOjLjXk69Bx+OutRZ9s qm3BXBQywTIGuPBnu7UKQPy73+H+6OIpE6ajRiQ= X-Received: by 10.28.45.209 with SMTP id t200mr6312323wmt.90.1522334264756; Thu, 29 Mar 2018 07:37:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.161.29 with HTTP; Thu, 29 Mar 2018 07:37:44 -0700 (PDT) In-Reply-To: References: <20180325110000.2238-1-christian.koenig@amd.com> <20180325110000.2238-2-christian.koenig@amd.com> <20180328123830.GB25060@infradead.org> <613a6c91-7e72-5589-77e6-587ec973d553@gmail.com> <5498e9b5-8fe5-8999-a44e-f7dc483bc9ce@amd.com> <16c7bef8-5f03-9e89-1f50-b62fb139a36f@deltatee.com> <6a5c9a10-50fe-b03d-dfc1-791d62d79f8e@amd.com> <73578b4e-664b-141c-3e1f-e1fae1e4db07@amd.com> <1b08c13e-b4a2-08f2-6194-93e6c21b7965@deltatee.com> From: Alex Deucher Date: Thu, 29 Mar 2018 10:37:44 -0400 Message-ID: Subject: Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev() To: Logan Gunthorpe Cc: linaro-mm-sig@lists.linaro.org, amd-gfx list , LKML , Maling list - DRI developers , linux-media Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, didn't mean to drop the lists here. re-adding. On Wed, Mar 28, 2018 at 4:05 PM, Alex Deucher wrote= : > On Wed, Mar 28, 2018 at 3:53 PM, Logan Gunthorpe wr= ote: >> >> >> On 28/03/18 01:44 PM, Christian K=C3=B6nig wrote: >>> Well, isn't that exactly what dma_map_resource() is good for? As far as >>> I can see it makes sure IOMMU is aware of the access route and >>> translates a CPU address into a PCI Bus address. >> >>> I'm using that with the AMD IOMMU driver and at least there it works >>> perfectly fine. >> >> Yes, it would be nice, but no arch has implemented this yet. We are just >> lucky in the x86 case because that arch is simple and doesn't need to do >> anything for P2P (partially due to the Bus and CPU addresses being the >> same). But in the general case, you can't rely on it. > > Could we do something for the arches where it works? I feel like peer > to peer has dragged out for years because everyone is trying to boil > the ocean for all arches. There are a huge number of use cases for > peer to peer on these "simple" architectures which actually represent > a good deal of the users that want this. > > Alex > >> >>>>> Yeah, but not for ours. See if you want to do real peer 2 peer you ne= ed >>>>> to keep both the operation as well as the direction into account. >>>> Not sure what you are saying here... I'm pretty sure we are doing "rea= l" >>>> peer 2 peer... >>>> >>>>> For example when you can do writes between A and B that doesn't mean >>>>> that writes between B and A work. And reads are generally less likely= to >>>>> work than writes. etc... >>>> If both devices are behind a switch then the PCI spec guarantees that = A >>>> can both read and write B and vice versa. >>> >>> Sorry to say that, but I know a whole bunch of PCI devices which >>> horrible ignores that. >> >> Can you elaborate? As far as the device is concerned it shouldn't know >> whether a request comes from a peer or from the host. If it does do >> crazy stuff like that it's well out of spec. It's up to the switch (or >> root complex if good support exists) to route the request to the device >> and it's the root complex that tends to be what drops the load requests >> which causes the asymmetries. >> >> Logan >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx