Commit 76f16f0
committed
fix(kvmclock): don't pass KVM_CLOCK_REALTIME to KVM_SET_CLOCK
When we pass KVM_CLOCK_REALTIME to KVM_SET_CLOCK, the kernel steps the
monotonic clock by the elapsed wallclock time. This is ok for live
migration, but in the case of snapshots that were take long ago it might
cause issues to guest userspace.
Change the snapshot restore logic to not clear the KVM_CLOCK_REALTIME
bit when restoring kvmclock. Wallclock time will then be handled by
userspace (chronyd or otherwise).
Signed-off-by: Babis Chalios <babis.chalios@e2b.dev>1 parent af9c995 commit 76f16f0
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | | - | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
0 commit comments