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

Re: [PATCH v6 19/51] x86/kvmclock: Drop dead check on TSC being unstable during kvmclock_init()



On Thu, 2026-08-06 at 16:35 -0700, Sean Christopherson wrote:
> As pointed out by Sashiko[*], kvmclock_init() runs before __setup() and
> thus before notsc_setup() or tsc_setup() can mark the TSC unstable.
> kvmclock_init() also runs well before tsc_init(), and even before
> tsc_early_init().  Simply delete the check, as it's been dead code since
> it was introduced.
>
> Note, odds are good the check_tsc_unstable() call was copied from Xen's
> xen_time_init()+xen_tsc_safe_clocksource() logic (as so much of KVM's PV
> code was).  However, xen_time_init() runs via x86_init.timers.timer_init(),
> which is invoke from x86_late_time_init(), and thus after params have been
> parsed.
>
> Alternatively, kvmclock could register itself later on, or tsc_setup()
> could be parsed as an early param.  Given that there's zero evidence there
> was any meaningful intent or need to actually check for an unstable TSC,
> go with the simplest option.
>
> Fixes: 7539b174aef4 ("x86: kvmguest: use TSC clocksource if invariant TSC is 
> exposed")
> Link: https://lore.kernel.org/all/20260529181213.0B27A1F00893@xxxxxxxxxxxxxxx 
> [*]
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: David Woodhouse <dwmw@xxxxxxxxxxxx>

Attachment: smime.p7s
Description: S/MIME cryptographic signature


 


Rackspace

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