mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target/riscv: Separate priv from mmu_idx
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. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fei Wu <fei2.wu@intel.com> Message-Id: <20230324054154.414846-2-fei2.wu@intel.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Tested-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-Id: <20230325105429.1142530-7-richard.henderson@linaro.org> Message-Id: <20230412114333.118895-7-richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
4acaa133b1
commit
47debc7280
5 changed files with 8 additions and 16 deletions
|
@ -629,7 +629,6 @@ G_NORETURN void riscv_raise_exception(CPURISCVState *env,
|
|||
target_ulong riscv_cpu_get_fflags(CPURISCVState *env);
|
||||
void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong);
|
||||
|
||||
#define TB_FLAGS_PRIV_MMU_MASK 3
|
||||
#define TB_FLAGS_PRIV_HYP_ACCESS_MASK (1 << 2)
|
||||
|
||||
#include "exec/cpu-all.h"
|
||||
|
@ -656,6 +655,7 @@ FIELD(TB_FLAGS, ITRIGGER, 22, 1)
|
|||
/* Virtual mode enabled */
|
||||
FIELD(TB_FLAGS, VIRT_ENABLED, 23, 1)
|
||||
FIELD(TB_FLAGS, VSTART_EQ_ZERO, 24, 1)
|
||||
FIELD(TB_FLAGS, PRIV, 25, 2)
|
||||
|
||||
#ifdef TARGET_RISCV32
|
||||
#define riscv_cpu_mxl(env) ((void)(env), MXL_RV32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue