]> 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)
commit994b3b3608de540d90512c30ba876a46c16a3f74
treefcece31e3dfe0b78f9cd415ecba8279a49073817
parentfa57db3e2408c8ba90417da3fe8de83b237dadb4
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