From patchwork Tue Oct 13 08:10:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Dovgalyuk X-Patchwork-Id: 529621 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C32E61402C4 for ; Tue, 13 Oct 2015 19:11:01 +1100 (AEDT) Received: from localhost ([::1]:32914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlufj-00084q-Qu for incoming@patchwork.ozlabs.org; Tue, 13 Oct 2015 04:10:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zluf9-0007o6-CJ for qemu-devel@nongnu.org; Tue, 13 Oct 2015 04:10:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zluf4-0006rs-C9 for qemu-devel@nongnu.org; Tue, 13 Oct 2015 04:10:23 -0400 Received: from mail.ispras.ru ([83.149.199.45]:54604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zluf4-0006rD-4R for qemu-devel@nongnu.org; Tue, 13 Oct 2015 04:10:18 -0400 Received: from PASHAISP (unknown [85.142.117.224]) by mail.ispras.ru (Postfix) with ESMTPSA id A2231540084; Tue, 13 Oct 2015 11:10:15 +0300 (MSK) From: "Pavel Dovgaluk" To: "'Paolo Bonzini'" , References: <1444161658-15038-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1444161658-15038-1-git-send-email-pbonzini@redhat.com> Date: Tue, 13 Oct 2015 11:10:16 +0300 Message-ID: <001601d1058e$98742b20$c95c8160$@Dovgaluk@ispras.ru> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdEAcb1wRCYbzRWlQMOiwcBHSwwhOgFHInYA Content-Language: ru X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 83.149.199.45 Subject: Re: [Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org There is one more fix. Sometimes replay cannot continue after stopping/restarting of the virtual machine. This happens because warp on stopped machine and on running machine behaves differently. Timers deadline calculation depends on enabled flag of the virtual timer. The following patch fixes the problem - it disables warp when machine is stopped. index 5130806..7a337d9 100644 Pavel Dovgalyuk > -----Original Message----- > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini > Sent: Tuesday, October 06, 2015 11:01 PM > To: qemu-devel@nongnu.org > Cc: pavel.dovgaluk@ispras.ru > Subject: [RFH PATCH 0/4] record/replay fixups and doubts > > These are some comments I have about the record/replay code. I can > integrate these in your patches myself, but I need an ack/tested-by and > in some case more answers... Please take a look. > > Paolo Bonzini (4): > replay: generalize ptimer event to bottom halves > more replay fixes > why is runstate_is_running needed? > events doubts > > Makefile.objs | 2 ++ > Makefile.target | 1 - > cpu-exec.c | 2 +- > cpus.c | 2 +- > exec.c | 2 +- > hw/bt/hci.c | 4 ++-- > hw/core/ptimer.c | 8 ++------ > include/qapi/qmp/qerror.h | 2 +- > {replay => include/sysemu}/replay.h | 4 ++-- > qapi/common.json | 6 +----- > qemu-timer.c | 23 +++++++++-------------- > replay/Makefile.objs | 11 +++++------ > replay/replay-events.c | 24 +++++++++++++++--------- > replay/replay-input.c | 2 +- > replay/replay-internal.c | 4 ++-- > replay/replay-internal.h | 2 +- > replay/replay-time.c | 2 +- > replay/replay.c | 2 +- > stubs/Makefile.objs | 1 + > {replay => stubs}/replay-user.c | 6 +----- > stubs/replay.c | 10 +++++----- > ui/input.c | 2 +- > vl.c | 6 +++--- > 23 files changed, 59 insertions(+), 69 deletions(-) > rename {replay => include/sysemu}/replay.h (97%) > mode change 100755 => 100644 replay/Makefile.objs > mode change 100755 => 100644 replay/replay-events.c > mode change 100755 => 100644 replay/replay-input.c > mode change 100755 => 100644 replay/replay-internal.c > mode change 100755 => 100644 replay/replay-internal.h > mode change 100755 => 100644 replay/replay-time.c > mode change 100755 => 100644 replay/replay.c > rename {replay => stubs}/replay-user.c (90%) > > -- > 2.5.0 --- a/cpus.c +++ b/cpus.c @@ -411,7 +411,7 @@ void qemu_clock_warp(QEMUClockType type) } /* warp clock deterministically in record/replay mode */ - if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP)) { + if (!runstate_is_running() || !replay_checkpoint(CHECKPOINT_CLOCK_WARP)) { return; }