From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795794319; b=dOaObYsXXqTvTNwxZWXX/lI9VV6dcKmIEStjZoWsPIwh2pV19apYNy786O3f45JmZ/3E MA3uvDzjCRDfm/8YxgfsaU+KQOIbE/SwqtddQ8lro1FleepdhfDdugj2oVjoL8T9nLcaa pkCtxTDnhJJYgjRDDXp2uvS5vPeoWrflsQTrqEy2yCSSXb0TaOXfwL2mlDAE9Ha8YSsrf fup4zbcUS1OE0izvv+NzPk/8774zftUVFJ7Suj/Rd9XtBGEd2NqNAGh4GwJr4fJ0jE5dC ZjlJVLuhus/4pWXv23SCCK26lzSXOgSuRVWwE6T3NOMzz/WZ9YIbD227Th5TAVlE3VQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795794319; h=Received:DKIM-Signature:Received:Received:X-ME-Sender: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer: MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type:Content-Transfer-Encoding; bh=gnDEMS0iHt15gL5KaJ+Nn57X9otTzk+I58v16QdRYcc=; b=P47NFPmGzXNvpG3H28owtCCgjNtQ/OyFpf1LdCHmSb0JoZjWvMboFJAEbXyeUNIj2m5o AVN6cB9E0u1Zx66OYeT3KZEFhHxkai6fse54FsgwVmIs66peEpAaRtj54qN3PGQD1bCAD HVTiDWeayZeuflovGqw4bbb5lTqHT+8sIx/akk3knJ6LQ96LrFR6j3MHGBuerDwUwQr0w Bq2r/VnmVWAX6mxHflBICoHmFmbVNzse1Esyl3/1HwOji0wL9kSRG1s6ysqEjAIZelM3g qj0EBW+Ix/K6AkBDjnR65Pwb1YCEtwoUApKqfFyS+ycjQb1yKW0iCpTUhOs/MfNCIJg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JB1zssfY; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0535606A326; Fri, 27 Nov 2026 15:45:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JB1zssfY Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1652E1F00893; Fri, 27 Nov 2026 15:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795794319; bh=gnDEMS0iHt15gL5KaJ+Nn57X9otTzk+I58v16QdRYcc=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=JB1zssfYw+imHpGzqwtC5bxeRAT3TilT/4N6aggkc/2aQrIFfSKYPjPnNGrDnNuCD i6Q3iaDTFqGIsVtaIEed0I+jvbQmNjOGY0hNBmtE6voI8JTkFcYDjmfcF92t2aRQN+ ENcGwC6L1Hmee6FlpOuUsmYvSvvIMUcYf885vMlscaWmV719ZBNjtMUuQus6NE4q+1 GuDMExlzxK9s0A0z0wzpLqi6uXoEDtouKh3pCKrlizfJO+Peo0U2usbiuYYHnWVCuf b3Wmdnn8kJMsf1oSSjL+Rjjv+3RkqB2T8knDrwlRloS6lt1DluS9/MFbEx3LpgZ2JN Xe/yFxDspXKbg== Received: from ams-compute-02.internal (ams-compute-02.internal [10.64.2.62]) by mailfauth.ams.internal (Postfix) with ESMTP id 3DDC4198003A; Fri, 27 Nov 2026 10:45:16 -0500 (EST) Received: from ams-imap-11 ([10.64.2.31]) by ams-compute-02.internal (MEProxy); Fri, 27 Nov 2026 10:45:16 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFMcXaa74Ww3Kiq0njNmC6WTjACVv1LMbtEsqeSpRVSFbR/Ii5MZNWGX9Zt0PDC4H QxR9lt1bmXDfrRIrCorv6+5mFL40Wh4Sb/IbRj/BEfQvKKf2rrQS9jZJs2KpQ++T3wSoLD HNqyZ0pThIqEcsGyNXKeRbGfLfgvIjr5ltrRA4kRQMAh57Sv/vW40wLB5ugCQoAwYP+yDn mqcN6PXz8tAquh0HX0rjDTsI5AoO0CDjNZ9dJZhAXhuICxzq9EfL7Fytc6bGOS0h+qgiFD r4m02mBJrAEFL2pn0rfl2R8X7FfezgjnyIqIWsi8BdeUbjGCeYNUokspCipztY5uB13oL4 YuyWH8KtSnS4uQoxE7PMGHY1LlmlFxxm1KE3zJprK9tqrPEVmOck569OEc4Z34p1jVo+q2 3ivF3fonc3VfONZur+ttGBJiQPDOFX7bO7YbRRwS90s8oKkKqrAOSAp+bDHExf7PFpN9/2 MYSpyRRZaH5knqwf1zivHKPr3PkJ8A/L4rbGoWpOAQEudRzQJbmBkT/2j4k+aBm4BxMI8/ 7ie4vqieF2IT3VtbrVvRPx/II5OdY1AE31VoMtNRQFbUR9Jq9KMDKqtqe5GqBnHYYI6KCZ Osa26CLih0vjr119q8j7LlNbXu+EoLzZC+4Ve+yd15O4D/joKlh0TnVomAvg X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id 5658AF80093; Fri, 27 Nov 2026 10:45:12 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Date: Fri, 27 Nov 2026 16:44:51 +0100 From: "Ard Biesheuvel" To: "George Guo" , "Huacai Chen" , "Pratyush Yadav" Cc: "Mike Rapoport" , "Pasha Tatashin" , shuah@kernel.org, "Ilias Apalodimas" , "Andrew Morton" , baoquan.he@linux.dev, ruirui.yang@linux.dev, guodongtai@kylinos.cn, "WANG Xuerui" , "Alexander Graf" , liukexin@kylinos.cn, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-efi@vger.kernel.org Message-Id: <976f1220-a259-4bad-9eb4-ae1cc78a79a7@app.fastmail.com> In-Reply-To: <20261119082252.9120-1-dongtai.guo@linux.dev> References: <20261119082252.9120-1-dongtai.guo@linux.dev> Subject: Re: [PATCH v6 1/8] efi: Pass KHO state to the next kernel in a configuration table Content-Type: text/plain Content-Transfer-Encoding: 7bit On Thu, 19 Nov 2026, at 09:22, George Guo wrote: > Hi Huacai, Ard, Pratyush, > > On Wed, Nov 04 2026, Huacai Chen wrote: >> I prefer to keep it in LoongArch until a second architecture, and I >> think Ard is the same. But this is not a strong objection to Pratyush. > > Kexin Liu and I have tried x86 as the second user, to see whether the > common table holds up. It needed only small changes: > > - The x86 EFI stub installs the table, as the LoongArch stub does. > install_kho_table() moves from efi-stub.c to efi-stub-helper.c so > that the x86 stub can call it. > > - kexec_file_load() skips the SETUP_KEXEC_KHO record when the table > exists and the next kernel will get efi_info. Otherwise, for example > on a legacy BIOS boot or with noefi, it falls back to setup_data. > > - When there is no SETUP_KEXEC_KHO record, the decompressor's KASLR > code looks up the KHO bootmem areas in the table, so the kernel is > not decompressed onto preserved memory. > > The table layout did not change. The only change to the common code is > that efi_kho_table_found() is no longer __init, since x86 calls it at > kexec load time. > > Tested in QEMU on x86_64. With OVMF, the KHO vmtest and > luo_kexec_simple pass, and the second kernel finds the KHO state > through the table. With SeaBIOS, the KHO vmtest passes through > setup_data. > > So I would like to keep the table common in v7. Fair enough. > Would you prefer the > x86 patches in the same series, so that the generic code comes with a > second user, or as a separate series on top? > I'd like to see both tbh, but only if it is not too much of a hassle.