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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 8D947C43382 for ; Thu, 27 Sep 2018 17:10:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4903A20666 for ; Thu, 27 Sep 2018 17:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4903A20666 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-pci-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728067AbeI0X3Y (ORCPT ); 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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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