diff options
author | Marc Zyngier <maz@kernel.org> | 2023-01-12 15:38:27 +0300 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-01-26 21:48:47 +0300 |
commit | 4d74ecfa6458bf482d93ad9a98c7f0423ff0564b (patch) | |
tree | 2c0bea5a758896838bb9bf5454a1a7d18afeb06f /tools/perf/scripts/python | |
parent | b7bfaa761d760e72a969d116517eaa12e404c262 (diff) | |
download | linux-4d74ecfa6458bf482d93ad9a98c7f0423ff0564b.tar.xz |
KVM: arm64: Don't arm a hrtimer for an already pending timer
When fully emulating a timer, we back it with a hrtimer that is
armver on vcpu_load(). However, we do this even if the timer is
already pending.
This causes spurious interrupts to be taken, though the guest
doesn't observe them (the interrupt is already pending).
Although this is a waste of precious cycles, this isn't the
end of the world with the current state of KVM. However, this
can lead to a situation where a guest doesn't make forward
progress anymore with NV.
Fix it by checking that if the timer is already pending
before arming a new hrtimer. Also drop the hrtimer cancelling,
which is useless, by construction.
Reported-by: D Scott Phillips <scott@os.amperecomputing.com>
Fixes: bee038a67487 ("KVM: arm/arm64: Rework the timer code to use a timer_map")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230112123829.458912-2-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions