Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1395194imm; Fri, 11 May 2018 15:56:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrxvdZc+4z/KFSHRVsHTorDO7kqRF3s6mkNP+o29LehONwFkPgjTxW2ciWZ/Q5V21lUOYLx X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr7316373plo.391.1526079374291; Fri, 11 May 2018 15:56:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526079374; cv=none; d=google.com; s=arc-20160816; b=w0SETQt0ncDO16MeluTaj4skXN6rbtnRc9ZvIIq8pB9HKM9dJ2eV1aN8PLzmGNiVPN G5X8wr1XpK8kwxyNV+OPGL0IHD2ZOHINK6lj/RISCgoNzdrWYHemcJHlPU8YHOM4FIfx 1/9oCd17Hn8ExvY9OfibuxbSK2KlTWxUL4hvjKWwbRsgtzDviYuY2Im85XE48iecFl+i QVl5bfE/NonsUqXr+kvuhp3RdxrIFH8ycHgyniarCKnUhvDvFAUrX2RCfkdmu0/QtbiP tariG1sWq6g3p7iRjO1ydWdBWThrldL+FWg56lTQD26IwlEToOlEowhE7RJpQGvXxOf+ f//Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=Thj0y7tSSQRRrvd8D/vA+08hJHLKzRg5o9B25Rq+v+0=; b=pJkA2PwlK0RG3WrqrSHzsIRMUTEfT86wcytsYIPHh05ym8heSGQ9OqVA+TSmezZ0jZ YtCnBcNWVTsqwl6nWKTfv90UV8RULix6ep/5juYsJDFRltePWUtke0SfHmfK5DPEMWNI cL2aaNVt0Gkx4upmFjpmHaeHBNW5MwWuw0++e6IIZKj3pHfhAflEU9ji11N2fMPg8Wrm m6yFHHjiMTapgIziTHaGTiTPpXiIX1nOqY8NRgopqrQN7BEUmrNHIYvsnkmEryFbeFsR FWiHGf3V9AsrfYjGlSixMFpgF9PXjFzXkck38EGIrizEjZdH1xu2fIPLwYgxtECL+eRm THEw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5-v6si3164942pgo.12.2018.05.11.15.55.45; Fri, 11 May 2018 15:56:14 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbeEKWzf (ORCPT + 99 others); Fri, 11 May 2018 18:55:35 -0400 Received: from ale.deltatee.com ([207.54.116.67]:57334 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217AbeEKWzd (ORCPT ); Fri, 11 May 2018 18:55:33 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fHGwc-0001es-31; Fri, 11 May 2018 16:55:22 -0600 To: Stephen Bates , =?UTF-8?Q?Christian_K=c3=b6nig?= , Jerome Glisse Cc: Jens Axboe , Keith Busch , "linux-nvdimm@lists.01.org" , "linux-rdma@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-block@vger.kernel.org" , Alex Williamson , Jason Gunthorpe , Bjorn Helgaas , Benjamin Herrenschmidt , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig References: <20180423233046.21476-5-logang@deltatee.com> <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> <4e0d0b96-ab02-2662-adf3-fa956efd294c@deltatee.com> <2fc61d29-9eb4-d168-a3e5-955c36e5d821@amd.com> <94C8FE12-7FC3-48BD-9DCA-E6A427E71810@raithlin.com> <868B49CE-4F0E-4A48-BE78-12149F85F1A4@raithlin.com> <8113cba8-62b9-1801-7a77-f82be223b183@deltatee.com> <53fa38ce-40dd-6bc1-9b83-c6ccf228b755@deltatee.com> From: Logan Gunthorpe Message-ID: Date: Fri, 11 May 2018 16:55:11 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: hch@lst.de, maxg@mellanox.com, bhelgaas@google.com, benh@kernel.crashing.org, helgaas@kernel.org, jgg@mellanox.com, alex.williamson@redhat.com, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, keith.busch@intel.com, axboe@kernel.dk, jglisse@redhat.com, christian.koenig@amd.com, sbates@raithlin.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/11/2018 4:24 PM, Stephen Bates wrote: > All > >>  Alex (or anyone else) can you point to where IOVA addresses are generated? > > A case of RTFM perhaps (though a pointer to the code would still be appreciated). > > https://www.kernel.org/doc/Documentation/Intel-IOMMU.txt > > Some exceptions to IOVA > ----------------------- > Interrupt ranges are not address translated, (0xfee00000 - 0xfeefffff). > The same is true for peer to peer transactions. Hence we reserve the > address from PCI MMIO ranges so they are not allocated for IOVA addresses. Hmm, except I'm not sure how to interpret that. It sounds like there can't be an IOVA address that overlaps with the PCI MMIO range which is good and what I'd expect. But for peer to peer they say they don't translate the address which implies to me that the intention is for a peer to peer address to not be mapped in the same way using the dma_map interface (of course though if you were using ATS you'd want this for sure). Unless the existing dma_map command's notice a PCI MMIO address and handle them differently, but I don't see how. Logan