KVMCLOCK(4)
π KVMCLOCK(4) π
Okay bestie, welcome to the Kernel Interfaces Manual page for KVMCLOCK(4) β the para-virtualized clock driver for x86 KVM guests. It's giving very demure kernel tea, no cap βπ
πΈ NAME πΈ
kvmclock β Para-virtualized clock driver for x86 KVM guests β¨
π οΈ SYNOPSIS π οΈ
To compile this driver into the kernel, place the following line in your kernel configuration file:
device kvm_clock
π DESCRIPTION π
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. Highkey iconic β¨
ποΈ SYSCTL VARIABLES ποΈ
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 therdtscpinstruction. Setting this sysctl to1overrides this behavior, allowing timekeeping information to be exported even in the absence ofrdtscpsupport. However, bestie, heads up: this breaks compatibility with copies of/lib/libc.so.7released 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. π
π SEE ALSO π
π¦ HISTORY π¦
The kvmclock driver first appeared in FreeBSD 13.1. β
That's the whole tea, bestie π«Ά This page comes from Debian, dated February 1, 2023, and it's the KVMCLOCK(4) manual page. Go touch some grass now π±π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2023 Klara, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms