summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-04-10 05:59:07 +0000
committerneel <neel@FreeBSD.org>2013-04-10 05:59:07 +0000
commit3bab173b64b03e7f4e6226b45da13787c9ea6acf (patch)
tree24264be4adf2ff77101e01f0bca54977475d4477 /sys/x86
parentac0cfc7fcb1b51ee6aeacfd676fa6dfbe11eefb5 (diff)
downloadFreeBSD-src-3bab173b64b03e7f4e6226b45da13787c9ea6acf.zip
FreeBSD-src-3bab173b64b03e7f4e6226b45da13787c9ea6acf.tar.gz
Unsynchronized TSCs on the host require special handling in bhyve:
- use clock_gettime(2) as the time base for the emulated ACPI timer instead of directly using rdtsc(). - don't advertise the invariant TSC capability to the guest to discourage it from using the TSC as its time base. Discussed with: jhb@ (about making 'smp_tsc' a global) Reported by: Dan Mack on freebsd-virtualization@ Obtained from: NetApp
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/tsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
index 4f67818..0994e9c 100644
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -61,7 +61,7 @@ SYSCTL_INT(_kern_timecounter, OID_AUTO, invariant_tsc, CTLFLAG_RDTUN,
TUNABLE_INT("kern.timecounter.invariant_tsc", &tsc_is_invariant);
#ifdef SMP
-static int smp_tsc;
+int smp_tsc;
SYSCTL_INT(_kern_timecounter, OID_AUTO, smp_tsc, CTLFLAG_RDTUN, &smp_tsc, 0,
"Indicates whether the TSC is safe to use in SMP mode");
TUNABLE_INT("kern.timecounter.smp_tsc", &smp_tsc);
OpenPOWER on IntegriCloud