git: fb18fc6b050e - stable/13 - vmm: fix restore of TSC offset
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Mar 2023 10:29:23 UTC
The branch stable/13 has been updated by corvink:
URL: https://cgit.FreeBSD.org/src/commit/?id=fb18fc6b050e540a694271af7ac1c293e0f4a5b3
commit fb18fc6b050e540a694271af7ac1c293e0f4a5b3
Author: Vitaliy Gusev <gusev.vitaliy@gmail.com>
AuthorDate: 2023-02-28 11:16:35 +0000
Commit: Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-03-17 10:26:33 +0000
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: a7db532e3a6f83067b342f569b56076d011f8a1e ("vmm: Simplify saving of absolute TSC values in snapshots.")
MFC after: 2 weeks
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38474
(cherry picked from commit 281b496f22d1d666b2ef1e54985432627ec434a4)
---
sys/amd64/vmm/vmm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
index 692b8c991310..8cdf57608055 100644
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -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: