qemu/target/mips
Richard Henderson 08c3572736 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: 074cfcb4da ("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
(cherry picked from commit 256ba7715b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-04-05 16:48:28 +03:00
..
sysemu target/mips: Remove unused CPUMIPSState::current_fpu field 2024-11-03 05:52:49 -03:00
tcg target/mips: Simplify and fix update_pagemask 2025-04-05 16:48:28 +03:00
cpu-defs.c.inc target/mips: Introduce disas_mt_available() 2024-11-03 05:52:49 -03:00
cpu-param.h target/mips: Revert TARGET_PAGE_BITS_VARY 2025-04-05 16:48:28 +03:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c target/mips: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:53 +00:00
cpu.h target/mips: Remove unused CPUMIPSState::current_fpu field 2024-11-03 05:52:49 -03:00
fpu.c target/mips: Optimize CPU/FPU regnames[] arrays 2021-05-02 16:49:34 +02:00
fpu_helper.h target/mips: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:53 +00:00
gdbstub.c target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:24 +01:00
helper.h target/mips: Implement Loongson CSR instructions 2023-07-10 23:33:37 +02:00
internal.h target/mips: Introduce mo_endian_env() helper 2024-10-15 12:13:59 -03:00
Kconfig target/mips: Restrict semihosting to TCG 2024-07-22 09:38:10 +01:00
kvm.c kvm: Allow kvm_arch_get/put_registers to accept Error** 2024-10-03 22:04:19 +02:00
kvm_mips.h kvm: Introduce kvm_arch_get_default_type hook 2023-08-22 17:31:02 +01:00
meson.build meson: rename config_all 2023-12-31 09:11:28 +01:00
mips-defs.h target/mips: Introduce disas_mt_available() 2024-11-03 05:52:49 -03:00
msa.c target/mips: Explicitly set 2-NaN propagation rule 2024-11-05 10:09:53 +00:00