]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: TDX: Fold tdx_bringup() into tdx_hardware_setup()
authorSean Christopherson <seanjc@google.com>
Sat, 14 Feb 2026 01:27:02 +0000 (17:27 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 4 Mar 2026 16:53:13 +0000 (08:53 -0800)
commitf630de1f8d70d7e29e12bc25dc63f9c5f771dc59
tree1b7410327e43bd6c753d9853474198b8415de604
parentd30372d0b7e637475c79a785d055f4eb8c863656
KVM: TDX: Fold tdx_bringup() into tdx_hardware_setup()

Now that TDX doesn't need to manually enable virtualization through _KVM_
APIs during setup, fold tdx_bringup() into tdx_hardware_setup() where the
code belongs, e.g. so that KVM doesn't leave the S-EPT kvm_x86_ops wired
up when TDX is disabled.

The weird ordering (and naming) was necessary to allow KVM TDX to use
kvm_enable_virtualization(), which in turn had a hard dependency on
kvm_x86_ops.enable_virtualization_cpu and thus kvm_x86_vendor_init().

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-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/main.c
arch/x86/kvm/vmx/tdx.c
arch/x86/kvm/vmx/tdx.h