OSDN Git Service

KVM: arm64: pmu: Fix chained SW_INCR counters
authorEric Auger <eric.auger@redhat.com>
Fri, 24 Jan 2020 14:25:34 +0000 (15:25 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Jan 2020 12:50:33 +0000 (12:50 +0000)
commitaa76829171e98bd75a0cc00b6248eca269ac7f4f
treeaf7c8ea2704a2ba2d3007818fc064a019476545b
parent76c9fc56ddfdfeb0c9ff984d0d63b083e608fc92
KVM: arm64: pmu: Fix chained SW_INCR counters

At the moment a SW_INCR counter always overflows on 32-bit
boundary, independently on whether the n+1th counter is
programmed as CHAIN.

Check whether the SW_INCR counter is a 64b counter and if so,
implement the 64b logic.

Fixes: 80f393a23be6 ("KVM: arm/arm64: Support chained PMU counters")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200124142535.29386-4-eric.auger@redhat.com
virt/kvm/arm/pmu.c