From 878ec29b9c1915ea0da951064b8aac3050f2f5b9 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 19 Dec 2019 15:50:48 +0300 Subject: 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 Message-Id: <157675984852.14505.15709141760677102489.stgit@pasha-Precision-3630-Tower> Signed-off-by: Paolo Bonzini --- stubs/replay.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'stubs/replay.c') diff --git a/stubs/replay.c b/stubs/replay.c index 10b3925e2f..5974ec1f50 100644 --- a/stubs/replay.c +++ b/stubs/replay.c @@ -79,3 +79,12 @@ void replay_mutex_lock(void) void replay_mutex_unlock(void) { } + +void replay_save_random(int ret, void *buf, size_t len) +{ +} + +int replay_read_random(void *buf, size_t len) +{ + return 0; +} -- cgit v1.2.3