diff options
author | Marc Zyngier <maz@kernel.org> | 2023-03-30 18:47:56 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-03-30 19:01:10 +0100 |
commit | 1e0eec09d43a55125ff80e40b2d6e2f369a338b9 (patch) | |
tree | 2a359e5a80f73aec8a9fad6d30f7851fc5ade982 /include/kvm | |
parent | 1935d34afaebe01ddb75bfaa62fb7fe957ddc210 (diff) | |
download | linux-stable-1e0eec09d43a55125ff80e40b2d6e2f369a338b9.tar.gz linux-stable-1e0eec09d43a55125ff80e40b2d6e2f369a338b9.tar.bz2 linux-stable-1e0eec09d43a55125ff80e40b2d6e2f369a338b9.zip |
KVM: arm64: nv: timers: Add a per-timer, per-vcpu offset
Being able to set a global offset isn't enough.
With NV, we also need to a per-vcpu, per-timer offset (for example,
CNTVCT_EL0 being offset by CNTVOFF_EL2).
Use a similar method as the VM-wide offset to have a timer point
to the shadow register that contains the offset value.
Reviewed-by: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230330174800.2677007-17-maz@kernel.org
Diffstat (limited to 'include/kvm')
-rw-r--r-- | include/kvm/arm_arch_timer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index f093ea9f540d..209da0c2ac9f 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h @@ -29,6 +29,11 @@ struct arch_timer_offset { * structure. If NULL, assume a zero offset. */ u64 *vm_offset; + /* + * If set, pointer to one of the offsets in the vcpu's sysreg + * array. If NULL, assume a zero offset. + */ + u64 *vcpu_offset; }; struct arch_timer_vm_data { |