From 7a68cf4e596dc6f95b785e75b92299a43a3d3399 Mon Sep 17 00:00:00 2001 From: bryanv Date: Wed, 4 Feb 2015 08:33:04 +0000 Subject: Add interface to derive a TSC frequency from the pvclock This can later use this to determine the TSC frequency like is done with VMware, instead of using a DELAY loop that is not always accurate in an VM. MFC after: 1 month --- sys/x86/include/pvclock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/x86/include/pvclock.h') diff --git a/sys/x86/include/pvclock.h b/sys/x86/include/pvclock.h index 88a596f..402ffed 100644 --- a/sys/x86/include/pvclock.h +++ b/sys/x86/include/pvclock.h @@ -51,6 +51,7 @@ struct pvclock_wall_clock { void pvclock_resume(void); uint64_t pvclock_get_last_cycles(void); +uint64_t pvclock_tsc_freq(struct pvclock_vcpu_time_info *ti); uint64_t pvclock_get_timecount(struct pvclock_vcpu_time_info *ti); void pvclock_get_wallclock(struct pvclock_wall_clock *wc, struct timespec *ts); -- cgit v1.1