Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1374843ybl; Sun, 18 Aug 2019 02:09:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBOuwR8UjaDZReIa8yYGasHnlHcIg8xIbeH0+7IhvJAjjAshW1fRdfW0k9stNzPzpMTO1c X-Received: by 2002:a65:5c4b:: with SMTP id v11mr15258301pgr.62.1566119365898; Sun, 18 Aug 2019 02:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566119365; cv=none; d=google.com; s=arc-20160816; b=1EUJqFPblzaAZSwXtJwkX8u5KBOixjHG7nYFK0495DyWiKNTiqTVfm9hATQkca2xFK oUX2CQIsoEZTmc4ANN9lj+50SSFBLrePz2J2XiuwwEWC/QHX0aZhpgmNr/uZqGa0kWGl xn1e4maPVAg81MoiE/JJJcWPR9/KBaCLcs6zRN+YJysv6i8OWw05N9dMjrBz/qImx7kZ EotqlMo/GhTN4Zv4g4IMwChtI26Se88xvaoN/OJz2NdMr4mriCWlx9QoiBnMUfUCw3Zh qLOz/yQJ+8Sj4x/qVOG5UB9F8pC/n3wrT6739FYoeYBzdQV+8XaSP3VopTdKL48ePUyE JTIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=e+O2aoiz2diKfBtl4/embp/7xoIG/bN4LQJcAaqtku4=; b=JnzeSCHrX2SiGlo5fzkEGpC8ij3R//jUwY+VnK3KE7dOCuFAjtBcU77lRjhrE9dlRu CCPdtgx+6DBY107GmC7pcrQckIToN5spDV3GfwbZYfnPUP+ymvG6cSzneY62AteA4FK6 +rvSdvf0rdFt5JgwosIE3gGkY4P25Dm/eBFDawzSXCwbjMyRKUw7/xc7S0PNv4YgJkDB rTb8965GjnuiTcrc2kaNJAD06kMPU8EobNjbKJRJpPbc702hL8q8t2YZIjZwJEROq/i4 n6f0EF193Af/6pabxjk8HwhVC9+xtAkBA+TrIyYUrPAoIdgwkHoPP8uxe24APOmjX4+x A4Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ur9iGQGu; 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 t13si8047031pfh.245.2019.08.18.02.09.11; Sun, 18 Aug 2019 02:09:25 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ur9iGQGu; 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 S1726384AbfHRJIS (ORCPT + 99 others); Sun, 18 Aug 2019 05:08:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59394 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbfHRJIS (ORCPT ); Sun, 18 Aug 2019 05:08:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=e+O2aoiz2diKfBtl4/embp/7xoIG/bN4LQJcAaqtku4=; b=ur9iGQGu6Vzub7Y28WrS1GrmE h2bcrFZdf+/QZFVZSFVD5pMssp6nEp/2wEareZZi0Ai57s+tDhJWb2pJZ/gXZEW5tQCanP7WCM0O7 Y11YAjqCGerBkBuJg2AAMLD9Ba4lGzNm455GLTzqZ1HGKUOPUBORPcRvRaED42z3W26iZnqQ+V7c0 h1RRlLhQ4mX3tM8momBg/QozzGt19/KJjfIFDyD598N88YXl2cVT2knYNo//MyXcWc/N3JX9pmGqa E6lXYnUKANKf3rBlJrXDedPP34cNwckV3gfAtnQ5FG/x7olCrhEX1E4AJJssD39b0qgF6uLUMy4NR j0DPXbc3g==; Received: from 213-225-6-198.nat.highway.a1.net ([213.225.6.198] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hzHAX-0004ow-3h; Sun, 18 Aug 2019 09:08:09 +0000 From: Christoph Hellwig To: Dan Williams , Jason Gunthorpe Cc: Bharata B Rao , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: add a not device managed memremap_pages v3 Date: Sun, 18 Aug 2019 11:05:53 +0200 Message-Id: <20190818090557.17853-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan and Jason, Bharata has been working on secure page management for kvmppc guests, and one I thing I noticed is that he had to fake up a struct device just so that it could be passed to the devm_memremap_pages instrastructure for device private memory. This series adds non-device managed versions of the devm_request_free_mem_region and devm_memremap_pages functions for his use case. Changes since v2: - improved changelogs that the the v2 changes into account Changes since v1: - don't overload devm_request_free_mem_region - export the memremap_pages and munmap_pages as kvmppc can be a module