summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/pvclock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pvclock(4): attach even if when PVCLOCK_FLAG_TSC_STABLE is unsetpd2019-12-131-12/+20
| | | | | | | | | | | Attaches pvclock with lower priority (500) in case of unstable tsc (PVCLOCK_FLAG_TSC_STABLE) instead of not attaching at all. In this state, we do make sure to return a monotonically increasing number. This mostly helps openbsd guests on openbsd vmm(4) where a pvclock with unstable tsc is still better than i8254. ok mlarkin@
* vmm: add host side pvclockpd2019-05-131-20/+3
| | | | | | | | | Emulate kvm pvclock in vmm(4). Compatible with pvclock(4) in OpenBSD. Linux does not attach to this (yet). Fixes by reyk@ and tested extensively by reyk@, tb@ and phessler@ ok mlarkin@ phessler@ reyk@
* Correctly disable pvclock(4) on old hardware that lack a stable clockreyk2018-12-051-3/+24
| | | | | | | | | | | | I falsely assumed that the KVM_FEATURE_CLOCKSOURCE_STABLE_BIT indicates that the actual clock values are stable, but it turned out that this isn't always the case. To detect if the clock value is stable, we now read it once in pvclock_attach() and check for the PVCLOCK_FLAG_TSC_STABLE flag. This needs further investigation. Reported and fix tested by johnw.mail at gmail.com OK chris@ phessler@
* only attach pvclock(4) inside a KVM guestphessler2018-11-241-2/+4
| | | | | tested by brynet@ OK reyk@
* Add the pvclock(4) guest driver for paravirtual clocksreyk2018-11-231-0/+229
This improves timekeeping on KVM guests as it runs much better than the virtualized acpihpet or acpitimer timecounters and the invtsc is not always available. Many thanks to Janne Johansson, landry@, and benno@ for testing amd64/i386. OK mlarkin@ phessler@