From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzpMh-0001uk-Ny for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:44:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzpMY-0004Wh-7t for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:44:03 -0400 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:61594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzpMY-0004WI-38 for qemu-devel@nongnu.org; Wed, 25 Jun 2014 11:43:54 -0400 Received: by mail-qc0-f171.google.com with SMTP id w7so1887724qcr.16 for ; Wed, 25 Jun 2014 08:43:53 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53AAEE32.2000102@redhat.com> Date: Wed, 25 Jun 2014 17:43:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403709607-6434-1-git-send-email-fred.konrad@greensocs.com> In-Reply-To: <1403709607-6434-1-git-send-email-fred.konrad@greensocs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v5 00/13] Reverse execution. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fred.konrad@greensocs.com, qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, quintela@redhat.com, mark.burton@greensocs.com, dgilbert@redhat.com, amit.shah@redhat.com, vilanova@ac.upc.edu Il 25/06/2014 17:19, fred.konrad@greensocs.com ha scritto: > From: KONRAD Frederic > > Hi everybody, > > This is the fifth version of this RFC (see the changes below). > > Those are the two first patch-set we have been worked on for reverse execution. > > The first part is fully reviewed except the "icount: introduce icount timer" > patch maybe we can merge them? > > The first series: > icount: put icount variables into TimerState. > migration: migrate icount fields. > migration: make qemu_savevm_state public. > icount: introduce icount timer. > icount: check for icount clock deadline when cpu loop exits. > icount: make icount extra computed on icount clock as well. > timer: add cpu_icount_to_ns function. > > are various preparation patches for reverse execution. > > The last patches: > trace-events: add reverse-execution events. > introduce reverse execution mechanism. > gdbstub: allow reverse execution in gdb stub. > cpu-exec: trigger a debug request when rexec stops. > cexe: synchronize icount on the next event. > cexe: allow to enable reverse execution. > > are reverse execution introduction. > > They can be clone at: git://git.greensocs.com/qemu_cexe.git:cexe_2_3_v5 > > The third series will be sent as soon as possible and have some issues with > QEMU's thread as it use fork. > > This implementation of reverse execution works with instruction counting: > > A new clock is implemented which is icount clock. It grows each time an > instruction is executed and is totally independant of host clock. > > Snapshots are taken regularly (based on icount clock) with help of migration > code and written on the disk. > > When user wants to use reverse-stepi: > * Last snapshot is reloaded. > * A stop callback is created to be triggered at the previous instruction. > > This stop callback generates a debug exception so QEMU stops in debug mode. > > Command line: > * -cexe option is added to enable reverse execution, it needs icount 1. What does -cexe stand for? There was a patch on the list to convert -icount to QemuOpts, could you adopt that and add a cexe suboption? Paolo