Re: [RFC PATCH] x86/virt/tdx: Disable KEXEC in the presence of TDX

From: Nikolay Borisov
Date: Thu Jan 18 2024 - 19:55:45 EST




On 19.01.24 г. 2:52 ч., Huang, Kai wrote:
On Fri, 2024-01-19 at 02:49 +0200, Nikolay Borisov wrote:
[Adding Kirill as he has a series in flight about KEXEC]

On 18.01.24 г. 23:31 ч., Huang, Kai wrote:
On Thu, 2024-01-18 at 18:01 +0200, Nikolay Borisov wrote:
TDX doesn't currently support kexec so disable the latter when TDX
is detected at boot time. If kexec must absolutely be supported then
TDX can be disabled from the bios.

Making this decision at run time rather than as a compile time option
allows distribution kernels to have both enabled and delegate to the
user whether they want to use TDX/Kexec.

Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>

Hi Nikolay,

Thanks for the patch.

I am working in progress on patches to make kexec() work with TDX. I plan to
send them out soon (e.g., next week), but I think perhaps your patch is
reasonable before that is merged.

I thought Kirill's series rectifies this ?


No that's for TDX guest.

Well in this case shouldn't INTEL_TDX_GUEST also be gated on KEXEC_CORE being inoperable either via Kconfig option or via a similar approach to this one (if it's accepted)?