Re: [RFC PATCH v5 029/104] KVM: TDX: allocate/free TDX vcpu structure

From: Paolo Bonzini
Date: Tue Apr 05 2022 - 19:03:51 EST


On 3/4/22 20:48, isaku.yamahata@xxxxxxxxx wrote:
+ /*
+ * In TDX case, tsc frequency is per-VM and determined by the parameter
+ * tdh_mng_init(). Forcibly set it instead of max_tsc_khz set by
+ * kvm_arch_vcpu_create().
+ *
+ * This function is called after kvm_arch_vcpu_create() calling
+ * kvm_set_tsc_khz().
+ */
+ kvm_set_tsc_khz(vcpu, kvm_tdx->tsc_khz);
+

I think this is not needed anymore, now that there is kvm->arch.default_tsc_khz. If so, exporting the function is not needed either.

Paolo