summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2011-05-24 01:08:53 +0000
committergrehan <grehan@FreeBSD.org>2011-05-24 01:08:53 +0000
commit949e126edfdb544c4b351ec5726c8dc3ff848dda (patch)
treeab37822dce439831d6e7b6835b85a9b91807c110 /usr.sbin/bhyve
parent3930d0afcfdc805e3c97fcc29a2c1ffbd8b31c7c (diff)
downloadFreeBSD-src-949e126edfdb544c4b351ec5726c8dc3ff848dda.zip
FreeBSD-src-949e126edfdb544c4b351ec5726c8dc3ff848dda.tar.gz
Catch up with CURRENTs different timer usage compared to 8.1. A counter
value of 0 in rategen mode is equivalent to a max initial value. The TSC is now correctly calibrated on a 9.0 guest. Obtained from: NetApp
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r--usr.sbin/bhyve/pit_8254.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pit_8254.c b/usr.sbin/bhyve/pit_8254.c
index b510161..d9b6d55 100644
--- a/usr.sbin/bhyve/pit_8254.c
+++ b/usr.sbin/bhyve/pit_8254.c
@@ -183,6 +183,8 @@ pit_8254_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
if (c->crbyte == 2) {
c->crbyte = 0;
c->initial = c->cr[0] | (uint16_t)c->cr[1] << 8;
+ if (c->initial == 0)
+ c->initial = 0xffff;
gettimeofday(&c->tv, NULL);
}
}
OpenPOWER on IntegriCloud