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@
This commit is contained in:
Neel Natu 2014-04-23 16:50:40 +00:00
parent 43e0d7bfe0
commit c5d216b786
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264825

View File

@ -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)