From d5de20bd84ae3a6f6c194f0088cfcb4d4f6af602 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Mon, 11 Mar 2019 20:16:00 +0100 Subject: target/hppa: add TLB protection id check Signed-off-by: Sven Schnelle Message-Id: <20190311191602.25796-10-svens@stackframe.org> [rth: Add required tlb flushing when prot id registers change.] Signed-off-by: Richard Henderson --- target/hppa/translate.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'target/hppa/translate.c') diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 6ac196804b..70a7cd4a89 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2256,6 +2256,16 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a) offsetof(CPUHPPAState, cr_back[ctl - CR_IIASQ])); break; + case CR_PID1: + case CR_PID2: + case CR_PID3: + case CR_PID4: + tcg_gen_st_reg(reg, cpu_env, offsetof(CPUHPPAState, cr[ctl])); +#ifndef CONFIG_USER_ONLY + gen_helper_change_prot_id(cpu_env); +#endif + break; + default: tcg_gen_st_reg(reg, cpu_env, offsetof(CPUHPPAState, cr[ctl])); break; -- cgit v1.2.3