linux-sg2042/arch/arm64/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
..
hyp ARM: 2023-02-25 11:30:21 -08:00
vgic KVM/arm64 updates for 6.3 2023-02-20 06:12:42 -05:00
.gitignore KVM: arm64: Generate hyp_constants.h for the host 2021-12-06 08:37:03 +00:00
Kconfig KVM: Opt out of generic hardware enabling on s390 and PPC 2022-12-29 15:48:37 -05:00
Makefile KVM: arm64: nv: Filter out unsupported features from ID regs 2023-02-11 10:13:30 +00:00
arch_timer.c KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
arm.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
debug.c arm64: Drop SYS_ from SPE register defines 2023-01-19 18:30:22 +00:00
emulate-nested.c KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
fpsimd.c Merge branch kvm-arm64/misc into kvmarm/next 2023-02-13 23:33:25 +00:00
guest.c KVM/arm64 updates for 6.3 2023-02-20 06:12:42 -05:00
handle_exit.c KVM: arm64: nv: Handle SMCs taken from virtual EL2 2023-02-11 10:08:39 +00:00
hypercalls.c KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
inject_fault.c KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
mmio.c KVM: arm64: Generalise VM features into a set of flags 2022-03-18 14:02:33 +00:00
mmu.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
nested.c KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID 2023-02-11 22:10:34 +00:00
pkvm.c KVM: arm64: Return guest memory from EL2 via dedicated teardown memcache 2022-11-11 17:18:58 +00:00
pmu-emul.c KVM: arm64: PMU: Fix period computation for 64bit counters with 32bit overflow 2022-12-05 12:05:51 +00:00
pmu.c KVM: arm64: Pass pmu events to hyp via vcpu 2022-05-15 11:26:41 +01:00
psci.c Merge branch kvm-arm64/psci-suspend into kvmarm-master/next 2022-05-16 17:48:20 +01:00
pvtime.c KVM: MMU: Make the definition of 'INVALID_GPA' common 2023-01-19 21:48:38 +00:00
reset.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
stacktrace.c arm64: stacktrace: track hyp stacks in unwinder's address space 2022-09-09 12:30:08 +01:00
sys_regs.c Merge branch kvm-arm64/nv-prefix into kvmarm/next 2023-02-13 23:33:41 +00:00
sys_regs.h KVM: arm64: nv: Allow a sysreg to be hidden from userspace only 2023-02-11 10:13:29 +00:00
trace.h
trace_arm.h KVM: arm64: nv: Support virtual EL2 exceptions 2023-02-11 09:16:11 +00:00
trace_handle_exit.h KVM: arm64: Upgrade trace_kvm_arm_set_dreg32() to 64bit 2021-08-20 11:12:18 +01:00
trng.c KVM: arm64: Implement the TRNG hypervisor call 2021-01-25 22:19:31 +00:00
va_layout.c arm64: alternatives: kvm: prepare for cap changes 2022-09-16 17:15:02 +01:00
vgic-sys-reg-v3.c KVM: arm64: vgic-v3: Convert userspace accessors over to FIELD_GET/FIELD_PREP 2022-07-17 11:55:33 +01:00
vmid.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00