Commit 210cbac
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 59b0ad1 commit 210cbac
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | | - | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
0 commit comments