qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] reverse execution.
@ 2013-05-07 18:27 KONRAD Frédéric
  2013-05-09 17:54 ` Blue Swirl
  0 siblings, 1 reply; 17+ messages in thread
From: KONRAD Frédéric @ 2013-05-07 18:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark Burton, fred.konrad

Hi,

We are trying to find a way to do reverse execution happen with QEMU.

Actually, it is possible to debug the guest through the gdbstub, we want to
make the reverse execution possible with GDB as well.

How we are trying to make that working (basically without optimisation):

-QEMU takes regular snapshot of the VM:
    that can be done with the save vm code without optimisation first.

-When the VM is stopped and GDB requests a reverse-step:
    load the last snapshot and replay to one instruction before the 
current PC.

There are one issue with that for now (for a basic running reverse 
execution):
     -How to stop one instruction before the actual PC.

We though that using "-icount" and stop the guest a little time before the
actual position would give us the right behavior (We use a qemu_timer with
vm_clock to stop the vm at the good time), but it seems that it is not
deterministic, and not reproducable.

Is that normal?

We don't make any input during the replay, and we though that it can be 
caused
by some timer interruption but "-icount" is using a virtual timer as I
understand?

We have two other ideas:

     -Using TCI and count each instruction executed by the processor, 
then stop
         one instruction before the actual position. This seems slower.

     -Using single-step to count each instruction, then stop one instruction
         before the actual position.

Would that be better?

For now we can restore the VM from the last snapshot, when we do a 
reverse-step
but we can't stop at the exact position.

Thanks,
Fred

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-05-29 12:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 18:27 [Qemu-devel] [RFC] reverse execution KONRAD Frédéric
2013-05-09 17:54 ` Blue Swirl
2013-05-17 17:23   ` KONRAD Frédéric
2013-05-17 17:54     ` Peter Maydell
2013-05-17 19:16       ` Mark Burton
2013-05-23  1:57         ` Edgar E. Iglesias
2013-05-18 18:52     ` Blue Swirl
2013-05-22 16:14       ` KONRAD Frédéric
2013-05-19  4:37     ` Rob Landley
2013-05-19  7:21       ` Peter Maydell
2013-05-19 20:09         ` Mark Burton
2013-05-19 21:20           ` Peter Maydell
     [not found]             ` <CAD2=zRDphd7N5gCQeX6oVQP=HEbRRMpcwPKEVDj46DHKhgkKMw@mail.gmail.com>
2013-05-19 21:47               ` Brendan Dolan-Gavitt
2013-05-20  5:28             ` Mark Burton
2013-05-19 21:39           ` Rob Landley
2013-05-20  5:34             ` Mark Burton
2013-05-29 12:37           ` Pavel Dovgaluk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).