Re: [PATCH v10 21/21] KVM: x86: Use kernel timekeeping snapshot to get walltime+TSC

From: David Woodhouse

Date: Fri Aug 28 2026 - 18:46:54 EST


On Wed, 2026-08-26 at 21:49 +0000, sashiko-bot@xxxxxxxxxx wrote:
> [Severity: High]
> Does removing KVM's local TSC clamping expose guests to mismatched time pairs?
>
> When establishing the guest's PV clock, KVM provides a master clock
> snapshot pairing a host TSC with a system time. The previous read_tsc()
> logic explicitly clamped the TSC to cycle_last to maintain mathematical
> consistency.

I think this is basically the same class of issue I brought up in
https://lore.kernel.org/all/87v7beb7s3.ffs@fw13/ and Thomas said the
right thing is just to ignore it?

If the discrepancy was more than a few cycles, we shouldn't be in
masterclock mode anyway, should we?

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