Re: [PATCH 00/25] TDX vCPU/VM creation

From: Tony Lindgren
Date: Fri Aug 16 2024 - 01:19:17 EST


On Thu, Aug 15, 2024 at 11:46:00PM +0000, Edgecombe, Rick P wrote:
> On Thu, 2024-08-15 at 08:20 +0300, Tony Lindgren wrote:
> > We can generate a TDX suitable default CPUID configuration by adding
> > KVM_GET_SUPPORTED_TDX_CPUID. This would handled similar to the existing
> > KVM_GET_SUPPORTED_CPUID and KVM_GET_SUPPORTED_HV_CPUID.
>
> What problem are you suggesting to solve with it? To give something to userspace
> to say "please filter these out yourself?"

To produce a usable default CPUID set for TDX early on. That's before the
kvm_cpu_caps is initialized in kvm_arch_init_vm(), so I don't think there's
any other way to do it early. That is if we want to prodce a TDX specific
set :)

> From the thread with Sean on this series, it seems maybe we won't need the
> filtering in any case.

Yeah let's see.

> Sorry if I missed your point. KVM_GET_SUPPORTED_HV_CPUID only returns a few
> extra entries associated with HV, right? I'm not following the connection to
> what TDX needs here.

The the code to handle would be common except for the TDX specific CPUID
filtering call.

Regards,

Tony