Re: [PATCH v8 05/17] KVM: x86: Avoid NTP frequency skew for KVM clock on 32-bit host

Sean Christopherson <[email protected]>
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm
Message-ID <[email protected]>
On Sat, Aug 08, 2026, David Woodhouse wrote:
> On Fri, 2026-08-07 at 18:26 +0100, David Woodhouse wrote:
> > (Home and on the phone after an insane week; full attention span
> > might be limited until Monday).
> 
> Hi, my name is Dave and I'm an addict...
> 
> > The only reason the ktime snapshot stuff is last in the series is
> > because I did that work on the kernel's core timekeeping two years
> > after the rest of the series, and it was still sitting at the tip
> > branch at the time so I didn't want to make it a hard dependency for
> > the kvmclock series. Now the timekeeping stuff is merged we can fold
> > it all into the kvmclock series however we like.
> 
> I think that goes for "Compute kvmclock base without pvclock_gtod_data"
> too. It *isn't* at the end of the series, but I'm fairly sure (from
> memory) that it's one of the newer commits, and I just shuffled it
> earlier in the series for very similar reasons to the ones you're
> looking at now.

That's good, because I came to same conclusion last week :-)

This is what I now have locally as "part 1", which I'm planning on posting today.
It'll be too late for 7.3, but if part 1 looks good to you, I'll throw them in an
unstable topic branch for 7.4 so that we can consider them "done" and work on the
remaining patches.

  KVM: x86: Update "last guest TSC" snapshot prior to enabling IRQs/preemption
  KVM: x86: Improve accuracy of KVM clock when TSC scaling is in force
  KVM: x86: Explicitly disable TSC scaling without CONSTANT_TSC
  KVM: x86: Activate master clock immediately on vCPU creation
  KVM: x86: Compute kvmclock base without pvclock_gtod_data
  KVM: x86: Avoid NTP frequency skew for KVM clock on 32-bit host
  KVM: x86: Drop unnecessary CPU pinning when computing/getting kvmclock
  KVM: x86: Move "no master clock" fallback from __get_kvmclock() to get_kvmclock()
  KVM: x86: Wrap all of __get_kvmclock_master_clock() with CONFIG_X86_64=y
  KVM: x86: Fall back to non-master-clock if clockread fails in get_kvmclock()
  KVM: x86: Fix KVM clock precision in get_kvmclock() with TSC scaling
  KVM: x86: Use get_kvmclock() in kvm_get_wall_clock_epoch()
  KVM: x86: Fix compute_guest_tsc() to handle negative time deltas
  KVM: x86: Disable preemption, not IRQs, when getting TSC+freq pair
  KVM: x86: Make master clock logic in guest PV clock updates 64-bit only
  KVM: x86: Upscale TSC to "now", not master clock when updating PV clocks
  KVM: x86: Simplify and comment kvm_get_time_scale()
  KVM: x86: Remove implicit rdtsc() from kvm_compute_l1_tsc_offset()
  KVM: x86: Use kernel timekeeping snapshots for getting kvmclock time since boot
  KVM: x86: Use kernel timekeeping snapshot for monotonic clock
  KVM: x86: Use kernel timekeeping snapshot to get walltime+TSC
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.