diff options
| author | Jean-Philippe Brucker <jean-philippe@linaro.org> | 2023-08-22 17:31:13 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2023-08-22 17:31:13 +0100 |
| commit | f6fc36deef6abcee406211f3e2f11ff894b87fa4 (patch) | |
| tree | 2f0f04b136804105ed8345a19abf61c594673f7c /target/arm/cpu.c | |
| parent | 1acd00ef14101434cd99df0b01b32f62255423a9 (diff) | |
| download | focaccia-qemu-f6fc36deef6abcee406211f3e2f11ff894b87fa4.tar.gz focaccia-qemu-f6fc36deef6abcee406211f3e2f11ff894b87fa4.zip | |
target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK
When FEAT_RME is implemented, these bits override the value of CNT[VP]_CTL_EL0.IMASK in Realm and Root state. Move the IRQ state update into a new gt_update_irq() function and test those bits every time we recompute the IRQ state. Since we're removing the IRQ state from some trace events, add a new trace event for gt_update_irq(). Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Message-id: 20230809123706.1842548-7-jean-philippe@linaro.org [PMM: only register change hook if not USER_ONLY and if TCG] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.c')
| -rw-r--r-- | target/arm/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 93c28d50e5..d906d2b1ca 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2169,6 +2169,12 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) set_feature(env, ARM_FEATURE_VBAR); } +#ifndef CONFIG_USER_ONLY + if (tcg_enabled() && cpu_isar_feature(aa64_rme, cpu)) { + arm_register_el_change_hook(cpu, >_rme_post_el_change, 0); + } +#endif + register_cp_regs_for_features(cpu); arm_cpu_register_gdb_regs_for_features(cpu); |