Author :
sf
Date :
2025-06-20 14:06:34
Hash :3d7a3484 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@