Skip to content

Commit ed33572

Browse files
committed
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. Tested-by: Janne Grunau <j@jannau.net> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250305202641.428114-5-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent 93b0152 commit ed33572

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kvm/pmu-emul.c

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

859+
/* always support SW_INCR */
860+
val |= BIT(ARMV8_PMUV3_PERFCTR_SW_INCR);
859861
/* always support CHAIN */
860862
val |= BIT(ARMV8_PMUV3_PERFCTR_CHAIN);
861863
return val;

0 commit comments

Comments
 (0)