All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: qemu-ppc@nongnu.org, alex.bennee@linaro.org,
	david@gibson.dropbear.id.au, rth@twiddle.net
Cc: qemu-devel@nongnu.org, nikunj@linux.vnet.ibm.com,
	benh@kernel.crashing.org
Subject: [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu
Date: Fri,  2 Sep 2016 12:02:56 +0530	[thread overview]
Message-ID: <1472797976-24210-5-git-send-email-nikunj@linux.vnet.ibm.com> (raw)
In-Reply-To: <1472797976-24210-1-git-send-email-nikunj@linux.vnet.ibm.com>

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
 cputlb.c                | 15 +++++++++++++++
 include/exec/exec-all.h |  2 ++
 target-ppc/mmu-hash64.c |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/cputlb.c b/cputlb.c
index 64faf47..17ff58e 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -123,6 +123,21 @@ void tlb_flush(CPUState *cpu, int flush_global)
     }
 }
 
+static void tlb_flush_all_async_work(CPUState *cpu, void *opaque)
+{
+    tlb_flush_nocheck(cpu, GPOINTER_TO_INT(opaque));
+}
+
+void tlb_flush_all(CPUState *cpu, int flush_global)
+{
+    CPUState *c;
+
+    CPU_FOREACH(c) {
+        async_run_on_cpu(c, tlb_flush_all_async_work,
+                         GUINT_TO_POINTER(flush_global));
+    }
+}
+
 static void tlb_flush_by_mmuidx_async_work(CPUState *cpu, void *mmu_bitmask)
 {
     CPUArchState *env = cpu->env_ptr;
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index e9f3bcf..55c344b 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -116,6 +116,8 @@ void tlb_flush_page(CPUState *cpu, target_ulong addr);
  * TLB entries, and the argument is ignored.
  */
 void tlb_flush(CPUState *cpu, int flush_global);
+void tlb_flush_all(CPUState *cpu, int flush_global);
+
 /**
  * tlb_flush_page_by_mmuidx:
  * @cpu: CPU whose TLB should be flushed
diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c
index 8118143..d852c21 100644
--- a/target-ppc/mmu-hash64.c
+++ b/target-ppc/mmu-hash64.c
@@ -912,7 +912,7 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu,
      * invalidate, and we still don't have a tlb_flush_mask(env, n,
      * mask) in QEMU, we just invalidate all TLBs
      */
-    tlb_flush(CPU(cpu), 1);
+    tlb_flush_all(CPU(cpu), 1);
 }
 
 void ppc_hash64_update_rmls(CPUPPCState *env)
-- 
2.7.4

  parent reply	other threads:[~2016-09-02  6:33 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  6:32 [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC Nikunj A Dadhania
2016-09-02  6:32 ` [Qemu-devel] [PATCH RFC 1/4] spapr-hcall: take iothread lock during handler call Nikunj A Dadhania
2016-09-02  8:53   ` Greg Kurz
2016-09-02  9:28     ` Nikunj A Dadhania
2016-09-02  9:57       ` Greg Kurz
2016-09-03 16:31         ` Nikunj A Dadhania
2016-09-02 10:06   ` Thomas Huth
2016-09-03 16:33     ` Nikunj A Dadhania
2016-09-02  6:32 ` [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads Nikunj A Dadhania
2016-09-02  9:28   ` Greg Kurz
2016-09-02  9:34     ` Nikunj A Dadhania
2016-09-02 10:45       ` Greg Kurz
2016-09-03 16:34         ` Nikunj A Dadhania
2016-09-07  3:51   ` David Gibson
2016-09-07  4:41     ` Nikunj A Dadhania
2016-09-02  6:32 ` [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation Nikunj A Dadhania
2016-09-07  4:02   ` David Gibson
2016-09-07  4:47     ` Nikunj A Dadhania
2016-09-07  5:24       ` Benjamin Herrenschmidt
2016-09-07  8:42         ` Nikunj A Dadhania
2016-09-07  5:34       ` David Gibson
2016-09-07  7:13         ` Alex Bennée
2016-09-12  1:19           ` David Gibson
2016-09-12  8:39             ` Alex Bennée
2016-09-12  9:15               ` Benjamin Herrenschmidt
2016-09-02  6:32 ` Nikunj A Dadhania [this message]
2016-09-02  7:22   ` [Qemu-devel] [PATCH RFC 4/4] target-ppc: flush tlb from all the cpu Benjamin Herrenschmidt
2016-09-02  7:34     ` Nikunj A Dadhania
2016-09-04 17:00       ` Alex Bennée
2016-09-04 22:17         ` Benjamin Herrenschmidt
2016-09-05  0:10         ` Benjamin Herrenschmidt
2016-09-06  1:55           ` Nikunj A Dadhania
2016-09-06  3:05             ` Benjamin Herrenschmidt
2016-09-06  4:53               ` Nikunj A Dadhania
2016-09-06  5:30                 ` Benjamin Herrenschmidt
2016-09-06  6:57                   ` Nikunj A Dadhania
2016-09-02  6:43 ` [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC Cédric Le Goater
2016-09-02  6:46   ` Nikunj A Dadhania
2016-09-02  7:57   ` Thomas Huth
2016-09-02 11:44     ` Cédric Le Goater
2016-09-02  7:19 ` Benjamin Herrenschmidt
2016-09-02  7:39   ` Nikunj A Dadhania
2016-09-02 12:13     ` Benjamin Herrenschmidt
2016-09-07  4:08   ` David Gibson
2016-09-07  4:48     ` Nikunj A Dadhania

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472797976-24210-5-git-send-email-nikunj@linux.vnet.ibm.com \
    --to=nikunj@linux.vnet.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.