Received: by 10.192.165.148 with SMTP id m20csp4689469imm; Tue, 8 May 2018 12:34:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrbRjf/RCPZyyo2RsBIn8nEdMUokxrwHSgQDB31DKVhVnmRfcGuhsaSX9Olxsyem29+HjvK X-Received: by 2002:a63:8e42:: with SMTP id k63-v6mr33534335pge.278.1525808078879; Tue, 08 May 2018 12:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525808078; cv=none; d=google.com; s=arc-20160816; b=JWEvQWjVuwzy4kPvsBOxW403ic4m/zupCpOCm4SqEhwji1JMdfdEeHOrvVWOcz+xkz nivr6053Gi/QHWUytaLvdj0wDjZ6iNpFCPTo5LdWlPshb+FYmxdvn+D/OyWKdchp+uoe eRhnav/xC/+nxgJEJ6NMjzH7sfcSTkjc2QMUSSgQBaeAKG3uuNTGwpgiRqsZqcaMIAlc cKKkQNLeQfwy5qAd6mHbd37/0AWG8hlT02/yqDgQKCABolOy8J4kFHr6a7v5RlVUoviK 5ILcVULBOsRLkT2VVMR4KCxhS5ki2hrpOS62SfcJCR7wVR0u2J/N2FRkWNDKIyKRW3+3 rdXQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=069VUaUEY6kRg21ip5DG2eeBiQ9GnRfF/3CeCkiJWBs=; b=hncoySYF3frQZ/3nRKT5nJSbIa/U3Cpeo7QXLuTqh0neGGgjnt83LgSm1Pj+gqpQIu iA5OFK7zc3aHYWP3rdyL/yfYTlU3GXTEWZJMTbUyT5jPYvg4kL5ExoxaPthKseOGfdk4 oAPDzK7X3vC0/HZuu2MR1pJT+e8MWoCp3pxcOg4Fy43qD2ZBa5IMTv+kEApAXau8Am+Z IqXyIZ8ujQa9Qei7NlNxZ8PFJarUxMDYVScYMIYPGV4oW3W4ANg1uE6kYbgFU2h5ovAO ux1gJyzJxLWgLefHTnNq8aF0B5A2+ypvT3AGMgySetaYcYni5skO9s4uu8RioVfLwVfa VXwQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si4739541plt.71.2018.05.08.12.34.24; Tue, 08 May 2018 12:34:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754882AbeEHTeL convert rfc822-to-8bit (ORCPT + 99 others); Tue, 8 May 2018 15:34:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42040 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbeEHTeJ (ORCPT ); Tue, 8 May 2018 15:34:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 236D3300370F; Tue, 8 May 2018 19:34:09 +0000 (UTC) Received: from w520.home (ovpn-116-103.phx2.redhat.com [10.3.116.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id B23FE608F0; Tue, 8 May 2018 19:34:07 +0000 (UTC) Date: Tue, 8 May 2018 13:34:07 -0600 From: Alex Williamson To: Logan Gunthorpe Cc: Christian =?UTF-8?B?S8O2bmln?= , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWU=?= Glisse , Benjamin Herrenschmidt Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches Message-ID: <20180508133407.57a46902@w520.home> In-Reply-To: <3584a6ac-95c7-5d23-1859-aee30605776e@deltatee.com> References: <20180423233046.21476-1-logang@deltatee.com> <20180423233046.21476-5-logang@deltatee.com> <20180507231306.GG161390@bhelgaas-glaptop.roam.corp.google.com> <0b4183ef-e720-204b-9e85-b9eaf7a4136a@deltatee.com> <3584a6ac-95c7-5d23-1859-aee30605776e@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 08 May 2018 19:34:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 May 2018 13:13:40 -0600 Logan Gunthorpe wrote: > On 08/05/18 10:50 AM, Christian König wrote: > > E.g. transactions are initially send to the root complex for > > translation, that's for sure. But at least for AMD GPUs the root complex > > answers with the translated address which is then cached in the device. > > > > So further transactions for the same address range then go directly to > > the destination. > > Sounds like you are referring to Address Translation Services (ATS). > This is quite separate from ACS and, to my knowledge, isn't widely > supported by switch hardware. They are not so unrelated, see the ACS Direct Translated P2P capability, which in fact must be implemented by switch downstream ports implementing ACS and works specifically with ATS. This appears to be the way the PCI SIG would intend for P2P to occur within an IOMMU managed topology, routing pre-translated DMA directly between peer devices while requiring non-translated requests to bounce through the IOMMU. Really, what's the value of having an I/O virtual address space provided by an IOMMU if we're going to allow physical DMA between downstream devices, couldn't we just turn off the IOMMU altogether? Of course ATS is not without holes itself, basically that we trust the endpoint's implementation of ATS implicitly. Thanks, Alex