On 08/09/2014 09:57, Frederic Konrad wrote:
On 01/09/2014 18:22, Paolo Bonzini wrote:
Il 03/07/2014 16:33, fred.kon...@greensocs.com ha scritto:
From: KONRAD Frederic <fred.kon...@greensocs.com>
Hi everybody,
This is the sixth 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.
rexec: synchronize icount on the next event.
rexec: allow to enable reverse execution.
are reverse execution introduction.
They can be clone at: git://git.greensocs.com/qemu_cexe.git:cexe_2_3_v6
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:
* rexec suboption is added to icount to enable reverse execution,
it needs
icount=N and doesn't support auto mode.
About non determinism in QEMU:
* This implementation doesn't take IO in account so any IO will
cause non
determinism and break reverse execution.
* The icount warp mechanism have been disabled when reverse
execution is
enabled so the time grow differently inside the VM.
Testing:
* It has been tested on ARM without any IO such as network or
asynchronous file
access to keep the deterministic behaviour of icount.
Known issues:
* On ARM stepi seems to do some additional steps which are added
to icount
counter so reverse-stepi just after stepi is broken.
* The IO replay explained above.
Hi, can you rebase and repost these patches? It would be nice to have a
discussion of the different approaches to record/replay in your patches
and Pavel's (perhaps before Pavel presents at KVM Forum).
Paolo
Hi Paolo,
Sorry for the delay.
I'll rebase and resend these patches this week.
Thanks,
Fred
By the way how do you want to have this discussion?
At the KVM forum? Or by phone on KVM phone call?
Fred