diff options
author | neel <neel@FreeBSD.org> | 2013-04-10 05:59:07 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-04-10 05:59:07 +0000 |
commit | 3bab173b64b03e7f4e6226b45da13787c9ea6acf (patch) | |
tree | 24264be4adf2ff77101e01f0bca54977475d4477 /sys/amd64/include | |
parent | ac0cfc7fcb1b51ee6aeacfd676fa6dfbe11eefb5 (diff) | |
download | FreeBSD-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/amd64/include')
-rw-r--r-- | sys/amd64/include/clock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h index d2602d8..d7f7d82 100644 --- a/sys/amd64/include/clock.h +++ b/sys/amd64/include/clock.h @@ -20,6 +20,9 @@ extern int i8254_max_count; extern uint64_t tsc_freq; extern int tsc_is_invariant; extern int tsc_perf_stat; +#ifdef SMP +extern int smp_tsc; +#endif void i8254_init(void); |