On 5/6/2022 2:14 AM, isaku.yamahata@xxxxxxxxx wrote:
...
+ if (init_vm->tsc_khz) {
+ guest_tsc_khz = init_vm->tsc_khz;
+ kvm->arch.default_tsc_khz = guest_tsc_khz;
+ } else
+ guest_tsc_khz = kvm->arch.default_tsc_khz;
+ td_params->tsc_frequency = TDX_TSC_KHZ_TO_25MHZ(guest_tsc_khz);
Isaku,
I think Paolo meant
1. user space calls VM-scope KVM_SET_TSC_KHZ
and
2. td_params->tsc_frequency =
TDX_TSC_KHZ_TO_25MHZ(kvm->arch.default_tsc_khz);
in
https://lore.kernel.org/all/e392b53a-fbaa-4724-07f4-171424144f70@xxxxxxxxxx/
so we can drop @tsc_khz in struct kvm_tdx_init_vm.