replay: fixed replay_enable_events
This patch fixes assignment to internal events_enabled variable. Now it is set only in record/replay mode. This affects the behavior of the external functions that check this flag. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095209.1060.45884.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
This commit is contained in:
parent
1a96e3c1e7
commit
1652e0c30f
@ -67,7 +67,9 @@ static void replay_run_event(Event *event)
|
||||
|
||||
void replay_enable_events(void)
|
||||
{
|
||||
events_enabled = true;
|
||||
if (replay_mode != REPLAY_MODE_NONE) {
|
||||
events_enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool replay_has_events(void)
|
||||
@ -141,7 +143,7 @@ void replay_add_event(ReplayAsyncEventKind event_kind,
|
||||
|
||||
void replay_bh_schedule_event(QEMUBH *bh)
|
||||
{
|
||||
if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
|
||||
if (events_enabled) {
|
||||
uint64_t id = replay_get_current_step();
|
||||
replay_add_event(REPLAY_ASYNC_EVENT_BH, bh, NULL, id);
|
||||
} else {
|
||||
@ -161,7 +163,7 @@ void replay_add_input_sync_event(void)
|
||||
|
||||
void replay_block_event(QEMUBH *bh, uint64_t id)
|
||||
{
|
||||
if (replay_mode != REPLAY_MODE_NONE && events_enabled) {
|
||||
if (events_enabled) {
|
||||
replay_add_event(REPLAY_ASYNC_EVENT_BLOCK, bh, NULL, id);
|
||||
} else {
|
||||
qemu_bh_schedule(bh);
|
||||
|
Loading…
Reference in New Issue
Block a user