diff options
author | Aaron Lindsay <alindsay@codeaurora.org> | 2018-04-26 11:04:39 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-04-26 11:04:39 +0100 |
commit | 08267487c99e8150382420936ab72c1e0ad74ce3 (patch) | |
tree | 92ff492c7951003e73f853727e659bf176c3995d /target/arm/internals.h | |
parent | d5a5e4c93dae0dc3feb402cf7ee78d846da1a7e1 (diff) | |
download | qemu-08267487c99e8150382420936ab72c1e0ad74ce3.zip qemu-08267487c99e8150382420936ab72c1e0ad74ce3.tar.gz qemu-08267487c99e8150382420936ab72c1e0ad74ce3.tar.bz2 |
target/arm: Support multiple EL change hooks
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
Message-id: 1523997485-1905-7-git-send-email-alindsay@codeaurora.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/internals.h')
-rw-r--r-- | target/arm/internals.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/target/arm/internals.h b/target/arm/internals.h index 8ce944b..6358c2a 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -727,11 +727,12 @@ void arm_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, int mmu_idx, MemTxAttrs attrs, MemTxResult response, uintptr_t retaddr); -/* Call the EL change hook if one has been registered */ +/* Call any registered EL change hooks */ static inline void arm_call_el_change_hook(ARMCPU *cpu) { - if (cpu->el_change_hook) { - cpu->el_change_hook(cpu, cpu->el_change_hook_opaque); + ARMELChangeHook *hook, *next; + QLIST_FOREACH_SAFE(hook, &cpu->el_change_hooks, node, next) { + hook->hook(cpu, hook->opaque); } } |