Stefano Stabellini
2011-Dec-08 16:17 UTC
[PATCH] qemu_get_timer: always read the 64 bit value from the savefile
qemu_get_timer: the 64 bit value needs to be read from the save file even when the timer is not initialized otherwise following reads from the savefile will read the wrong fields. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> diff --git a/vl.c b/vl.c index f3b3d02..9e0a556 100644 --- a/vl.c +++ b/vl.c @@ -1276,10 +1276,10 @@ void qemu_get_timer(QEMUFile *f, QEMUTimer *ts) { uint64_t expire_time; + expire_time = qemu_get_be64(f); + if (ts == NULL) return; - - expire_time = qemu_get_be64(f); if (expire_time != -1) { qemu_mod_timer(ts, expire_time); } else {
Ian Jackson
2011-Dec-08 16:40 UTC
Re: [PATCH] qemu_get_timer: always read the 64 bit value from the savefile
Stefano Stabellini writes ("[Xen-devel] [PATCH] qemu_get_timer: always read the 64 bit value from the savefile"):> qemu_get_timer: the 64 bit value needs to be read from the save file > even when the timer is not initialized otherwise following reads from > the savefile will read the wrong fields. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>