diff options
author | Marc Zyngier <maz@kernel.org> | 2022-11-13 17:38:19 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-11-17 16:39:51 +0100 |
commit | acdd8a4e13a008a83c6da88bb53eecbecda9714c (patch) | |
tree | 11cfd07ab0f980f9eb296b50f1e0ba0441055268 /arch/arm64/kvm/pmu-emul.c | |
parent | KVM: arm64: PMU: Align chained counter implementation with architecture pseud... (diff) | |
download | linux-acdd8a4e13a008a83c6da88bb53eecbecda9714c.tar.xz linux-acdd8a4e13a008a83c6da88bb53eecbecda9714c.zip |
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 <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221113163832.3154370-4-maz@kernel.org
Diffstat (limited to 'arch/arm64/kvm/pmu-emul.c')
-rw-r--r-- | arch/arm64/kvm/pmu-emul.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kvm/pmu-emul.c b/arch/arm64/kvm/pmu-emul.c index 57765be69bea..69b67ab3c4bf 100644 --- a/arch/arm64/kvm/pmu-emul.c +++ b/arch/arm64/kvm/pmu-emul.c @@ -701,6 +701,8 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1) if (!pmceid1) { val = read_sysreg(pmceid0_el0); + /* always support CHAIN */ + val |= BIT(ARMV8_PMUV3_PERFCTR_CHAIN); base = 0; } else { val = read_sysreg(pmceid1_el0); |