Skip to content

Commit

Permalink
target/arm: Populate CPUClass.mmu_index
Browse files Browse the repository at this point in the history
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Feb 2, 2024
1 parent f8a72a7 commit 70e5429
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions target/arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ static bool arm_cpu_has_work(CPUState *cs)
| CPU_INTERRUPT_EXITTB);
}

static int arm_cpu_mmu_index(CPUState *cs, bool ifetch)
{
return arm_env_mmu_index(cpu_env(cs));
}

void arm_register_pre_el_change_hook(ARMCPU *cpu, ARMELChangeHookFn *hook,
void *opaque)
{
Expand Down Expand Up @@ -2497,6 +2502,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)

cc->class_by_name = arm_cpu_class_by_name;
cc->has_work = arm_cpu_has_work;
cc->mmu_index = arm_cpu_mmu_index;
cc->dump_state = arm_cpu_dump_state;
cc->set_pc = arm_cpu_set_pc;
cc->get_pc = arm_cpu_get_pc;
Expand Down

0 comments on commit 70e5429

Please sign in to comment.