From: Ian Jackson Date: Thu, 8 Dec 2011 16:36:03 +0000 (+0000) Subject: qemu_get_timer: always read the 64 bit value from the savefile X-Git-Tag: xen-4.2.0-rc1~26 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=244959f65fc67b24a00265110495a555d92f533a;p=qemu-xen-4.5-testing.git 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. [ This fixes a regression in 68af5b51 -iwj. ] Signed-off-by: Stefano Stabellini --- diff --git a/vl.c b/vl.c index f3b3d02ab..9e0a5564a 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 {