]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Implement fine-grained-trap handling for FEAT_XS
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 11 Dec 2024 14:44:35 +0000 (14:44 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Dec 2024 15:17:46 +0000 (15:17 +0000)
commit2b745c8f91376b7bf0259b2bfc10015591d2c1c3
tree3cc6a639793fedab0fe3fb03bb9987752d7884e8
parent1660866e2c8ab994748ad03e12296ac83a407b10
target/arm: Implement fine-grained-trap handling for FEAT_XS

FEAT_XS introduces a set of new TLBI maintenance instructions with an
"nXS" qualifier.  These behave like the stardard ones except that
they do not wait for memory accesses with the XS attribute to
complete.  They have an interaction with the fine-grained-trap
handling: the FGT bits that a hypervisor can use to trap TLBI
maintenance instructions normally trap also the nXS variants, but the
hypervisor can elect to not trap the nXS variants by setting
HCRX_EL2.FGTnXS to 1.

Add support to our FGT mechanism for these TLBI bits. For each
TLBI-trapping FGT bit we define, for example:
 * FGT_TLBIVAE1 -- the same value we do at present for the
   normal variant of the insn
 * FGT_TLBIVAE1NXS -- for the nXS qualified insn; the value of
   this enum has an NXS bit ORed into it

In access_check_cp_reg() we can then ignore the trap bit for an
access where ri->fgt has the NXS bit set and HCRX_EL2.FGTnXS is 1.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241211144440.2700268-2-peter.maydell@linaro.org
target/arm/cpregs.h
target/arm/cpu-features.h
target/arm/helper.c
target/arm/tcg/op_helper.c