[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/30] replay: don't synchronize memory operations in replay mode
From: |
Paolo Bonzini |
Subject: |
[PULL 11/30] replay: don't synchronize memory operations in replay mode |
Date: |
Wed, 2 Oct 2019 18:51:34 +0200 |
From: Pavel Dovgalyuk <address@hidden>
Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization
of vCPU and migration operations through calling run_on_cpu operation.
However, in replay mode this synchronization is unneeded, because
I/O and vCPU threads are already synchronized.
This patch disables such synchronization for record/replay mode.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
exec.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/exec.c b/exec.c
index 8a0a661..1d6e4d8 100644
--- a/exec.c
+++ b/exec.c
@@ -2959,8 +2959,17 @@ static void tcg_log_global_after_sync(MemoryListener
*listener)
* by pushing the migration thread's memory read after the vCPU thread has
* written the memory.
*/
- cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
- run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL);
+ if (replay_mode == REPLAY_MODE_NONE) {
+ /*
+ * VGA can make calls to this function while updating the screen.
+ * In record/replay mode this causes a deadlock, because
+ * run_on_cpu waits for rr mutex. Therefore no races are possible
+ * in this case and no need for making run_on_cpu when
+ * record/replay is not enabled.
+ */
+ cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
+ run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL);
+ }
}
static void tcg_commit(MemoryListener *listener)
--
1.8.3.1
- [PULL 00/30] Misc patches for 2010-10-02, Paolo Bonzini, 2019/10/02
- [PULL 02/30] target/i386: handle filtered_features in a new function mark_unavailable_features, Paolo Bonzini, 2019/10/02
- [PULL 01/30] tests/migration: Add a test for auto converge, Paolo Bonzini, 2019/10/02
- [PULL 03/30] target/i386: introduce generic feature dependency mechanism, Paolo Bonzini, 2019/10/02
- [PULL 04/30] target/i386: expand feature words to 64 bits, Paolo Bonzini, 2019/10/02
- [PULL 06/30] vmxcap: correct the name of the variables, Paolo Bonzini, 2019/10/02
- [PULL 08/30] target/i386: work around KVM_GET_MSRS bug for secondary execution controls, Paolo Bonzini, 2019/10/02
- [PULL 05/30] target/i386: add VMX definitions, Paolo Bonzini, 2019/10/02
- [PULL 10/30] qemu-pr-helper: fix crash in mpath_reconstruct_sense, Paolo Bonzini, 2019/10/02
- [PULL 11/30] replay: don't synchronize memory operations in replay mode,
Paolo Bonzini <=
- [PULL 07/30] target/i386: add VMX features, Paolo Bonzini, 2019/10/02
- [PULL 09/30] target/i386/kvm: Silence warning from Valgrind about uninitialized bytes, Paolo Bonzini, 2019/10/02
- [PULL 12/30] Makefile: Remove generated files when doing 'distclean', Paolo Bonzini, 2019/10/02
[PULL 13/30] hw/isa: Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c, Paolo Bonzini, 2019/10/02
[PULL 14/30] ide: fix leak from qemu_allocate_irqs, Paolo Bonzini, 2019/10/02
[PULL 16/30] mcf5208: fix leak from qemu_allocate_irqs, Paolo Bonzini, 2019/10/02