[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ea086773fd63441fa14d22636049cc91ff44d35.camel@infradead.org>
Date: Tue, 26 Aug 2025 18:28:17 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Kai Huang <kai.huang@...el.com>, dave.hansen@...el.com, bp@...en8.de,
tglx@...utronix.de, peterz@...radead.org, mingo@...hat.com, hpa@...or.com,
thomas.lendacky@....com
Cc: x86@...nel.org, kas@...nel.org, rick.p.edgecombe@...el.com,
linux-kernel@...r.kernel.org, pbonzini@...hat.com, seanjc@...gle.com,
kvm@...r.kernel.org, reinette.chatre@...el.com, isaku.yamahata@...el.com,
dan.j.williams@...el.com, ashish.kalra@....com, nik.borisov@...e.com,
chao.gao@...el.com, sagis@...gle.com, farrah.chen@...el.com
Subject: Re: [PATCH v7 1/7] x86/kexec: Consolidate relocate_kernel()
function parameters
On Tue, 2025-08-26 at 10:58 +1200, Kai Huang wrote:
> During kexec, the kernel jumps to the new kernel in relocate_kernel(),
> which is implemented in assembly and both 32-bit and 64-bit have their
> own version.
>
> Currently, for both 32-bit and 64-bit, the last two parameters of the
> relocate_kernel() are both 'unsigned int' but actually they only convey
> a boolean, i.e., one bit information. The 'unsigned int' has enough
> space to carry two bits information therefore there's no need to pass
> the two booleans in two separate 'unsigned int'.
>
> Consolidate the last two function parameters of relocate_kernel() into a
> single 'unsigned int' and pass flags instead.
>
> Only consolidate the 64-bit version albeit the similar optimization can
> be done for the 32-bit version too. Don't bother changing the 32-bit
> version while it is working (since assembly code change is required).
>
> Signed-off-by: Kai Huang <kai.huang@...el.com>
> Reviewed-by: Tom Lendacky <thomas.lendacky@....com>
> Reviewed-by: Borislav Petkov (AMD) <bp@...en8.de>
Reviewed-by: David Woodhouse <dwmw@...zon.co.uk>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5069 bytes)
Powered by blists - more mailing lists