All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel Dovgaluk" <Pavel.Dovgaluk@ispras.ru>
To: 'Frederic Konrad' <fred.konrad@greensocs.com>
Cc: 'Paolo Bonzini' <pbonzini@redhat.com>,
	'Peter Crosthwaite' <peter.crosthwaite@xilinx.com>,
	'Mark Burton' <mark.burton@greensocs.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Reverse execution and deterministic replay
Date: Fri, 27 Jun 2014 14:35:04 +0400	[thread overview]
Message-ID: <008401cf91f3$75690110$603b0330$@Dovgaluk@ispras.ru> (raw)
In-Reply-To: <53AD21AB.1040609@greensocs.com>

> -----Original Message-----
> From: Frederic Konrad [mailto:fred.konrad@greensocs.com]
> Sent: Friday, June 27, 2014 11:48 AM
> To: Pavel Dovgaluk
> Cc: Peter Crosthwaite; Paolo Bonzini; qemu-devel@nongnu.org Developers; Mark Burton
> Subject: Re: [Qemu-devel] Reverse execution and deterministic replay
> 
> On 27/06/2014 08:11, Peter Crosthwaite wrote:
> > Hi Pavel,
> >
> > On Fri, Jun 27, 2014 at 3:18 PM, Pavel Dovgaluk
> > <Pavel.Dovgaluk@ispras.ru> wrote:
> >> Hello!
> >>
> >> We want to publish set of patches related to the reverse execution and deterministic replay
> of qemu.
> >> Our implementation of deterministic replay can be used for deterministic and reverse
> debugging of
> >> guest code through gdb remote interface.
> >>
> >> Execution recording writes non-deterministic events log, which can be later used for
> replaying the
> >> execution anywhere and for unlimited number of times. It also supports checkpointing for
> faster
> >> rewinding during reverse debugging. Execution replaying reads the log and replays all
> >> non-deterministic events including external input, hardware clocks, and interrupts.
> >>
> >> Reverse execution has the following features:
> >>   * Deterministically replays whole system execution and all contents of the memory,
> >>     state of the hadrware devices, clocks, and screen of the VM.
> >>   * Writes execution log into the file for latter replaying for multiple times
> >>     on different machines.
> >>   * Supports i386, x86_64, and ARM hardware platforms.
> >>   * Performs deterministic replay of all operations with keyboard, mouse, network adapters,
> >>     audio devices, serial interfaces, and physical USB devices connected to the emulator.
> >>   * Provides support for gdb reverse debugging commands like reverse-step and reverse-
> continue.
> >>   * Supports auto-checkpointing for convenient reverse debugging.
> >>   * Allows "going to the live execution" from the replay mode.
> >>
> >> Our implementation is completely tested for qemu 1.5 and is in beta state for 2.0.50.
> >>
> >> Some details about our implementation of reverse execution can be found in paper:
> >> http://www.computer.org/csdl/proceedings/csmr/2012/4666/00/4666a553-abs.html
> >>
> > Add relevant implementation details to the git commit messages.
> >
> >> Can anyone review our patches?
> >>
> > Fred Konrad is doing a series on reverse exe at the moment. CC. Is the
> > an independent implementation of the same thing or are you building on
> > it?
> 
> Hi,
> 
> Yes seems we are doing the same thing only we use icount as an instruction
> counter and you created a new instruction counter?

Yes, we created new instruction-accurate counter.

> This has advantage of having it working everywhere icount works but the
> disavantages of having to use icount for reverse execution.

The major disadvantage of icount is that it's updated only on TB boundaries.
When one instruction in the middle of the block uses virtual clock, it could
have different values for different divisions of the code to TB. E.g. you can
stop the execution using the debugger in the middle of the block. 
It will lead to creation of the new block starting from the next instruction
(which previously was in the middle of the TB). Reading virtual clock by this
instruction can give you different values.

> I think we can use both way so the reverse execution will works on other
> architecture the time an instruction counter is added to them.
> 
> I'm sure your patches will add to our solution and I can review your patches
> when you'll send them.
> 
> It would help if you rebase them on the patch set that is currently on
> the list:
> "[RFC PATCH v5 00/13] Reverse execution." I sent two days ago.

We do not use icount at all. We record virtual time into the replay log instead.
But we implemented an icount-like feature, which computes the values of virtual
clock and TSC using our internal instruction counter.

> 
> Thanks,
> Fred
> >
> > I suggest posting a full RFC, this looks to me just like a cover
> > letter but without a series.
> >
> > Note that we are going into hard freeze imminently so there will be
> > some delay for merge.
> >
> > Regards,
> > Peter
> >
> >> Pavel Dovgaluk
> >>
> >>
> >>


Pavel Dovgaluk

  reply	other threads:[~2014-06-27 10:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53acfed7.e3538c0a.39e2.ffffb619SMTPIN_ADDED_BROKEN@mx.google.com>
2014-06-27  6:11 ` [Qemu-devel] Reverse execution and deterministic replay Peter Crosthwaite
2014-06-27  6:20   ` Pavel Dovgaluk
2014-06-27  7:47   ` Frederic Konrad
2014-06-27 10:35     ` Pavel Dovgaluk [this message]
     [not found]     ` <53ad4904.8360e50a.0f7f.ffffce7dSMTPIN_ADDED_BROKEN@mx.google.com>
2014-06-27 10:54       ` Peter Maydell
2014-06-27 11:17         ` Pavel Dovgaluk
2014-06-27 13:43           ` Frederic Konrad
2014-06-27 11:31         ` Pavel Dovgaluk
     [not found]         ` <53ad5626.82a3700a.2864.fffffc92SMTPIN_ADDED_BROKEN@mx.google.com>
2014-06-27 11:50           ` Peter Maydell
     [not found] <53acfecd.c842e00a.6a5f.45f1SMTPIN_ADDED_BROKEN@mx.google.com>
2014-06-27  8:27 ` Peter Maydell
2014-06-27  5:18 Pavel Dovgaluk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='008401cf91f3$75690110$603b0330$@Dovgaluk@ispras.ru' \
    --to=pavel.dovgaluk@ispras.ru \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.