target/arm: Implement FEAT_HPMN0
commit3d80bbf1f619ad1a0db85bb385ce4f5f74e4b0a3
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Sep 2023 18:54:45 +0000 (21 19:54 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 19 Oct 2023 13:32:13 +0000 (19 14:32 +0100)
treef5810614b5970cea016926b91fafb3b5e591478f
parent4cdd146d8bb72117b10ff22afe3a730dc4df4913
target/arm: Implement FEAT_HPMN0

FEAT_HPMN0 is a small feature which defines that it is valid for
MDCR_EL2.HPMN to be set to 0, meaning "no PMU event counters provided
to an EL1 guest" (previously this setting was reserved). QEMU's
implementation almost gets HPMN == 0 right, but we need to fix
one check in pmevcntr_is_64_bit(). That is enough for us to
advertise the feature in the 'max' CPU.

(We don't need to make the behaviour conditional on feature
presence, because the FEAT_HPMN0 behaviour is within the range
of permitted UNPREDICTABLE behaviour for a non-FEAT_HPMN0
implementation.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230921185445.3339214-1-peter.maydell@linaro.org
docs/system/arm/emulation.rst
target/arm/helper.c
target/arm/tcg/cpu32.c
target/arm/tcg/cpu64.c