]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/helper.c
target/arm: Implement HCR_EL2.TICAB,TOCU traps
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 14 Dec 2022 14:27:09 +0000 (14:27 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Dec 2022 11:18:20 +0000 (11:18 +0000)
commit2d3ce4c6f3bc66234e384355cedc6e7aa40903ac
treed3036978ffee15b7125cb3843991e67fb27e0898
parentfe3ca86c465428f738520de304e7a7a59bd0a6c2
target/arm: Implement HCR_EL2.TICAB,TOCU traps

For FEAT_EVT, the HCR_EL2.TICAB bit allows trapping of the ICIALLUIS
and IC IALLUIS cache maintenance instructions.

The HCR_EL2.TOCU bit traps all the other cache maintenance
instructions that operate to the point of unification:
 AArch64 IC IVAU, IC IALLU, DC CVAU
 AArch32 ICIMVAU, ICIALLU, DCCMVAU

The two trap bits between them cover all of the cache maintenance
instructions which must also check the HCR_TPU flag.  Turn the old
aa64_cacheop_pou_access() function into a helper function which takes
the set of HCR_EL2 flags to check as an argument, and call it from
new access_ticab() and access_tocu() functions as appropriate for
each cache op.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/arm/helper.c