From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A46636BCD5 for ; Tue, 24 Feb 2026 09:30:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771925422; cv=none; b=oFuCw0DOJmdmFHTNFHjRa6d9W1iUCajyt7nPjMwbDDApZJs6kt5z+BvSNH4lGSLvNIHB4r5n/DFsgRFTXCAjZD7qf+e1A137AlZacm8W/iAvRrC2O4BW9bPUPLgfIfCX5dWFAOr4ohgo7pCIy0rXlqQBnZG5jCTNhbsQSZ+FMYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771925422; c=relaxed/simple; bh=jbUHpcYlvb7oVyQJFkV28djZCHiGr4saQLNVfd4W5R4=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=tkPXjFvldvi3Jic8ycJ+U5uMwMh7IO5+U7mOYLuzxNqOm25Gukm84LTfr1y32fZP/CN+1NGZWGwSghR3CHJ9tjK1j+xqNqPEQ9XKTSvJ13G3yCrbOS7o3WQqSHOhLEkxK//AyKZZ+kzorZmc+v4LABgEgyJrMCaBn5jIcs1Fa3s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=knq0yBl/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="knq0yBl/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFC16C2BC86; Tue, 24 Feb 2026 09:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771925422; bh=jbUHpcYlvb7oVyQJFkV28djZCHiGr4saQLNVfd4W5R4=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=knq0yBl/b9+RxkrojcdaA400AQwDSi0RQp8m5WGlP44MhqbXdgnq5RV3Nd2eIbHQW rEQzqLCM0VPOIvbi6Xhr2tufGlvFZ4G8PEXiOa3TkW+gvG03Rc7nnoqKoasYz7uI7n YrqgxN4M5a691hH87KsXMvtmVQGgYr93i2wQfC/0lVxM+Fb/lvNGo96reCTrlloPIQ 7L41Yj/Ji08V9vEcl7uIxBaZiTlJkPWprFudC+MOXErGreyIej5GqcEpKr8UeitJdl qUTtnuX38jOXmeTCTZT9Tsbas/wW50e0FnijMfB1cdwNOp8sCzP0+TBivDjJj4h1WY 1abvZ9nYLO3rA== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id C6939F4006B; Tue, 24 Feb 2026 04:30:20 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Tue, 24 Feb 2026 04:30:20 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvfeelkedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrugcu uehivghshhgvuhhvvghlfdcuoegrrhgusgeskhgvrhhnvghlrdhorhhgqeenucggtffrrg htthgvrhhnpedvueehiedtvedtleekuddutefgffdtleetfeetveejveejieehfefhjeei jeefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieejtdehtddtjeel qdeffedvudeigeduhedqrghruggspeepkhgvrhhnvghlrdhorhhgseifohhrkhhofhgrrh gurdgtohhmpdhnsggprhgtphhtthhopedufedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepsghpsegrlhhivghnkedruggvpdhrtghpthhtohepsggvnhhhsehkvghrnhgvlh drtghrrghshhhinhhgrdhorhhgpdhrtghpthhtoheprhhpphhtsehkvghrnhgvlhdrohhr ghdprhgtphhtthhopehtghhlgieskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepgiekie eskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqmhhmsehkvhgrtghkrdho rhhgpdhrtghpthhtohepihhlihgrshdrrghprghlohguihhmrghssehlihhnrghrohdroh hrghdprhgtphhtthhopegurghvvgdrhhgrnhhsvghnsehlihhnuhigrdhinhhtvghlrdgt ohhmpdhrtghpthhtohepmhhinhhgohesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id A1156700065; Tue, 24 Feb 2026 04:30:20 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AF0NZ4OlJH_7 Date: Tue, 24 Feb 2026 10:29:59 +0100 From: "Ard Biesheuvel" To: "Mike Rapoport" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, "Benjamin Herrenschmidt" , "Borislav Petkov" , "Dave Hansen" , "Ilias Apalodimas" , "Ingo Molnar" , "H . Peter Anvin" , "Thomas Gleixner" , linux-efi@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org Message-Id: <3a01d817-e08c-45ec-b5a7-4a8d9ecd0fc6@app.fastmail.com> In-Reply-To: References: <20260223075219.2348035-1-rppt@kernel.org> Subject: Re: [PATCH] x86/efi: defer freeing of boot services memory Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, 24 Feb 2026, at 10:28, Mike Rapoport wrote: > On Mon, Feb 23, 2026 at 01:18:41PM +0100, Ard Biesheuvel wrote: >> On Mon, 23 Feb 2026, at 12:40, Mike Rapoport wrote: >> > On Mon, Feb 23, 2026 at 12:17:22PM +0100, Ard Biesheuvel wrote: >> >> >> >> > I wasn't sure it's Ok to only unmap them, but leave in efi.memmap, that's >> >> > why I didn't use the existing EFI memory map. >> >> > >> >> > Now thinking about it, if the unmapping can happen later, maybe we'll just >> >> > move the entire efi_free_boot_services() to an initcall? >> >> >> >> As long as it is pre-SMP, as that code also contains a quirk to allocate >> >> the real mode trampoline if all memory below 1 MB is used for boot >> >> services. >> > >> > initcall is long after SMP. It the real mode trampoline allocation is the >> > only thing that should happen pre-SMP? >> >> early_initcall() should be early enough, those run before SMP init. > > I don't think so. All initcalls run quite late in boot, early ones just run > before the others. > It is documented as running before SMP. If that is no longer true, we should fix the documentation.