diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-03-27 10:54:06 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-05-15 10:03:44 +0200 |
commit | 3c13b0ffe76057e93e007bedbad3cc556146e3ed (patch) | |
tree | 04c6c89b39d1ac382370910f50cb6e4c105a6d2e /target/hppa/translate.c | |
parent | a0ea4becca28c1c14de5c3b8bff8343ab184070c (diff) | |
download | qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.zip qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.tar.gz qemu-3c13b0ffe76057e93e007bedbad3cc556146e3ed.tar.bz2 |
linux-user/hppa: Force all code addresses to PRIV_USER
The kernel does this along the return path to user mode.
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/translate.c')
-rw-r--r-- | target/hppa/translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 16b25a9..12359ba 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2054,7 +2054,7 @@ static void do_page_zero(DisasContext *ctx) tcg_gen_st_i64(cpu_gr[26], tcg_env, offsetof(CPUHPPAState, cr[27])); - tcg_gen_ori_i64(next.base, cpu_gr[31], 3); + tcg_gen_ori_i64(next.base, cpu_gr[31], PRIV_USER); install_iaq_entries(ctx, &next, NULL); ctx->base.is_jmp = DISAS_IAQ_N_UPDATED; } @@ -4583,7 +4583,7 @@ static void hppa_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->is_pa20 = hppa_is_pa20(cpu_env(cs)); #ifdef CONFIG_USER_ONLY - ctx->privilege = MMU_IDX_TO_PRIV(MMU_USER_IDX); + ctx->privilege = PRIV_USER; ctx->mmu_idx = MMU_USER_IDX; ctx->iaoq_first = ctx->base.pc_first | ctx->privilege; ctx->iaq_b.disp = ctx->base.tb->cs_base - ctx->base.pc_first; |