Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3887952ybl; Mon, 12 Aug 2019 08:01:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5BSECCe95rI03J2O4+xlRsrNJUwuI39FVjpolZa/KFQ1bYuhZzK829dsO6c+Go0tf3hrI X-Received: by 2002:aa7:9a5a:: with SMTP id x26mr6542564pfj.47.1565622094588; Mon, 12 Aug 2019 08:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565622094; cv=none; d=google.com; s=arc-20160816; b=jARf3gn9QOj5VtUdBW4ikYLoF6OfRbbd/cmghynRsldo81KZzwSIBTkrxHq6pmPciF 5mKMTIHudjoITi5dS4cz6MncWIXudf/c86wVX2BR9Qsno6wA5IoZbvFOyCWFoqsilEBp dD/9qIbVlOpm0r7ZP6k3gw77tfVWSqiBSgKd2c8WmgqeOh6VtlkLLsYLpx9aaZTazlCI fXMBLHXJJj/yibC2g8j6mZO49OfzY3QSXpC7BYy7n6C6LJ6ircXmiKSm7k3sRHnLAux2 A9N42H3Gvw0eZN1oloecmcNcnFj61KJ5nN2qdtU2ZTjVfJOEG3TOy7IsrRTgdLXnRTv6 kSGA== 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=uXWNWk0TEme5Fc/djI3osRya7vpL0+tioCa+G4YkH6A=; b=PPoiihK/xEo+nl0Z2LVI4HAYHFi0NsCoKKug3CTm7v3G7YJM6fE7IHaZTXyQwoTY6y YhVvwbFc0h7Pu7s07RDZZ65dz79+ypUGK8JmY0/Dpj1CMCwG423KbEdwIvYttccUicou UXXa+iwybEo8ZlzFd+S6Nw5JYG5TKp7i/ScnzXBlO2XXovWIIlHJAqPJlEJLh/un6uLN Pe2tkZrNXZWRwoTkMvozuvKV6Q5uAtYhBW/ZjmvYCd8cE+LfWzMnilIaxTH7kWGZBOvW 5JSwGV4NXAiHhotIldeVQ/1Yqa1TMEoNBYGBW+eCD7jEkByjw0k3Nr/7BeU1xwnjv4Wj n1VQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 131si58231568pgf.597.2019.08.12.08.01.18; Mon, 12 Aug 2019 08:01:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbfHLPAS (ORCPT + 99 others); Mon, 12 Aug 2019 11:00:18 -0400 Received: from verein.lst.de ([213.95.11.211]:49045 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbfHLPAR (ORCPT ); Mon, 12 Aug 2019 11:00:17 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 96323227A81; Mon, 12 Aug 2019 17:00:12 +0200 (CEST) Date: Mon, 12 Aug 2019 17:00:12 +0200 From: Christoph Hellwig To: Bharata B Rao Cc: Christoph Hellwig , Dan Williams , Jason Gunthorpe , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: Re: [PATCH 5/5] memremap: provide a not device managed memremap_pages Message-ID: <20190812150012.GA12700@lst.de> References: <20190811081247.22111-1-hch@lst.de> <20190811081247.22111-6-hch@lst.de> <20190812145058.GA16950@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190812145058.GA16950@in.ibm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 12, 2019 at 08:20:58PM +0530, Bharata B Rao wrote: > On Sun, Aug 11, 2019 at 10:12:47AM +0200, Christoph Hellwig wrote: > > The kvmppc ultravisor code wants a device private memory pool that is > > system wide and not attached to a device. Instead of faking up one > > provide a low-level memremap_pages for it. Note that this function is > > not exported, and doesn't have a cleanup routine associated with it to > > discourage use from more driver like users. > > The kvmppc secure pages management code will be part of kvm-hv which > can be built as module too. So it would require memremap_pages() to be > exported. > > Additionally, non-dev version of the cleanup routine > devm_memremap_pages_release() or equivalent would also be requried. > With device being present, put_device() used to take care of this > cleanup. Oh well. We can add them fairly easily if we really need to, but I tried to avoid that. Can you try to see if this works non-modular for you for now until we hear more feedback from Dan?