]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Fix perf cycle counter support for VHE
authorAndrew Murray <andrew.murray@arm.com>
Mon, 29 Apr 2019 19:13:05 +0000 (20:13 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 30 Apr 2019 09:11:49 +0000 (10:11 +0100)
commitb43dc28abc8e491781e9fb0314522267eb7ae7fc
tree37667a28e37a410b6256834482b5ccda8b4ed365
parent12c39748475422260cc96f856444419419d2b26b
arm64: KVM: Fix perf cycle counter support for VHE

The kvm_vcpu_pmu_{read,write}_evtype_direct functions do not handle
the cycle counter use-case, this leads to inaccurate counts and a
WARN message when using perf with the cycle counter (-e cycle).

Let's fix this by adding a use case for pmccfiltr_el0.

Fixes: 7909cff57188 ("arm64: KVM: Avoid isb's by using direct pmxevtyper sysreg")
Reported-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/pmu.c