Re: [RFC PATCH v3 54/59] KVM: X86: Introduce initial_tsc_khz in struct kvm_arch

From: Paolo Bonzini
Date: Thu Nov 25 2021 - 15:50:36 EST


On 11/25/21 01:20, isaku.yamahata@xxxxxxxxx wrote:
From: Xiaoyao Li<xiaoyao.li@xxxxxxxxx>

Introduce a per-vm variable initial_tsc_khz to hold the default tsc_khz
for kvm_arch_vcpu_create().

This field is going to be used by TDX since TSC frequency for TD guest
is configured at TD VM initialization phase.

Signed-off-by: Xiaoyao Li<xiaoyao.li@xxxxxxxxx>
Signed-off-by: Isaku Yamahata<isaku.yamahata@xxxxxxxxx>

Probably some incorrect squashing happened here, since...

arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx/tdx.c | 2233 +++++++++++++++++++++++++++++++
arch/x86/kvm/x86.c | 3 +-
3 files changed, 2236 insertions(+), 1 deletion(-)
create mode 100644 arch/x86/kvm/vmx/tdx.c

This patch does a bit more than that. :)

Paolo