mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
replay: pass raw icount value to replay_save_clock
This avoids lock recursion when REPLAY_CLOCK is called inside the timers spinlock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0c2ed83fa4
commit
74c0b816ad
7 changed files with 38 additions and 18 deletions
|
@ -15,13 +15,15 @@
|
|||
#include "replay-internal.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
int64_t replay_save_clock(ReplayClockKind kind, int64_t clock)
|
||||
int64_t replay_save_clock(ReplayClockKind kind, int64_t clock, int64_t raw_icount)
|
||||
{
|
||||
|
||||
if (replay_file) {
|
||||
g_assert(replay_mutex_locked());
|
||||
|
||||
replay_save_instructions();
|
||||
/* Due to the caller's locking requirements we get the icount from it
|
||||
* instead of using replay_save_instructions().
|
||||
*/
|
||||
replay_advance_current_step(raw_icount);
|
||||
replay_put_event(EVENT_CLOCK + kind);
|
||||
replay_put_qword(clock);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue