Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2281799imm; Thu, 27 Sep 2018 10:10:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV62aaOgirxMPO0T9SrYeSf3MH/3ku3vHWwglo3Oa/CNOjIhgA5tyQSCgkBDB2i+7EmffZ8Ph X-Received: by 2002:a62:8d84:: with SMTP id p4-v6mr12503256pfk.251.1538068247852; Thu, 27 Sep 2018 10:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538068247; cv=none; d=google.com; s=arc-20160816; b=RdwtB8oX4Zt/SZLGDGSB2UKUtSWRc+9ewacOkQJheEpKot1GOv5Z6IeSDOZgwuJTVp //0lkmik5yIU3bju/dmfZBkAJzZBwv0XyFaPIzkg/c1XpKdc0NRV08smdiut0CVAOkhv +akGo+5JJrgsZ+P1JmaXFh4frO1JWfSozoCM9QLOT8I8El4wdOK4fuE7uGvpQHYXExW0 S0WlduxMYArmstHgl8uV0zrmhF0NeS1xtZeueqTwFqvczZp7YqnxUWu3KoHvyFOKtKKH MDpO2hQn2q9BtkiewwaILD3VYd9buAyIPW9xe3KBfxrkQOyJyuTzEGQOLdj7a/3Nwi4W +HtA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2Hlfd7oHRwyEj+3I/j6tWGUR7fDJqpxn01JdyBhDLPk=; b=nZ93HmlOzvXj7ccX5MU5ntfX84AIaRe8BYN6UXlbqXio23gXzp92xbzQrUCRnuZgo8 y39Jfzgi9cLYadZwqW+QVMWnoAlUJ9Sq8MAITmiVqIxcgU+CXl9s4k4WnCouDmRKN/Ny 9bEHMvT4wbrHIAEblIiEwnv+lM/05+7fNbR8YYfHC3jYu2FJX1aJb8BD/oLlpQ8ysL63 N4/bHErbTJVjzkbt891gOzSk54Bg37HuCggIlEwbqV3ggG/QXPITdtqY+BFP+/16ypCL FJPQfKpipltEIK7dQDf3Y3Dbl51YY81+4hguW4h2VvGuZimp+JKx4b/ziD7cqhbKj14Q iDZw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66-v6si2490825pgg.383.2018.09.27.10.10.31; Thu, 27 Sep 2018 10:10:47 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728422AbeI0X3Y (ORCPT + 99 others); Thu, 27 Sep 2018 19:29:24 -0400 Received: from mga18.intel.com ([134.134.136.126]:28462 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728062AbeI0X3Y (ORCPT ); Thu, 27 Sep 2018 19:29:24 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2018 10:10:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,311,1534834800"; d="scan'208";a="94398798" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga001.jf.intel.com with ESMTP; 27 Sep 2018 10:08:04 -0700 Date: Thu, 27 Sep 2018 11:10:13 -0600 From: Keith Busch To: Logan Gunthorpe Cc: 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, Jens Axboe , Christian =?iso-8859-1?Q?K=F6nig?= , Benjamin Herrenschmidt , Alex Williamson , =?iso-8859-1?B?Suly9G1l?= Glisse , Jason Gunthorpe , Bjorn Helgaas , Max Gurtovoy , Christoph Hellwig Subject: Re: [PATCH v8 09/13] nvme-pci: Use PCI p2pmem subsystem to manage the CMB Message-ID: <20180927171013.GC19589@localhost.localdomain> References: <20180927165420.5290-1-logang@deltatee.com> <20180927165420.5290-10-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927165420.5290-10-logang@deltatee.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 10:54:16AM -0600, Logan Gunthorpe wrote: > Register the CMB buffer as p2pmem and use the appropriate allocation > functions to create and destroy the IO submission queues. > > If the CMB supports WDS and RDS, publish it for use as P2P memory > by other devices. > > Kernels without CONFIG_PCI_P2PDMA will also no longer support NVMe CMB. > However, seeing the main use-cases for the CMB is P2P operations, > this seems like a reasonable dependency. > > We drop the __iomem safety on the buffer seeing that, by convention, it's > safe to directly access memory mapped by memremap()/devm_memremap_pages(). > Architectures where this is not safe will not be supported by memremap() > and therefore will not be support PCI P2P and have no support for CMB. > > Signed-off-by: Logan Gunthorpe Looks good to me. Reviewed-by: Keith Busch