From patchwork Thu Sep 10 01:04:25 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 33239 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 31F90B707B for ; Thu, 10 Sep 2009 11:10:09 +1000 (EST) Received: from localhost ([127.0.0.1]:35271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlYAo-0006Dg-62 for incoming@patchwork.ozlabs.org; Wed, 09 Sep 2009 21:10:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlY5w-0004Ml-I1 for qemu-devel@nongnu.org; Wed, 09 Sep 2009 21:05:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlY5p-0004Gx-T0 for qemu-devel@nongnu.org; Wed, 09 Sep 2009 21:05:02 -0400 Received: from [199.232.76.173] (port=48251 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlY5p-0004GP-Hy for qemu-devel@nongnu.org; Wed, 09 Sep 2009 21:04:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11710) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlY5o-0002kp-VQ for qemu-devel@nongnu.org; Wed, 09 Sep 2009 21:04:57 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8A14u9l017136 for ; Wed, 9 Sep 2009 21:04:56 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8A14ooX020882; Wed, 9 Sep 2009 21:04:55 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Thu, 10 Sep 2009 03:04:25 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 04/26] timers: remove useless check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- vl.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index 25cad98..448ec6c 100644 --- 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) {