[PATCH 0/3] KVM: VMX: Initialize TDX when loading KVM module

From: Kai Huang
Date: Mon Oct 28 2024 - 09:20:41 EST


Hi Paolo/Sean,

This series contains patches to initialize TDX when loading KVM module.
This series is based on the discussion with Sean on the v19 patchset
[*], hoping it has addressed most (if not all) comments.

This series has been in our internal TDX tree for long time and has been
in kvm-coco-queue for some time thus it has been tested.

The main purpose for sending out is to have a review but this series can
also be applied to kvm/queue cleanly.

Thanks for your time!

[*]: https://lore.kernel.org/kvm/f028d43abeadaa3134297d28fb99f283445c0333.1708933498.git.isaku.yamahata@xxxxxxxxx/

Kai Huang (3):
KVM: VMX: Refactor VMX module init/exit functions
KVM: Export hardware virtualization enabling/disabling functions
KVM: VMX: Initialize TDX during KVM module load

arch/x86/kvm/Makefile | 1 +
arch/x86/kvm/vmx/main.c | 38 +++++++++++++
arch/x86/kvm/vmx/tdx.c | 115 +++++++++++++++++++++++++++++++++++++++
arch/x86/kvm/vmx/tdx.h | 12 ++++
arch/x86/kvm/vmx/vmx.c | 23 +-------
arch/x86/kvm/vmx/vmx.h | 3 +
include/linux/kvm_host.h | 8 +++
virt/kvm/kvm_main.c | 18 ++----
8 files changed, 183 insertions(+), 35 deletions(-)
create mode 100644 arch/x86/kvm/vmx/tdx.c
create mode 100644 arch/x86/kvm/vmx/tdx.h


base-commit: 5cb1659f412041e4780f2e8ee49b2e03728a2ba6
--
2.46.2