mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
replay: save prior value of the host clock
This patch adds saving/restoring of the host clock field 'last'. It is used in host clock calculation and therefore clock may become incorrect when using restored vmstate. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095226.1060.50975.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
This commit is contained in:
parent
bb040e006f
commit
4b930d264c
4 changed files with 31 additions and 0 deletions
|
@ -622,6 +622,18 @@ int64_t qemu_clock_get_ns(QEMUClockType type)
|
|||
}
|
||||
}
|
||||
|
||||
uint64_t qemu_clock_get_last(QEMUClockType type)
|
||||
{
|
||||
QEMUClock *clock = qemu_clock_ptr(type);
|
||||
return clock->last;
|
||||
}
|
||||
|
||||
void qemu_clock_set_last(QEMUClockType type, uint64_t last)
|
||||
{
|
||||
QEMUClock *clock = qemu_clock_ptr(type);
|
||||
clock->last = last;
|
||||
}
|
||||
|
||||
void qemu_clock_register_reset_notifier(QEMUClockType type,
|
||||
Notifier *notifier)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue