On Fri, 2026-05-15 at 12:19 -0700, Sean Christopherson wrote: > Don't disable kvmclock on the BSP during syscore_suspend(), as the BSP's > clock is NOT restored during syscore_resume(), but is instead restored > earlier via the sched_clock restore callback. If suspend is aborted, e.g. > due to a late wakeup, the BSP will run without its clock enabled, which > "works" only because KVM-the-hypervisor is kind enough to not clobber the > shared memory when the clock is disabled. But over time, the BSP's view > of time will drift from APs.
The work that Dongli and I have been doing elsewhere makes me want to
phrase that last sentence far more judgmentally, as the kvmclock
absolutely should *not* be randomly drifting over time without good
reason, and what was written to it earlier really *ought* to still be
valid.
But OK :)
> Plumb in an "action" to KVM-as-a-guest and kvmclock code in preparation
> for additional cleanups to kvmclock's suspend/resume logic.
>
> Fixes: c02027b5742b ("x86/kvm: Disable kvmclock on all CPUs on shutdown")
> Cc: [email protected]
> Signed-off-by: Sean Christopherson <[email protected]>
Reviewed-by: David Woodhouse <[email protected]>
smime.p7s
Description: S/MIME cryptographic signature

