Skip to content

Commit

Permalink
target/riscv: Populate CPUClass.mmu_index
Browse files Browse the repository at this point in the history
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Feb 3, 2024
1 parent d9996d0 commit a5c7797
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions target/riscv/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,11 @@ static bool riscv_cpu_has_work(CPUState *cs)
#endif
}

static int riscv_cpu_mmu_index(CPUState *cs, bool ifetch)
{
return riscv_env_mmu_index(cpu_env(cs), ifetch);
}

static void riscv_cpu_reset_hold(Object *obj)
{
#ifndef CONFIG_USER_ONLY
Expand Down Expand Up @@ -1810,6 +1815,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)

cc->class_by_name = riscv_cpu_class_by_name;
cc->has_work = riscv_cpu_has_work;
cc->mmu_index = riscv_cpu_mmu_index;
cc->dump_state = riscv_cpu_dump_state;
cc->set_pc = riscv_cpu_set_pc;
cc->get_pc = riscv_cpu_get_pc;
Expand Down

0 comments on commit a5c7797

Please sign in to comment.