diff options
author | 2013-05-06 04:32:12 +0000 | |
---|---|---|
committer | 2013-05-06 04:32:12 +0000 | |
commit | 8d742180d3400a6b35a92d480203714f74d8023e (patch) | |
tree | 2e3ccec7d6710c163786f649fb46b7a3dad10bd3 /sys/kern | |
parent | If the lock is contended, such that the 'sc' fails, then we need to (diff) | |
download | wireguard-openbsd-8d742180d3400a6b35a92d480203714f74d8023e.tar.xz wireguard-openbsd-8d742180d3400a6b35a92d480203714f74d8023e.zip |
the use of modern intel performance counter msrs to measure the number of
cycles per second isnt reliable, particularly inside "virtual" machines.
cpuspeed can be calculated as 0, which causes a divide by zero later on
which is bad.
this goes to more effort to detect if the performance counters are in use
by the hypervisor, or detecting if they gave us a cpuspeed of 0 so we can
fall through to using rdtsc.
the same change as:
src/sys/arch/i386/include/specialreg.h r.45
src/sys/arch/i386/isa/clock.c 1.49
ok jsg@
Diffstat (limited to 'sys/kern')
0 files changed, 0 insertions, 0 deletions