vmm: fix restore of TSC offset
After suspend/resume Ubuntu 20.04 and 22.04 installer can hang if
tsc-early clocksource has a big skew.
Reviewed by: corvink, jhb
Fixes: a7db532e3a
("vmm: Simplify saving of absolute TSC values in snapshots.")
MFC after: 2 weeks
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38474
This commit is contained in:
parent
34f804e547
commit
281b496f22
@ -2859,6 +2859,8 @@ vm_snapshot_vcpus(struct vm *vm, struct vm_snapshot_meta *meta)
|
||||
*/
|
||||
tsc = now + vcpu->tsc_offset;
|
||||
SNAPSHOT_VAR_OR_LEAVE(tsc, meta, ret, done);
|
||||
if (meta->op == VM_SNAPSHOT_RESTORE)
|
||||
vcpu->tsc_offset = tsc;
|
||||
}
|
||||
|
||||
done:
|
||||
|
Loading…
Reference in New Issue
Block a user