KVM: arm64: PMU: Narrow the overflow checking when required
authorMarc Zyngier <maz@kernel.org>
Sun, 13 Nov 2022 16:38:21 +0000 (16:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 17 Nov 2022 15:39:51 +0000 (15:39 +0000)
commit001d85bd6c039d3662a4f33a5d212ef3e0438b27
tree015ec842d0754c3a0212173e70b6d5b80f0449fb
parentc82d28cbf1d4f9fe174041b4485c635cb970afa7
KVM: arm64: PMU: Narrow the overflow checking when required

For 64bit counters that overflow on a 32bit boundary, make
sure we only check the bottom 32bit to generate a CHAIN event.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Link: https://lore.kernel.org/r/20221113163832.3154370-6-maz@kernel.org
arch/arm64/kvm/pmu-emul.c