aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu/replay.h
diff options
context:
space:
mode:
authorPavel Dovgalyuk <pavel.dovgaluk@gmail.com>2019-12-19 15:50:48 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-07 12:08:39 +0100
commit878ec29b9c1915ea0da951064b8aac3050f2f5b9 (patch)
tree157253fa0974bd1e85f066c9c98b102e5de5cc67 /include/sysemu/replay.h
parentfc6b2dbac1d57fc24420fb8ee25911eb6f1d1fb5 (diff)
replay: record and replay random number sources
Record/replay feature of icount allows deterministic running of execution scenarios. Some CPUs and peripheral devices read random numbers from external sources making deterministic execution impossible. This patch adds recording and replaying of random read operations into guest-random module, which is used by the virtual hardware. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <157675984852.14505.15709141760677102489.stgit@pasha-Precision-3630-Tower> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/sysemu/replay.h')
-rw-r--r--include/sysemu/replay.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index 8df517298c..5471bb514d 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -117,6 +117,13 @@ int64_t replay_read_clock(ReplayClockKind kind);
? replay_save_clock((clock), (value), cpu_get_icount_raw_locked()) \
: (value))
+/* Processing data from random generators */
+
+/* Saves the values from the random number generator */
+void replay_save_random(int ret, void *buf, size_t len);
+/* Loads the saved values for the random number generator */
+int replay_read_random(void *buf, size_t len);
+
/* Events */
/*! Called when qemu shutdown is requested. */