linux-stable/include/kvm
Marc Zyngier 47053904e1 KVM: arm64: timers: Convert per-vcpu virtual offset to a global value
Having a per-vcpu virtual offset is a pain. It needs to be synchronized
on each update, and expands badly to a setup where different timers can
have different offsets, or have composite offsets (as with NV).

So let's start by replacing the use of the CNTVOFF_EL2 shadow register
(which we want to reclaim for NV anyway), and make the virtual timer
carry a pointer to a VM-wide offset.

This simplifies the code significantly. It also addresses two terrible bugs:

- The use of CNTVOFF_EL2 leads to some nice offset corruption
  when the sysreg gets reset, as reported by Joey.

- The kvm mutex is taken from a vcpu ioctl, which goes against
  the locking rules...

Reported-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230224173915.GA17407@e124191.cambridge.arm.com
Tested-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20230224191640.3396734-1-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-03-11 02:00:40 -08:00
..
arm_arch_timer.h KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
arm_hypercalls.h KVM: arm64: Setup a framework for hypercall bitmap firmware registers 2022-05-03 21:30:19 +01:00
arm_pmu.h KVM: arm64: PMU: Implement PMUv3p5 long counter support 2022-11-19 12:56:39 +00:00
arm_psci.h KVM: arm64: Factor out firmware register handling from psci.c 2022-05-03 14:48:54 +01:00
arm_vgic.h KVM/riscv changes for 6.3 2023-02-15 12:33:28 -05:00
iodev.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 342 2019-06-05 17:37:07 +02:00