@@ -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;
@@ -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.
Add a new way to query a TLB flush request for a given vCPU using the new callback support. Suggested-by: Jani Kokkonen <jani.kokkonen@huawei.com> Suggested-by: Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com> --- cputlb.c | 6 ++++++ include/qom/cpu.h | 1 + 2 files changed, 7 insertions(+)