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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 3807DC2BB55 for ; Thu, 16 Apr 2020 18:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B30620786 for ; Thu, 16 Apr 2020 18:30:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587061839; bh=Lt/pr9RUNCAhA4FWaQWoD76BQNIpHIliCCImnMJ+tNQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=EO5Kjx1GlKaT1i1Lx7geonNUg0Z00xVbSh+Eo42E7N+c5DCUibafOX1VXhq3ZcUxr Y3dBiwapgqsXhnHHTXykIS+MnU4wkCcN1JB2ExBi4abT2xcWhY6Mp44jVDT3n5sLKh x+SgsK/cMvOtcBNv8tgrmUFSGmG2icvxZNGHKsI4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729173AbgDPSai (ORCPT ); Thu, 16 Apr 2020 14:30:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbgDPSah (ORCPT ); Thu, 16 Apr 2020 14:30:37 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6267B206D5; Thu, 16 Apr 2020 18:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587061837; bh=Lt/pr9RUNCAhA4FWaQWoD76BQNIpHIliCCImnMJ+tNQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=15OkUaHDH7FNWi9y+07XY+2iySWVC9dsUZ9r/2m3qRE17oG3C7gjRZJBD9LpW2OO6 NCWhnCE5v4o4S9aov08Epy/tmxI2wYm22cvjJY3UuyijtXe/36VYjvDfztO83S0Zr7 pMo/fGqiR8+eyndZgWbRhYH6XIAjO4JJUdTc0/+A= Date: Thu, 16 Apr 2020 21:30:33 +0300 From: Leon Romanovsky To: Jason Gunthorpe Cc: Jianxin Xiong , linux-rdma@vger.kernel.org, Doug Ledford , Sumit Semwal Subject: Re: [RFC PATCH 1/3] RDMA/umem: Support importing dma-buf as user memory region Message-ID: <20200416183033.GI1309273@unreal> References: <1587056973-101760-1-git-send-email-jianxin.xiong@intel.com> <1587056973-101760-2-git-send-email-jianxin.xiong@intel.com> <20200416180201.GH1309273@unreal> <20200416180407.GV5100@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200416180407.GV5100@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Thu, Apr 16, 2020 at 03:04:07PM -0300, Jason Gunthorpe wrote: > On Thu, Apr 16, 2020 at 09:02:01PM +0300, Leon Romanovsky wrote: > > > > diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig > > > index ade8638..1dcfc59 100644 > > > +++ b/drivers/infiniband/Kconfig > > > @@ -63,6 +63,16 @@ config INFINIBAND_ON_DEMAND_PAGING > > > memory regions without pinning their pages, fetching the > > > pages on demand instead. > > > > > > +config INFINIBAND_DMABUF > > > > There is no need to add extra config, it is not different from any > > other verbs feature which is handled by some sort of mask. > > That works too, but then it infiniband_user_mem needs the > depends on DMABUF || !DMABUF construct IS_REACHABLE() ? :) > > > > + if (access & IB_ACCESS_ON_DEMAND) > > > + return ERR_PTR(-EOPNOTSUPP); > > > > Does dma-buf really need to prohibit ODP? > > ODP fundamentally can only be applied to a mm_struct Right, I forgot about it, thanks. > > Jason