Skip to content

Commit acdd8a4

Browse files
author
Marc Zyngier
committed
KVM: arm64: PMU: Always advertise the CHAIN event
Even when the underlying HW doesn't offer the CHAIN event (which happens with QEMU), we can always support it as we're in control of the counter overflow. Always advertise the event via PMCEID0_EL0. Reviewed-by: Reiji Watanabe <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bead022 commit acdd8a4

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
@@ -701,6 +701,8 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1)
701701

702702
if (!pmceid1) {
703703
val = read_sysreg(pmceid0_el0);
704+
/* always support CHAIN */
705+
val |= BIT(ARMV8_PMUV3_PERFCTR_CHAIN);
704706
base = 0;
705707
} else {
706708
val = read_sysreg(pmceid1_el0);

0 commit comments

Comments
 (0)