CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2025/06/20 08:06:34
Modified files:
sys/arch/i386/include: cpufunc.h
sys/dev/pv : pvclock.c
Log message:
pvclock: Fix reading clock, add time sensor
* Fix integer overflows during multiplication. This caused time to run
at the wrong speed on some machines, depending on tsc frequency.
* Increase accuracy by disabling interrupts while reading the clock
* Fix the not-TSC_STABLE handling which was broken because it wrongly
compared 32 and 64 bit values. (This requires some atomic hackery on
i386).
* Add a timedelta sensor using the KVM WALL_CLOCK MSR, similar to the
sensor in vmmci(4)
Partially inspired by an earlier diff by cheloa@
ok kettenis@ mlarkin@