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 B370D24C676 for ; Thu, 19 Feb 2026 07:21:53 +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=1771485713; cv=none; b=BPG6PPix3ciMUZ7Od5nEKSAh1QPqjuDWRaN4YLO1KfmUhM463yB2L4FeVv9Hd4Y0iLW0cHrIeyW/yYCoNkrxMuo7241ez0ErTzXq2Je6ymPRdd6h8h1fjFqcIDW98NXHv/7aQXcVFyvSFArLjwmlpwPd44804z2RxLw5arzuUoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771485713; c=relaxed/simple; bh=Ou7ySdIQWXiWriFhR45WVSxPkt1Uy+MKznyhuxQi4Xw=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=OEAjop4soH/K/oLbN6Cjs95ibE5TlLSa23mTNnQcKQ1X1QjIUuegBr4F1LdN0h1dEKIgjYtLnUS8VMGZwDkfJFF/MGKtopIdrI4JnJdJm8wMjgc/gUkvrYDKl5zP8QCMcmPaP/yJwLqSvCCTTmm1FD2kBZOmVxLSF1o8BzKYoQI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J026NxZ/; 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="J026NxZ/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36B4CC4CEF7; Thu, 19 Feb 2026 07:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771485713; bh=Ou7ySdIQWXiWriFhR45WVSxPkt1Uy+MKznyhuxQi4Xw=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=J026NxZ/M+/EY78DJPC9oteKnlkywHGpZhT671e9QNUAp+tvHhYlMs/pbboHp0bCO +ReP64FhPe8tCYDftBv8x8Y9+jFp+OqkUo+GCRpZQs5V6X3E0AXchT3AZH19eq9w2i enPwafPewNppXqONfa8nMQufAEErHKDK1z0bO2tHWT6JSUKaSmNiz++UUdfEY5Iv3a 0b9XYtMm9pyQjsGjjk2DwdzoHXWDdTX599GeRCn7cZ/wJxvVpCzvg2O1+YZfnHn1j7 MeMswB3HHYO07dOLVl5tX9Dj6mfjsv+XSj3yAsryloUkLilFcJ4Sqel1lJmupNKVhN ZqMfVs4dtI4TA== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 05773F40068; Thu, 19 Feb 2026 02:21:52 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Thu, 19 Feb 2026 02:21:52 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvvdegleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrugcu uehivghshhgvuhhvvghlfdcuoegrrhgusgeskhgvrhhnvghlrdhorhhgqeenucggtffrrg htthgvrhhnpedvueehiedtvedtleekuddutefgffdtleetfeetveejveejieehfefhjeei jeefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieejtdehtddtjeel qdeffedvudeigeduhedqrghruggspeepkhgvrhhnvghlrdhorhhgseifohhrkhhofhgrrh gurdgtohhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphht thhopeigkeeisehkvghrnhgvlhdrohhrghdprhgtphhtthhopehkvgigvggtsehlihhsth hsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepugihohhunhhgsehrvgguhhgr thdrtghomhdprhgtphhtthhopehlihhnuhigqdgvfhhisehvghgvrhdrkhgvrhhnvghlrd horhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghl rdhorhhg X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id CB2AF700065; Thu, 19 Feb 2026 02:21:51 -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: AR4vd3DIDa3F Date: Thu, 19 Feb 2026 08:21:30 +0100 From: "Ard Biesheuvel" To: "Dave Young" Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, x86@kernel.org Message-Id: <7c10262c-b320-4e80-b92b-107b693a928f@app.fastmail.com> In-Reply-To: References: <824bf9d5-93d3-4791-a064-3852014a1264@app.fastmail.com> <61f0c9ad-a435-4856-8ebe-d5a81f72330e@app.fastmail.com> <665dc599-8488-4761-b3c3-07b994cb82b8@app.fastmail.com> Subject: Re: [PATCH] efi/x86-stub: store acpi_rsdp_addr in bootparams Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, 19 Feb 2026, at 07:57, Dave Young wrote: > Hi Ard, > >> Actually, looking at that code more closely, I kind of wonder why the kexec code tests for EFI_RUNTIME_SERVICES to begin with. Perhaps it might be sufficient to do this: >> >> diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c >> index c3244ac680d1..bec91ee7e668 100644 >> --- a/arch/x86/kernel/kexec-bzimage64.c >> +++ b/arch/x86/kernel/kexec-bzimage64.c >> @@ -192,7 +192,7 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr, >> struct efi_info *current_ei = &boot_params.efi_info; >> struct efi_info *ei = ¶ms->efi_info; >> >> - if (!efi_enabled(EFI_RUNTIME_SERVICES)) >> + if (!efi_enabled(EFI_MEMMAP)) >> return 0; >> >> if (!current_ei->efi_memmap_size) >> >> That way, if the first kernel was booted via EFI but without runtime services enabled, the kexec'ed kernel will simply inherit the ACPI and EFI tables. > > Actually it does not work, EFI_MEMMAP is unset in function > efi_memmap_unmap() when runtime is disabled, so nodifference for > checking EFI_MEMMAP or EFI_RUNTIME_SERVICES bits. > > The x86 kexec efi code is simply written to assume EFI runtime is > enabled as it copies the cooked runtime service mem ranges in memmap. > If we want to improve it I suspect the efi initialization code could > need changes, and then even if first kernel disabled runtime, the > kexec 2nd kernel still have chance to enter virtual mode to enable > runtime. But this does requires more work to be done. > Yeah, fixing that seems a bit risky, and not really worth the reward.