lkml.org 
[lkml]   [2021]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 65/69] KVM: X86: Introduce initial_tsc_khz in struct kvm_arch
On Tue, Jul 06, 2021, Paolo Bonzini wrote:
> On 03/07/21 00:05, isaku.yamahata@intel.com wrote:
> > From: Xiaoyao Li <xiaoyao.li@intel.com>
> >
> > 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@intel.com>
> > Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
> > ---
> > arch/x86/include/asm/kvm_host.h | 1 +
> > arch/x86/kvm/x86.c | 3 ++-
> > 2 files changed, 3 insertions(+), 1 deletion(-)
>
> So this means disabling TSC frequency scaling on TDX. Would it make sense
> to delay VM creation to a separate ioctl, similar to KVM_ARM_VCPU_FINALIZE
> (KVM_VM_FINALIZE)?

There's an equivalent of that in the next mega-patch, the KVM_TDX_INIT_VM sub-ioctl
of KVM_MEMORY_ENCRYPT_OP. The TSC frequency for the guest gets provided at that
time.

\
 
 \ /
  Last update: 2021-07-13 20:15    [W:1.005 / U:2.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site