]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86/tdx: Do VMXON and TDX-Module initialization during subsys init
authorSean Christopherson <seanjc@google.com>
Sat, 14 Feb 2026 01:26:57 +0000 (17:26 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 4 Mar 2026 16:52:59 +0000 (08:52 -0800)
commit165e77353831a85caa0444d16f29bd6b111dd2c5
treee0eb38c5f5e2b801478abd7483426c3fb6b50f8f
parent0efe5dc16169b0c7d47cbb495225065c67712fbc
KVM: x86/tdx: Do VMXON and TDX-Module initialization during subsys init

Now that VMXON can be done without bouncing through KVM, do TDX-Module
initialization during subsys init (specifically before module_init() so
that it runs before KVM when both are built-in).  Aside from the obvious
benefits of separating core TDX code from KVM, this will allow tagging a
pile of TDX functions and globals as being __init and __ro_after_init.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Chao Gao <chao.gao@intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Chao Gao <chao.gao@intel.com>
Tested-by: Sagi Shahar <sagis@google.com>
Link: https://patch.msgid.link/20260214012702.2368778-12-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Documentation/arch/x86/tdx.rst
arch/x86/include/asm/tdx.h
arch/x86/kvm/vmx/tdx.c
arch/x86/virt/vmx/tdx/tdx.c
arch/x86/virt/vmx/tdx/tdx.h