[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v3 11/13] Introduce exit_flush_req and tcg_excl_access
From: |
Alvise Rigo |
Subject: |
[Qemu-devel] [RFC v3 11/13] Introduce exit_flush_req and tcg_excl_access_lock |
Date: |
Fri, 10 Jul 2015 10:23:44 +0200 |
Introduce two new variables to synchronize the vCPUs during atomic
operations.
- exit_flush_request allows one vCPU to make an exclusive flush request for all
the running vCPUs
- tcg_excl_access_lock is a mutex that protects all the sensible
operations concerning atomic instruction emulation. Most of all, the
mutex is used to protect the env->exclusive_protected_hwaddr (one
mutex for all vCPUs).
Suggested-by: Jani Kokkonen <address@hidden>
Suggested-by: Claudio Fontana <address@hidden>
Signed-off-by: Alvise Rigo <address@hidden>
---
cputlb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cputlb.c b/cputlb.c
index 9794e6b..66df41a 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -39,6 +39,10 @@ void qemu_mutex_unlock_iothread(void);
/* statistics */
int tlb_flush_count;
+/* For atomic instruction handling. */
+volatile int exit_flush_request = 0;
+QemuMutex tcg_excl_access_lock;
+
/* NOTE:
* If flush_global is true (the usual case), flush all tlb entries.
* If flush_global is false, flush (at least) all tlb entries not
--
2.4.5
- [Qemu-devel] [RFC v3 05/13] target-arm: translate: implement qemu_ldlink and qemu_stcond ops, (continued)
[Qemu-devel] [RFC v3 11/13] Introduce exit_flush_req and tcg_excl_access_lock,
Alvise Rigo <=
[Qemu-devel] [RFC v3 10/13] Simple TLB flush wrap to use as exit callback, Alvise Rigo, 2015/07/10
[Qemu-devel] [RFC v3 13/13] softmmu_template.h: move to multithreading, Alvise Rigo, 2015/07/10
[Qemu-devel] [RFC v3 12/13] softmmu_llsc_template.h: move to multithreading, Alvise Rigo, 2015/07/10
Re: [Qemu-devel] [RFC v3 00/13] Slow-path for atomic instruction translation, Mark Burton, 2015/07/10
Re: [Qemu-devel] [RFC v3 00/13] Slow-path for atomic instruction translation, Frederic Konrad, 2015/07/10