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 EAC0AC072B5 for ; Fri, 24 May 2019 14:12:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD87B206A3 for ; Fri, 24 May 2019 14:12:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403984AbfEXOMj (ORCPT ); Fri, 24 May 2019 10:12:39 -0400 Received: from verein.lst.de ([213.95.11.211]:54200 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403895AbfEXOMj (ORCPT ); Fri, 24 May 2019 10:12:39 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 95BBC227A81; Fri, 24 May 2019 16:12:15 +0200 (CEST) Date: Fri, 24 May 2019 16:12:15 +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: <20190524141215.GB23514@lst.de> References: <97aa52fc-f062-acf1-0e0c-5a4d1d505777@deltatee.com> <20190523094322.GA14986@lst.de> <20190523095057.GA15185@lst.de> <252313a9-9af4-14bd-1bfa-1c2327baf2b2@deltatee.com> <20190523155922.GA21552@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 Fri, May 24, 2019 at 12:40:57PM +0000, Koenig, Christian wrote: > Sounds sane to me as well. > > But since I don't have a struct pages backing my PCI BAR I won't be able > to use pci_p2pdma_map_sg. > > How should we work around that? I think we've got two escalation levels here: (1) fix the NVMe/RDMA p2p breakage for 5.2-rc - for that we just need the above fix in the p2p map_sg routine (and add an unmap_sg routine there) (2) figure out how to handle the switched case for your code. I'm not sure about that yet, and without a struct page we'd have to somehow track the relationship explicitly.