diff options
author | Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> | 2021-03-29 13:22:30 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-04-01 09:40:45 +0200 |
commit | fe852ac2b3725055bb210270e3aca5a0ed4b6217 (patch) | |
tree | a8fb5f2b635cc9278eecdb7f2240abc8030044f1 /softmmu/cpu-timers.c | |
parent | cb4d9e38bd2a9077716d2e41778cd0bb155ae119 (diff) |
icount: get rid of static variable
This patch moves static last_delta variable into timers_state
structure to allow correct vmstate operations with icount shift=auto enabled.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <161701335066.1180180.7104085247702343395.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu/cpu-timers.c')
-rw-r--r-- | softmmu/cpu-timers.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/softmmu/cpu-timers.c b/softmmu/cpu-timers.c index cd38595245..34ddfa02f1 100644 --- a/softmmu/cpu-timers.c +++ b/softmmu/cpu-timers.c @@ -188,11 +188,12 @@ static const VMStateDescription icount_vmstate_adjust_timers = { static const VMStateDescription icount_vmstate_shift = { .name = "timer/icount/shift", - .version_id = 1, - .minimum_version_id = 1, + .version_id = 2, + .minimum_version_id = 2, .needed = icount_shift_state_needed, .fields = (VMStateField[]) { VMSTATE_INT16(icount_time_shift, TimersState), + VMSTATE_INT64(last_delta, TimersState), VMSTATE_END_OF_LIST() } }; |