From 366a85e4bb748794b1ae0ca0ccc2d95f316679a0 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Tue, 16 Feb 2021 15:51:44 +0300 Subject: replay: fix icount request when replaying clock access Record/replay provides REPLAY_CLOCK_LOCKED macro to access the clock when vm_clock_seqlock is locked. This macro is needed because replay internals operate icount. In locked case replay use icount_get_raw_locked for icount request, which prevents excess locking which leads to deadlock. But previously only record code used *_locked function and replay did not. Therefore sometimes clock access lead to deadlocks. This patch fixes clock access for replay too and uses *_locked icount access function. Signed-off-by: Pavel Dovgalyuk Message-Id: <161347990483.1313189.8371838968343494161.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini --- stubs/replay-tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stubs') diff --git a/stubs/replay-tools.c b/stubs/replay-tools.c index c06b360..43296b3 100644 --- a/stubs/replay-tools.c +++ b/stubs/replay-tools.c @@ -13,7 +13,7 @@ int64_t replay_save_clock(unsigned int kind, int64_t clock, int64_t raw_icount) return 0; } -int64_t replay_read_clock(unsigned int kind) +int64_t replay_read_clock(unsigned int kind, int64_t raw_icount) { abort(); return 0; -- cgit v1.1