diff options
| author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2015-09-17 19:24:44 +0300 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-11-06 10:16:03 +0100 |
| commit | 8bd7f71d794b93ce027b856f5b79a98f4f82e44c (patch) | |
| tree | 677dd815bbd08d96bc444396d80acff1a1997dc2 /cpus.c | |
| parent | efab87cf79077a9624f675fc5fc8f034eaedfe4d (diff) | |
| download | focaccia-qemu-8bd7f71d794b93ce027b856f5b79a98f4f82e44c.tar.gz focaccia-qemu-8bd7f71d794b93ce027b856f5b79a98f4f82e44c.zip | |
replay: checkpoints
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162444.8676.52916.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'cpus.c')
| -rw-r--r-- | cpus.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c index 1a7318f513..2619fd057b 100644 --- a/cpus.c +++ b/cpus.c @@ -410,6 +410,18 @@ void qemu_clock_warp(QEMUClockType type) return; } + /* Nothing to do if the VM is stopped: QEMU_CLOCK_VIRTUAL timers + * do not fire, so computing the deadline does not make sense. + */ + if (!runstate_is_running()) { + return; + } + + /* warp clock deterministically in record/replay mode */ + if (!replay_checkpoint(CHECKPOINT_CLOCK_WARP)) { + return; + } + if (icount_sleep) { /* * If the CPUs have been sleeping, advance QEMU_CLOCK_VIRTUAL timer now. |