Message ID | 20240812224820.34826-1-rick.p.edgecombe@intel.com (mailing list archive) |
---|---|
Headers | show |
Series | TDX vCPU/VM creation | expand |
Hi, On Mon, Aug 12, 2024 at 03:47:55PM -0700, Rick Edgecombe wrote: > The problem with this solution is that using, effectively > KVM_GET_SUPPORTED_CPUID internally, is not an effective way to filter the > CPUID bits. In practice, the spots where TDX support does the filtering > needed some adjustments. See the log of “Add CPUID bits missing from > KVM_GET_SUPPORTED_CPUID” for more information. 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. Or are there some reasons to avoid adding this? Regards, Tony
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?" From the thread with Sean on this series, it seems maybe we won't need the filtering in any case. 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. > > Or are there some reasons to avoid adding this?
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