GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KVMCLOCK(4) FreeBSD Kernel Interfaces Manual KVMCLOCK(4)

kvmclockPara-virtualized clock driver for x86 KVM guests

To compile this driver into the kernel, place the following line in your kernel configuration file:

device kvm_clock

This driver reads time-keeping information from the para-virtualized clock device provided by the KVM hypervisor on Linux hosts. The kvmclock driver is only implemented on i386 and amd64 platforms. It acts as a timecounters(4) device and is preferred over the Time Stamp Counter (TSC) when available. The driver exports timekeeping information via /dev/pvclock, enabling the implementation of clock_gettime(2) and related functions without entering the kernel.

The kvmclock driver works by accessing a per-vCPU timekeeping structure maintained by the hypervisor. It uses a combination of TSC readings and information from the shared structure to produce a high-resolution timecounter which is invariant under hypervisor events such as vCPU migration and live VM migration.

The following variables are available as both sysctl(8) variables and loader(8) tunables:

dev.kvmclock.0.vdso_enable_without_rdtscp
By default, timekeeping information is exported to userspace only when the (virtual) CPU announces support for the “rdtscp” instruction. Setting this sysctl to 1 overrides this behavior, allowing timekeeping information to be exported even in the absence of “rdtscp” support. However, this breaks compatibility with copies of /lib/libc.so.7 released prior to FreeBSD 14.0, and statically linked binaries which embed a copy of the system C library. Thus, this sysctl value should not be changed if the system may execute binaries older than FreeBSD 14.0.
dev.kvmclock.0.vdso_force_unstable
Mark the timecounter as unstable for userspace consumers. This is mostly useful for debugging the driver and userspace timekeeping code, and generally should not be touched.

timecounters(4)

The kvmclock driver first appeared in FreeBSD 13.1.

February 1, 2023 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 4 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.