KVM: arm64: pmu: Only handle supported event counters
authorEric Auger <eric.auger@redhat.com>
Fri, 24 Jan 2020 14:25:35 +0000 (15:25 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Jan 2020 13:05:05 +0000 (13:05 +0000)
commitc01d6a18023b94fdd0cb7cf11bbfe769bf71653f
tree2b72cd9e5e1dfec623938181a4a4599f47667ded
parentaa76829171e98bd75a0cc00b6248eca269ac7f4f
KVM: arm64: pmu: Only handle supported event counters

Let the code never use unsupported event counters. Change
kvm_pmu_handle_pmcr() to only reset supported counters and
kvm_pmu_vcpu_reset() to only stop supported counters.

Other actions are filtered on the supported counters in
kvm/sysregs.c

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-5-eric.auger@redhat.com
virt/kvm/arm/pmu.c