mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
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 <Pavel.Dovgalyuk@ispras.ru> Message-Id: <161347990483.1313189.8371838968343494161.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
82e2756897
commit
366a85e4bb
5 changed files with 37 additions and 35 deletions
|
@ -46,12 +46,12 @@ void replay_read_next_clock(ReplayClockKind kind)
|
|||
}
|
||||
|
||||
/*! Reads next clock event from the input. */
|
||||
int64_t replay_read_clock(ReplayClockKind kind)
|
||||
int64_t replay_read_clock(ReplayClockKind kind, int64_t raw_icount)
|
||||
{
|
||||
int64_t ret;
|
||||
g_assert(replay_file && replay_mutex_locked());
|
||||
|
||||
replay_account_executed_instructions();
|
||||
replay_advance_current_icount(raw_icount);
|
||||
|
||||
if (replay_next_event_is(EVENT_CLOCK + kind)) {
|
||||
replay_read_next_clock(kind);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue