mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/openrisc: Fix cpu_mmu_index
The code in cpu_mmu_index does not properly honor SR_DME. This bug has workarounds elsewhere in that we flush the tlb more often than necessary, on the state changes that should be reflected in a change of mmu_index. Fixing this means that we can respect the mmu_index that is given to tlb_flush. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Stafford Horne <shorne@gmail.com>
This commit is contained in:
parent
fffde6695f
commit
b9bed1b9ab
6 changed files with 49 additions and 32 deletions
|
@ -55,7 +55,7 @@ static inline bool is_user(DisasContext *dc)
|
|||
#ifdef CONFIG_USER_ONLY
|
||||
return true;
|
||||
#else
|
||||
return dc->mem_idx == MMU_USER_IDX;
|
||||
return !(dc->tb_flags & TB_FLAGS_SM);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue