Commit a47d2019 authored by Oliver Upton's avatar Oliver Upton Committed by Treehugger Robot
Browse files

UPSTREAM: KVM: arm64: Fix host-programmed guest events in nVHE



Programming PMU events in the host that count during guest execution is
a feature supported by perf, e.g.

  perf stat -e cpu_cycles:G ./lkvm run

While this works for VHE, the guest/host event bitmaps are not carried
through to the hypervisor in the nVHE configuration. Make
kvm_pmu_update_vcpu_events() conditional on whether or not _hardware_
supports PMUv3 rather than if the vCPU as vPMU enabled.

Bug: 254441685
Cc: stable@vger.kernel.org
Fixes: 84d751a0 ("KVM: arm64: Pass pmu events to hyp via vcpu")
Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240305184840.636212-3-oliver.upton@linux.dev


Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
(cherry picked from commit e89c928b)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Iaec98afcec3c0e58c8ed3a0c2e15b48555ebe27f
parent 34af4466
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment