Re: [PATCH v9 15/19] KVM: selftests: Hook TDX support to vm and vcpu creation
From: Chenyi Qiang
Date: Tue Aug 26 2025 - 04:28:56 EST
On 8/21/2025 12:29 PM, Sagi Shahar wrote:
> TDX require special handling for VM and VCPU initialization for various
s/require/requires
> reasons:
> - Special ioctlss for creating VM and VCPU.
s/ioctlss/ioctls
> - TDX registers are inaccessible to KVM.
> - TDX require special boot code trampoline for loading parameters.
s/require/requires
> - TDX only supports KVM_CAP_SPLIT_IRQCHIP.
>
> Hook this special handling into __vm_create() and vm_arch_vcpu_add()
> using the utility functions added in previous patches.
>
> Signed-off-by: Sagi Shahar <sagis@xxxxxxxxxx>
> ---
> tools/testing/selftests/kvm/lib/kvm_util.c | 24 ++++++++-
> .../testing/selftests/kvm/lib/x86/processor.c | 49 ++++++++++++++-----
> 2 files changed, 61 insertions(+), 12 deletions(-)
>