From KVM

KVM PVclock

Linux guests only.

Testing

You can verify kvm-clock is enable by checking

/sys/devices/system/clocksource/clocksource0/current_clocksource

Output should say "kvm-clock"

Some basic mechanism to make sure it works:

* Try guests without kvm-clock too. Make sure they at least boot
* make sure successive gettimeofday calls never go backwards (testing this can take days)
* make sure that calls to different time sources (like gettimeofday and monotonic) do not deviate too much, nor go backwards.

Note

Older Linux guests with backported versions of kvmclock may need different ways to check for kvmclock. This is due to the fact that those guests might lack total support for the clocksource subsystem

* RHEL/CentOS 5.x: for the x86_64 version, the "current_clocksource" file exists, but will always return "jiffies", no matter what. One should search for "KVM" in  dmesg | grep time.c