]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: nv: Use FEAT_ECV to trap access to EL0 timers
authorMarc Zyngier <maz@kernel.org>
Tue, 17 Dec 2024 14:23:12 +0000 (14:23 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 2 Jan 2025 19:19:09 +0000 (19:19 +0000)
commit2cd2a77f9c32f1eaf599fb72cbcd0394938a8b58
tree9d722a2d0ffeac8f720e523447b3c24ed3267b77
parentcc45963cbf6334d2b9078f06efef9864639cddd0
KVM: arm64: nv: Use FEAT_ECV to trap access to EL0 timers

Although FEAT_NV2 makes most things fast, it also makes it impossible
to correctly emulate the timers, as the sysreg accesses are redirected
to memory.

FEAT_ECV addresses this by giving a hypervisor the ability to trap
the EL02 sysregs as well as the virtual timer.

Add the required trap setting to make use of the feature, allowing
us to elide the ugly resync in the middle of the run loop.

Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20241217142321.763801-5-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/arch_timer.c
include/clocksource/arm_arch_timer.h