diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-03-28 12:55:26 -0500 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-03-31 21:32:43 +0200 |
| commit | 256ba7715b109c080c0c77a3923df9e69736ba17 (patch) | |
| tree | 33b157f474a3bd00bc76edbb8414359e60804702 /target/mips/tcg/system/tlb_helper.c | |
| parent | d89b9899babcc01d7ee75f2917da861dc2afbc27 (diff) | |
| download | focaccia-qemu-256ba7715b109c080c0c77a3923df9e69736ba17.tar.gz focaccia-qemu-256ba7715b109c080c0c77a3923df9e69736ba17.zip | |
target/mips: Simplify and fix update_pagemask
When update_pagemask was split from helper_mtc0_pagemask,
we failed to actually write to the new parameter but continue
to write to env->CP0_PageMask. Thus the use within
page_table_walk_refill modifies cpu state and not the local
variable as expected.
Simplify by renaming to compute_pagemask and returning the
value directly. No need for either env or pointer return.
Fixes: 074cfcb4dae ("target/mips: Implement hardware page table walker for MIPS32")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250328175526.368121-4-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: qemu-stable@nongnu.org
Diffstat (limited to 'target/mips/tcg/system/tlb_helper.c')
| -rw-r--r-- | target/mips/tcg/system/tlb_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/tlb_helper.c index 123639fa18..df80301a41 100644 --- a/target/mips/tcg/system/tlb_helper.c +++ b/target/mips/tcg/system/tlb_helper.c @@ -876,7 +876,7 @@ refill: } } pw_pagemask = m >> TARGET_PAGE_BITS; - update_pagemask(env, pw_pagemask << CP0PM_MASK, &pw_pagemask); + pw_pagemask = compute_pagemask(pw_pagemask << CP0PM_MASK); pw_entryhi = (address & ~0x1fff) | (env->CP0_EntryHi & 0xFF); { target_ulong tmp_entryhi = env->CP0_EntryHi; |