]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/virt/tdx: Drop the outdated requirement that TDX be enabled in IRQ context
authorSean Christopherson <seanjc@google.com>
Sat, 14 Feb 2026 01:26:56 +0000 (17:26 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 4 Mar 2026 16:52:55 +0000 (08:52 -0800)
commit0efe5dc16169b0c7d47cbb495225065c67712fbc
tree53f42a27cb476164307a2f9686a59654c428fa49
parent8528a7f9c91d917ad2b3b6a71f1cb7e00b1fb1bf
x86/virt/tdx: Drop the outdated requirement that TDX be enabled in IRQ context

Remove TDX's outdated requirement that per-CPU enabling be done via IPI
function call, which was a stale artifact leftover from early versions of
the TDX enablement series.  The requirement that IRQs be disabled should
have been dropped as part of the revamped series that relied on a the KVM
rework to enable VMX at module load.

In other words, the kernel's "requirement" was never a requirement at all,
but instead a reflection of how KVM enabled VMX (via IPI callback) when
the TDX subsystem code was merged.

Note, accessing per-CPU information is safe even without disabling IRQs,
as tdx_online_cpu() is invoked via a cpuhp callback, i.e. from a per-CPU
thread.

Link: https://lore.kernel.org/all/ZyJOiPQnBz31qLZ7@google.com
Tested-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Sagi Shahar <sagis@google.com>
Link: https://patch.msgid.link/20260214012702.2368778-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/tdx.c
arch/x86/virt/vmx/tdx/tdx.c