Re: [PATCH v5 1/2] target/riscv: separate priv from mmu_idx

2023-03-24 Thread Richard Henderson
On 3/23/23 22:41, Fei Wu wrote: @@ -762,7 +764,7 @@ static int get_physical_address(CPURISCVState *env, hwaddr *physical, * (riscv_cpu_do_interrupt) is correct */ MemTxResult res; MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; -int mode = mmu_idx & TB_FLAGS_PRIV_MMU_MASK; +

[PATCH v5 1/2] target/riscv: separate priv from mmu_idx

2023-03-24 Thread Fei Wu
Currently it's assumed the 2 low bits of mmu_idx map to privilege mode, this assumption won't last as we are about to add more mmu_idx. Here an individual priv field is added into TB_FLAGS. Signed-off-by: Fei Wu --- target/riscv/cpu.h | 2 +- target/riscv/cpu_helper.c