timers: remove useless check
authorJuan Quintela <quintela@redhat.com>
Thu, 10 Sep 2009 01:04:25 +0000 (03:04 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 11 Sep 2009 15:19:51 +0000 (10:19 -0500)
loadvm_state is called from: vl.c during startup, vmstart() is called after finishing loading.  The other caller do_loadvm() does the call after a vm_stop().  At both places where we can be saving state we are stoped a few lines before

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c

diff --git a/vl.c b/vl.c
index 1dc3ffa25587a00b5ee825d2991973b69e8184f1..0bab568295ccd41001268fa052aed5feac0a3700 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1067,9 +1067,6 @@ void qemu_get_timer(QEMUFile *f, QEMUTimer *ts)
 
 static void timer_save(QEMUFile *f, void *opaque)
 {
-    if (cpu_ticks_enabled) {
-        hw_error("cannot save state if virtual timers are running");
-    }
     qemu_put_be64(f, cpu_ticks_offset);
     qemu_put_be64(f, ticks_per_sec);
     qemu_put_be64(f, cpu_clock_offset);
@@ -1079,9 +1076,6 @@ static int timer_load(QEMUFile *f, void *opaque, int version_id)
 {
     if (version_id != 1 && version_id != 2)
         return -EINVAL;
-    if (cpu_ticks_enabled) {
-        return -EINVAL;
-    }
     cpu_ticks_offset=qemu_get_be64(f);
     ticks_per_sec=qemu_get_be64(f);
     if (version_id == 2) {