Skip to content
Commit b5489580 authored by Ricardo Koller's avatar Ricardo Koller Committed by Andrew Jones
Browse files

arm: pmu: Check for overflow in the low counter in chained counters tests



A chained event overflowing on the low counter can set the overflow flag
in PMOVS.  KVM does not set it, but real HW and the fast-model seem to.
Moreover, the AArch64.IncrementEventCounter() pseudocode in the ARM ARM
(DDI 0487H.a, J1.1.1 "aarch64/debug") also sets the PMOVS bit on
overflow.

The pmu chain tests fail on bare metal when checking the overflow flag
of the low counter _not_ being set on overflow.  Fix by checking for
overflow. Note that this test fails in KVM without the respective fix.

Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarOliver Upton <oliver.upton@linux.dev>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Link: http://lore.kernel.org/r/20220805135813.2102034-1-maz@kernel.org


Signed-off-by: default avatarRicardo Koller <ricarkol@google.com>
Signed-off-by: default avatarAndrew Jones <andrew.jones@linux.dev>
parent 1a97dad8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment