summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2013-05-06 04:32:12 +0000
committerdlg <dlg@openbsd.org>2013-05-06 04:32:12 +0000
commit8d742180d3400a6b35a92d480203714f74d8023e (patch)
tree2e3ccec7d6710c163786f649fb46b7a3dad10bd3 /sys/kern
parentIf the lock is contended, such that the 'sc' fails, then we need to (diff)
downloadwireguard-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