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
This commit is contained in:
parent
ad54f37429
commit
32c39f32cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bhyve/; revision=222238
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user