diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-19 13:48:00 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-19 13:48:00 +0000 |
commit | f8b68fe2dad1e6bf4f55483dd023561d3ee008cb (patch) | |
tree | b52472f7c81308c900445a76db8ef1cebc50e949 /tools/libxc/xc_core.c | |
parent | 70fe04c768682d517d887d27f7dc195e616a38f5 (diff) | |
download | xen-f8b68fe2dad1e6bf4f55483dd023561d3ee008cb.tar.gz xen-f8b68fe2dad1e6bf4f55483dd023561d3ee008cb.tar.bz2 xen-f8b68fe2dad1e6bf4f55483dd023561d3ee008cb.zip |
hvm: Lower HPET frequency to 1/32 of the TSC.
The frequency of HPET device model is defined to be the same as TSC's,
but this doesn't work well with calibrate_tsc_hpet() in Linux kernel
2.6.16-33, causing some IA32 Linux HVM guests to failt o boot.
Calibrate_tsc_hpet() tries to figure out how many HPET ticks a TSC
cycle equals; it magnifies the result by scale of 2^32, trying to get
a more accurate result since it assumes the frequency of HPET in real
world is usually less than 1/100 of TSC, so the result of "(2^32 *
hpet_freq) / tsc_freq" may exceed 32bits, then a "divide error
(overflow)" would occur!
The result doesn't overflow every time because hpet_freq/tsc_freq may
less than 1.0 due to the little inaccuracy in the implementation of
HVM timer virtualization.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'tools/libxc/xc_core.c')
0 files changed, 0 insertions, 0 deletions