Received: by 10.192.165.148 with SMTP id m20csp83704imm; Wed, 9 May 2018 09:08:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrwXQvQBaLBOsqz8/tHgkYt7DUUWfqJs69BAlGXH62hHnma9JzC27UUTgz4+RKbOl033Nrg X-Received: by 2002:a63:701d:: with SMTP id l29-v6mr35632192pgc.299.1525882132934; Wed, 09 May 2018 09:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525882132; cv=none; d=google.com; s=arc-20160816; b=K4CVxGJ3m42a+WuC/yKdAH1EoYC/g4oI+jwj7f62H8luZWrxKcXdb9nG0/NW8usK7B hA5isycGtBoEj6h6dR4KicuPifKhWNVU38T6vT7MWGtVUHox5vfwsYrk6sByDcx/LO94 Ki3aVOEbaJJ0I+UZxHRRrud7231EUHqijYrnMBOq/FB673l++YTOJhL+y+GjOhra3bI8 umoGINID3uSKa1GLjKqvSy4mYVTAnKwfMs1zS6cqby/52fP1hbjW39dnBCCvuJIm5qZs 9/DQS4VzEwRINyLX6h3zlJsnyn5sKeZTPn6n1OhT6oOciSDnZkhuxSlwzq73aEUbVDgC Abtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=ZugoFMPAoPw5+1OCnCpJindX4xN8tzOto7duL7VSYLw=; b=rLuwr5PoG2/nMP/5BVu6duWE71e+Rg1DLo8yzgdIYmh42GAoj4STegZK+CYZ845RDC rQYtgQOP37DAkhM4z/hYh0e53aeEtfobRCFa8ghcmzfuEf8RtNu24iiIFynAb/zMUkiH kYCX2z53sBjId+fcaT8SYmiVUSFDWapYIY6ssHOzb0j6Nxt8AERGla2aVRVvAGqS2qw4 k+3fdZ8rhPIqT/d7tao8HZ1vlD3f0PLpfT5HsglN+y9rrvP+oarSw1w1/ZaeGCEVsITl azaax/emcAWHv++1KPYKV/I5WVCbHmz+dRd2IR5//f2RN3fu75g+rmmKOhQHrQh1AEeK ToeQ== 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 bc7-v6si4959265plb.310.2018.05.09.09.08.29; Wed, 09 May 2018 09:08:52 -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 S965393AbeEIQHa (ORCPT + 99 others); Wed, 9 May 2018 12:07:30 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965208AbeEIQH2 (ORCPT ); Wed, 9 May 2018 12:07:28 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F8AC8010F67; Wed, 9 May 2018 16:07:27 +0000 (UTC) Received: from redhat.com (ovpn-124-119.rdu2.redhat.com [10.10.124.119]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B01C10B2B48; Wed, 9 May 2018 16:07:24 +0000 (UTC) Date: Wed, 9 May 2018 12:07:23 -0400 From: Jerome Glisse To: Stephen Bates Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Logan Gunthorpe , Alex Williamson , 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" , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , Benjamin Herrenschmidt Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches Message-ID: <20180509160722.GB4140@redhat.com> References: <3584a6ac-95c7-5d23-1859-aee30605776e@deltatee.com> <20180508133407.57a46902@w520.home> <5fc9b1c1-9208-06cc-0ec5-1f54c2520494@deltatee.com> <20180508141331.7cd737cb@w520.home> <20180508205005.GC15608@redhat.com> <7FFB9603-DF9F-4441-82E9-46037CB6C0DE@raithlin.com> <1775CC56-4651-422F-953A-18E024D3717C@raithlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1775CC56-4651-422F-953A-18E024D3717C@raithlin.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 09 May 2018 16:07:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Wed, 09 May 2018 16:07:27 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jglisse@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 09, 2018 at 03:41:44PM +0000, Stephen Bates wrote: > Christian > > > Interesting point, give me a moment to check that. That finally makes > > all the hardware I have standing around here valuable :) > > Yes. At the very least it provides an initial standards based path > for P2P DMAs across RPs which is something we have discussed on this > list in the past as being desirable. > > BTW I am trying to understand how an ATS capable EP function determines > when to perform an ATS Translation Request (ATS TR). Is there an > upstream example of the driver for your APU that uses ATS? If so, can > you provide a pointer to it. Do you provide some type of entry in the > submission queues for commands going to the APU to indicate if the > address associated with a specific command should be translated using > ATS or not? Or do you simply enable ATS and then all addresses passed > to your APU that miss the local cache result in a ATS TR? On GPU ATS is always tie to a PASID. You do not do the former without the latter (AFAICT this is not doable, maybe through some JTAG but not in normal operation). GPU are like CPU, so you have GPU threads that run against an address space. This address space use a page table (very much like the CPU page table). Now inside that page table you can point GPU virtual address to use GPU memory or use system memory. Those system memory entry can also be mark as ATS against a given PASID. On some GPU you define a window of GPU virtual address that goes through PASID & ATS (so access in that window do not go through the page table but directly through PASID & ATS). J?r?me