[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v3 10/13] Simple TLB flush wrap to use as exit callbac
From: |
Alvise Rigo |
Subject: |
[Qemu-devel] [RFC v3 10/13] Simple TLB flush wrap to use as exit callback |
Date: |
Fri, 10 Jul 2015 10:23:43 +0200 |
Add a new way to query a TLB flush request for a given vCPU using the
new callback support.
Suggested-by: Jani Kokkonen <address@hidden>
Suggested-by: Claudio Fontana <address@hidden>
Signed-off-by: Alvise Rigo <address@hidden>
---
cputlb.c | 6 ++++++
include/qom/cpu.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/cputlb.c b/cputlb.c
index fa38714..9794e6b 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -85,6 +85,12 @@ static void tlb_flush_async_work(void *opaque)
g_free(params);
}
+static void cpu_exit_tlb_flush_all_cb(CPUState *cpu, void *opaque)
+{
+ tlb_flush(cpu, 1);
+ cpu->pending_tlb_flush = 0;
+}
+
void tlb_flush_all(int flush_global)
{
CPUState *cpu;
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 0ec020b..c5b93c9 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -326,6 +326,7 @@ struct CPUState {
/* One-shot callbacks for stopping requests. */
struct CPUExitCBs exit_cbs;
volatile int pending_rdv;
+ volatile int pending_tlb_flush;
/* In order to avoid passing too many arguments to the MMIO helpers,
* we store some rarely used information in the CPU context.
--
2.4.5
- Re: [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, 2015/07/10
[Qemu-devel] [RFC v3 10/13] Simple TLB flush wrap to use as exit callback,
Alvise Rigo <=
[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