]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled
authorEric Auger <eric.auger@redhat.com>
Fri, 24 Jan 2020 14:25:33 +0000 (15:25 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Jan 2020 12:50:33 +0000 (12:50 +0000)
commita8b7412d51548a8661703bbfd9a61d859bb5a3de
treefcece31e3dfe0b78f9cd415ecba8279a49073817
parentb8d70df2e1afbe3f88ed33d69e16f33fcc8594ae
KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled

At the moment we update the chain bitmap on type setting. This
does not take into account the enable state of the odd register.

Let's make sure a counter is never considered as chained if
the high counter is disabled.

We recompute the chain state on enable/disable and type changes.

Also let create_perf_event() use the chain bitmap and not use
kvm_pmu_idx_has_chain_evtype().

Suggested-by: Marc Zyngier <maz@kernel.org>
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-3-eric.auger@redhat.com
virt/kvm/arm/pmu.c