From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18A9CC282DD for ; Thu, 23 May 2019 09:51:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFC5B20862 for ; Thu, 23 May 2019 09:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729972AbfEWJvV (ORCPT ); Thu, 23 May 2019 05:51:21 -0400 Received: from verein.lst.de ([213.95.11.211]:45578 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729698AbfEWJvV (ORCPT ); Thu, 23 May 2019 05:51:21 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 1B04968B05; Thu, 23 May 2019 11:50:58 +0200 (CEST) Date: Thu, 23 May 2019 11:50:57 +0200 From: Christoph Hellwig To: "Koenig, Christian" Cc: Christoph Hellwig , Logan Gunthorpe , "linux-pci@vger.kernel.org" , Bjorn Helgaas Subject: Re: [PATCH] PCI/P2PDMA: Root complex whitelist should not apply when an IOMMU is present Message-ID: <20190523095057.GA15185@lst.de> References: <97aa52fc-f062-acf1-0e0c-5a4d1d505777@deltatee.com> <20190523094322.GA14986@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, May 23, 2019 at 09:48:40AM +0000, Koenig, Christian wrote: > I don't adjust the address manually anywhere. I just call > dma_map_resource() and use the resulting DMA address to access the other > devices PCI BAR. > > At least on my test system (AMD CPU + AMD GPUs) this seems to work > totally fine. Currently trying to find time and an Intel box to test it > there as well. The problem shows up if pci_bus_address() returns a different address than pci_resource_start(), should be easy to check if that happens. IIRC it is something mostly seen on embedded SOCs.