Skip to content

Commit 9a7449a

Browse files
ouptonjannau
authored andcommitted
KVM: arm64: Always support SW_INCR PMU event
Support for SW_INCR is unconditional, as KVM traps accesses to PMSWINC_EL0 and emulates the intended event increment. While it is expected that ~all PMUv3 implementations already advertise this event, non-PMUv3 hardware may not. Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent dd3cc5e commit 9a7449a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/arm64/kvm/pmu-emul.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static u64 compute_pmceid0(struct arm_pmu *pmu)
771771
{
772772
u64 val = __compute_pmceid(pmu, 0);
773773

774+
/* always support SW_INCR */
775+
val |= BIT(ARMV8_PMUV3_PERFCTR_SW_INCR);
774776
/* always support CHAIN */
775777
val |= BIT(ARMV8_PMUV3_PERFCTR_CHAIN);
776778
return val;

0 commit comments

Comments
 (0)