Skip to content

Commit cda633d

Browse files
ouptonjannau
authored andcommitted
KVM: arm64: Advertise 0 event counters for IMPDEF PMU
The programmable event counters on Apple M* parts are quite different from what's available in PMUv3, as the event counters aren't fungible (some events only work on specific counters) and the event ID space doesn't match the architecture. Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent bba7541 commit cda633d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/arm64/kvm/pmu-emul.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,9 @@ u8 kvm_arm_pmu_get_max_counters(struct kvm *kvm)
10271027
{
10281028
struct arm_pmu *arm_pmu = kvm->arch.arm_pmu;
10291029

1030+
if (cpus_have_final_cap(ARM64_WORKAROUND_PMUV3_IMPDEF_TRAPS))
1031+
return 0;
1032+
10301033
/*
10311034
* The arm_pmu->cntr_mask considers the fixed counter(s) as well.
10321035
* Ignore those and return only the general-purpose counters.

0 commit comments

Comments
 (0)