[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 10/13] vmx: Detect and initialize VMX RDTSC(P) scaling



On Tue, Oct 27, 2015 at 07:19:04AM -0600, Jan Beulich wrote:
> >>> On 28.09.15 at 09:13, <haozhong.zhang@xxxxxxxxx> wrote:
> > @@ -1805,6 +1810,8 @@ void vmcs_dump_vcpu(struct vcpu *v)
> >      printk("IDTVectoring: info=%08x errcode=%08x\n",
> >             vmr32(IDT_VECTORING_INFO), vmr32(IDT_VECTORING_ERROR_CODE));
> >      printk("TSC Offset = 0x%016lx\n", vmr(TSC_OFFSET));
> > +    if ( v->arch.hvm_vmx.secondary_exec_control & 
> > SECONDARY_EXEC_TSC_SCALING )
> > +        printk("TSC Multiplier = 0x%016lx\n", vmr(TSC_MULTIPLIER));
> 
> Please make this a single output line together with "TSC Offset = ..."
> (vmr() can safely be used on non-existent VMCS fields).
>
OK.

> > --- a/xen/arch/x86/hvm/vmx/vmx.c
> > +++ b/xen/arch/x86/hvm/vmx/vmx.c
> > @@ -151,6 +151,8 @@ static int vmx_vcpu_initialise(struct vcpu *v)
> >      if ( v->vcpu_id == 0 )
> >          v->arch.user_regs.eax = 1;
> >  
> > +    v->arch.tsc_scaling_ratio = VMX_TSC_MULTIPLIER_DEFAULT;
> > +
> >      return 0;
> >  }
> 
> If you did this earlier in the function, then construct_vmcs() could
> (more naturally) use the value from the field instead of the constant.
>
Yes, I'll move it before calling vmx_create_vmcs().

Thanks,
Haozhong

> Jan
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.