summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorVincent Donnefort <vdonnefort@google.com>2026-10-08 11:42:11 +0100
committerMarc Zyngier <maz@kernel.org>2026-10-10 10:46:44 +0100
commit6164ce3491bcc3a27a2e2e9260a286eb2df2301e (patch)
tree3545ef81257fa47e8591124042e4a480842a6ecf /tools/perf/scripts/python
parent6b1abd43b27a5ecac0672482dc8ca1e48c2c8d15 (diff)
KVM: arm64: Prevent 64-bit overflow when computing hyp clock rate
The hypervisor clock rate is delta_cycles * NSEC_PER_SEC / delta_boot. It is computed whenever a deviation occurs. If the delta between two rate updates is big enough, delta_cycles * NSEC_PER_SEC will overflow. Prevent overflow with mul_u64_u64_div_u64(). And as a bonus, simplify the clock estimation with mul_u64_u32_shr(). Fixes: b22888917fa4 ("KVM: arm64: Sync boot clock with the nVHE/pKVM hyp") Cc: stable@vger.kernel.org Signed-off-by: Vincent Donnefort <vdonnefort@google.com> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20261008104212.3134550-2-vdonnefort@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions