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:
Pavel Dovgalyuk 2018-02-27 12:52:26 +03:00 committed by Paolo Bonzini
parent bb040e006f
commit 4b930d264c
4 changed files with 31 additions and 0 deletions

View file

@ -78,6 +78,8 @@ typedef struct ReplayState {
This counter is global, because requests from different
block devices should not get overlapping ids. */
uint64_t block_request_id;
/*! Prior value of the host clock */
uint64_t host_clock_last;
} ReplayState;
extern ReplayState replay_state;