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

Re: [Xen-devel] [PATCH] x86/time: Don't use virtual TSC if host and guest frequencies are equal



>>> On 15.03.17 at 20:48, <boris.ostrovsky@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/time.c
> +++ b/xen/arch/x86/time.c
> @@ -2051,17 +2051,11 @@ void tsc_set_info(struct domain *d,
>          d->arch.vtsc_offset = get_s_time() - elapsed_nsec;
>          d->arch.tsc_khz = gtsc_khz ?: cpu_khz;
>          set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000);
> -        /*
> -         * In default mode use native TSC if the host has safe TSC and:
> -         *  HVM/PVH: host and guest frequencies are the same (either
> -         *           "naturally" or via TSC scaling)
> -         *  PV: guest has not migrated yet (and thus arch.tsc_khz == cpu_khz)
> -         */
> +
>          if ( tsc_mode == TSC_MODE_DEFAULT && host_tsc_is_safe() &&
> -             (has_hvm_container_domain(d) ?
> -              (d->arch.tsc_khz == cpu_khz ||
> -               hvm_get_tsc_scaling_ratio(d->arch.tsc_khz)) :
> -              incarnation == 0) )
> +             (d->arch.tsc_khz == cpu_khz || incarnation == 0 ||

Is the incarnation comparison really needed here, i.e. doesn't it
being zero imply the two frequencies to match in default mode?

Jan


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

 


Rackspace

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