Skip to content
Commit 65729da9 authored by Marc Zyngier's avatar Marc Zyngier
Browse files

KVM: arm64: Convert timer offset VA when accessed in HYP code



Now that EL2 has gained some early timer emulation, it accesses
the offsets pointed to by the timer structure, both of which
live in the KVM structure.

Of course, these are *kernel* pointers, so the dereferencing
of these pointers in non-kernel code must be itself be offset.

Given switch.h its own version of timer_get_offset() and use that
instead.

Fixes: b86fc215 ("KVM: arm64: Handle counter access early in non-HYP context")
Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
Reviewed-by: default avatarOliver Upton <oliver.upton@linux.dev>
Tested-by: default avatarAnders Roxell <anders.roxell@linaro.org>
Link: https://lore.kernel.org/r/20250212173454.2864462-1-maz@kernel.org


Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent 332b7e6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment