lkml.org 
[lkml]   [2022]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH linux-next] x86/xen/time: prefer tsc as clocksource when it is invariant

On 12/8/22 11:36 AM, Krister Johansen wrote:
> + /*
> + * As Dom0 is never moved, no penalty on using TSC there.
> + *
> + * If the guest has invariant tsc, then set xen_clocksource rating
> + * below that of the tsc so that the system prefers tsc instead. This
> + * check excludes PV domains, because PV is unable to guarantee that the
> + * guest's cpuid call has been intercepted by the hypervisor.
> + */
> + if (xen_initial_domain()) {
> xen_clocksource.rating = 275;
> + } else if ((xen_hvm_domain() || xen_pvh_domain()) &&
> + boot_cpu_has(X86_FEATURE_CONSTANT_TSC) &&
> + boot_cpu_has(X86_FEATURE_NONSTOP_TSC) &&
> + !check_tsc_unstable()) {
> + xen_clocksource.rating = 299;
> + }


What if RDTSC is intercepted?


-boris

\
 
 \ /
  Last update: 2022-12-09 20:34    [W:0.066 / U:2.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site