Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp890381rdf; Tue, 21 Nov 2023 22:29:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL2b1Z8FDAIVSwROsXPn+vlClYvkK59vlSR0U11+coLRIemuYqi1/6bKJdGZC4yNZgarAA X-Received: by 2002:a17:90b:3ec7:b0:27d:4901:b0b7 with SMTP id rm7-20020a17090b3ec700b0027d4901b0b7mr1475143pjb.30.1700634549711; Tue, 21 Nov 2023 22:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700634549; cv=none; d=google.com; s=arc-20160816; b=XgOhfAPksd45huSoA7N35Wc4y2MEqRTzRyo8lU0ov2+q/q4H09mT1EMBtawPhpBqWk FlIftcC/vBUSpDZySRezJFaUY8AA4j4NXbTdHo1eQjuKgs+rubvAS5LAwLB8q4y79axC 3rurmpHtECBMQq8TeZ4dMe1c5YAEH1k4CB8IY62tXhnGM37zZkQupmWuDOcYuaLIm1Bv SNOVOTEodU6LQ8kQFLTWWd9UKfcjLE9cxcXY+uxG/Vw+wK3VmUf4rym9uhcFVHQZnZod Ak7Eozm7BnVzP7Uvu0xC9nqvDwc/3ZksGriHVTiBfWWEK1XPFO0av217jvCdtmWxDnye eYFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xtM5w+3ktsUlDXMQVtnpLNAqSOnoIivIrkJOJCkE54I=; fh=Mm4x8s0kdkFkLskapoKGX8JEPv0Fur+alp3vGBcobfw=; b=tpObswXlvXQD762nZeJwr8eRbMf3Q3MAQN3CC++izVjGL40eai9TsJcRm/RrBy/ijK esa+cJftr9kUWfjOwDGFzv4WXCDlidG3irRRIpbb+/GmdpzJsR7H3vaDMcPx7ejDphOb 7Q/gOUoaTaE/av2YnER5tDe+WVYYz3pmnEz0D6lDe1J74J2yjSefSTadQ4aQrJvUnOZE zroxg8zwCqx3s2fZWha15mRhI19wywbW3MKCeMMvztBfDNRgjiWatBjFpORbiRZRaKDx AloGPAud9bu6TQbr56TnxL5sAXKd+tSf0MKnFT7BS3X6VrtiMQ7l3qedWseCR6mwhfhS p/sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="Fe2I/IaA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id nd18-20020a17090b4cd200b00277517b42dasi887210pjb.35.2023.11.21.22.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 22:29:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="Fe2I/IaA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 77EFF812F447; Tue, 21 Nov 2023 22:26:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234785AbjKVG0h (ORCPT + 99 others); Wed, 22 Nov 2023 01:26:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjKVG0f (ORCPT ); Wed, 22 Nov 2023 01:26:35 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09790BB; Tue, 21 Nov 2023 22:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xtM5w+3ktsUlDXMQVtnpLNAqSOnoIivIrkJOJCkE54I=; b=Fe2I/IaAvdwWG+Odxk+6Jev5z3 mK9sa7hFGwb3eVUq2oD7TbGb7hgoYqNv1lUIQA7B9oEqYEdA7jZ3gET9qde5ALtzb3OuNKtvKWEni o2qwzas/AcBnFxN3yaeTlYMG1T7VFZ9CnZPWJdRQxiWxsMbr5KKC1jffOB91ZtG1CEHWFcV/1IYgy 4bx/fnMba/ANB9OlFhprno8GEhWK/gchg0kss9uWMEk4L5iMiT/3nWara2+kiWD/wDuQTE7xclyVN +dq0YYJeGwaDiM6gM3nRzb56eKlxYha4MQob2PkWBTKillzASwWTQQRdBl+sAWzopkMNCaJfilvz4 jufGGghg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r5gga-000q0S-01; Wed, 22 Nov 2023 06:26:08 +0000 Date: Tue, 21 Nov 2023 22:26:07 -0800 From: Christoph Hellwig To: mhklinux@outlook.com Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kirill.shutemov@linux.intel.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, luto@kernel.org, peterz@infradead.org, akpm@linux-foundation.org, urezki@gmail.com, hch@infradead.org, lstoakes@gmail.com, thomas.lendacky@amd.com, ardb@kernel.org, jroedel@suse.de, seanjc@google.com, rick.p.edgecombe@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, linux-hyperv@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 3/8] x86/mm: Remove "static" from vmap_pages_range() Message-ID: References: <20231121212016.1154303-1-mhklinux@outlook.com> <20231121212016.1154303-4-mhklinux@outlook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121212016.1154303-4-mhklinux@outlook.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 22:26:48 -0800 (PST) On Tue, Nov 21, 2023 at 01:20:11PM -0800, mhkelley58@gmail.com wrote: > From: Michael Kelley > > The mm subsystem currently provides no mechanism to map memory pages > to a specified virtual address range. A virtual address range can be > allocated using get_vm_area(), but the only function available for > mapping memory pages to a caller-specified address in that range is > ioremap_page_range(), which is inappropriate for system memory. > > Fix this by allowing vmap_pages_range() to be used by callers outside > of vmalloc.c. I really do not want to expose vmap_pages_range. Please try to come up with a good way to encapsulate your map at a certain address primitive and implement it in vmalloc.c.