qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-9.1 v2 2/2] target/mips: Use correct MMU index in get_pte


From: Richard Henderson
Subject: Re: [PATCH-for-9.1 v2 2/2] target/mips: Use correct MMU index in get_pte()
Date: Tue, 13 Aug 2024 21:04:33 +1000
User-agent: Mozilla Thunderbird

On 8/13/24 20:18, Philippe Mathieu-Daudé wrote:
When refactoring page_table_walk_refill() in commit 4e999bf419
we missed the indirect call to cpu_mmu_index() in get_pte():

   page_table_walk_refill()
   -> get_pte()
      -> cpu_ld[lq]_code()
         -> cpu_mmu_index()

Since we don't mask anymore the modes in hflags, cpu_mmu_index()
can return UM or SM, while we only expect KM or ERL.

Fix by propagating ptw_mmu_idx to get_pte(), and use the
cpu_ld/st_code_mmu() API with the correct MemOpIdx.

Reported-by: Thomas Petazzoni<thomas.petazzoni@bootlin.com>
Reported-by: Waldemar Brodkorb<wbx@uclibc-ng.org>
Resolves:https://gitlab.com/qemu-project/qemu/-/issues/2470
Fixes: 4e999bf419 ("target/mips: Pass ptw_mmu_idx down from mips_cpu_tlb_fill")
Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
  target/mips/tcg/sysemu/tlb_helper.c | 19 ++++++++++++-------
  1 file changed, 12 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]