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

Re: [Xen-devel] [PATCH 04/13] x86/hvm: Setup TSC scaling ratio



>>> On 23.10.15 at 09:44, <haozhong.zhang@xxxxxxxxx> wrote:
> On Thu, Oct 22, 2015 at 07:13:07AM -0600, Jan Beulich wrote:
>> >>> On 28.09.15 at 09:13, <haozhong.zhang@xxxxxxxxx> wrote:

Please remember to trim your replies.

>> > @@ -2023,6 +2051,9 @@ static int hvm_load_cpu_ctxt(struct domain *d, 
>> > hvm_domain_context_t *h)
>> >      if ( hvm_funcs.load_cpu_ctxt(v, &ctxt) < 0 )
>> >          return -EINVAL;
>> >  
>> > +    if ( !v->domain->arch.vtsc && hvm_funcs.tsc_scaling_supported )
>> > +        hvm_setup_tsc_scaling(v);
>> 
>> What's the rationale for putting it in this function?
> 
> hvm_load_cpu_ctxt() is called in the migration to restore vcpu's state
> including TSC related things, so hvm_setup_tsc_scaling() is called
> here.
> 
> hvm_vcpu_reset_state() is not called in the migration, so we cannot
> rely on the call to hvm_setup_tsc_scaling() there.

All that is understood, but doesn't explain why the scaling setup gets
done here instead of somewhere after _all_ state got loaded.

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®.