aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/helper.h
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2017-04-13 16:02:36 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2017-04-26 12:41:56 +1000
commit31b2b0f8463533c32b5ad76e73668e2e9fca8ae2 (patch)
treee39b281fda73aaf3999bad82aa820393964d84ee /target/ppc/helper.h
parent8f37e54e5b9960151dfb16183fc1c530a0674c77 (diff)
downloadqemu-31b2b0f8463533c32b5ad76e73668e2e9fca8ae2.zip
qemu-31b2b0f8463533c32b5ad76e73668e2e9fca8ae2.tar.gz
qemu-31b2b0f8463533c32b5ad76e73668e2e9fca8ae2.tar.bz2
target/ppc: Flush TLB on write to PIDR
The PIDR (process id register) is used to store the id of the currently running process, which is used to select the process table entry used to perform address translation. This means that when we write to this register all the translations in the TLB become outdated as they are for a previously running process. Thus when this register is written to we need to invalidate the TLB entries to ensure stale entries aren't used to to perform translation for the new process, which would result in at best segfaults or alternatively just random memory being accessed. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [dwg: Fixed compile error for 32-bit targets] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/helper.h')
-rw-r--r--target/ppc/helper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/ppc/helper.h b/target/ppc/helper.h
index 6d77661..bb6a94a 100644
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -709,6 +709,7 @@ DEF_HELPER_FLAGS_1(load_601_rtcu, TCG_CALL_NO_RWG, tl, env)
DEF_HELPER_FLAGS_1(load_purr, TCG_CALL_NO_RWG, tl, env)
#endif
DEF_HELPER_2(store_sdr1, void, env, tl)
+DEF_HELPER_2(store_pidr, void, env, tl)
DEF_HELPER_FLAGS_2(store_tbl, TCG_CALL_NO_RWG, void, env, tl)
DEF_HELPER_FLAGS_2(store_tbu, TCG_CALL_NO_RWG, void, env, tl)
DEF_HELPER_FLAGS_2(store_atbl, TCG_CALL_NO_RWG, void, env, tl)