Pass calibrated TSC frequency to vmm(4) guests. On machines where TSC
authorpatrick <patrick@openbsd.org>
Tue, 19 Dec 2017 18:06:41 +0000 (18:06 +0000)
committerpatrick <patrick@openbsd.org>
Tue, 19 Dec 2017 18:06:41 +0000 (18:06 +0000)
commitfa1855cdc0210b8cef154dd4a20b4dff3655e771
tree307e810a8a462d63adcc8d222edbe45ba212ac6d
parentf826ebbd1da97f09a3d2eca715c3cff5b388a317
Pass calibrated TSC frequency to vmm(4) guests.  On machines where TSC
cannot be calculated from the CPUID register, because the CPU does not
support it, but can be calibrated from another timer, the vmm(4) guest
doesn't have a chance to read or calibrate its own TSC frequency since
it has no access to a precise enough time counter.  In that case, fake
the existence of the register and supply our calibrated TSC frequency.
mlarkin@ tells me this also greatly helps Linux guests.

ok mlarkin@
sys/arch/amd64/amd64/vmm.c