Date: Wed, 23 Apr 2014 16:50:41 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264825 - head/sys/amd64/vmm/io Message-ID: <201404231650.s3NGofmA033256@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Wed Apr 23 16:50:40 2014 New Revision: 264825 URL: http://svnweb.freebsd.org/changeset/base/264825 Log: Change the vlapic timer frequency to be in the ballpark of contemporary hardware. This also decouples the vlapic emulation from the host's TSC frequency. Requested by: grehan@ Modified: head/sys/amd64/vmm/io/vlapic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Wed Apr 23 15:18:40 2014 (r264824) +++ head/sys/amd64/vmm/io/vlapic.c Wed Apr 23 16:50:40 2014 (r264825) @@ -70,7 +70,12 @@ __FBSDID("$FreeBSD$"); #define VLAPIC_TIMER_UNLOCK(vlapic) mtx_unlock_spin(&((vlapic)->timer_mtx)) #define VLAPIC_TIMER_LOCKED(vlapic) mtx_owned(&((vlapic)->timer_mtx)) -#define VLAPIC_BUS_FREQ tsc_freq +/* + * APIC timer frequency: + * - arbitrary but chosen to be in the ballpark of contemporary hardware. + * - power-of-two to avoid loss of precision when converted to a bintime. + */ +#define VLAPIC_BUS_FREQ (128 * 1024 * 1024) static __inline uint32_t vlapic_get_id(struct vlapic *vlapic)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404231650.s3NGofmA033256>