On 02/24/16 08:51, Jan Beulich wrote:
> >>> On 24.02.16 at 16:42, wrote:
> > On 02/24/16 08:01, Jan Beulich wrote:
> >> >>> On 23.02.16 at 03:05, wrote:
> >> > +/* ratio = (gtsc_khz << hvm_funcs.tsc_scaling.ratio_frac_bits) /
> >> > cpu_khz */
> >> > +asm (
> >> > +"shldq %2,%1,%
>>> On 24.02.16 at 16:42, wrote:
> On 02/24/16 08:01, Jan Beulich wrote:
>> >>> On 23.02.16 at 03:05, wrote:
>> > +/* ratio = (gtsc_khz << hvm_funcs.tsc_scaling.ratio_frac_bits) /
>> > cpu_khz */
>> > +asm (
>> > +"shldq %2,%1,%0; salq %2,%1; divq %3"
>> > +: "+&d" (dummy
On 02/24/16 08:01, Jan Beulich wrote:
> >>> On 23.02.16 at 03:05, wrote:
> > --- a/xen/arch/x86/hvm/hvm.c
> > +++ b/xen/arch/x86/hvm/hvm.c
> > @@ -298,6 +298,29 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
> > return 1;
> > }
> >
> > +/*
> > + * Get the ratio to scale host TSC f
>>> On 23.02.16 at 03:05, wrote:
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -298,6 +298,29 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
> return 1;
> }
>
> +/*
> + * Get the ratio to scale host TSC frequency to gtsc_khz. zero will be
> + * returned if TSC
This patch adds a field tsc_scaling_ratio in struct hvm_domain to record
the per-domain TSC scaling ratio, and sets it in tsc_set_info().
Before setting the per-domain TSC scaling ratio, we check its validity
in tsc_set_info(). If an invalid ratio is given, we will leave the
default value in tsc_s