aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_arch_timer.h
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2023-03-30 17:47:50 +0000
committerMarc Zyngier <[email protected]>2023-03-30 18:01:10 +0000
commit33c549460ef9119eb115484e81f54521122341db (patch)
treec809be08865001a1b1e007b436aff9f2f388c0b1 /include/kvm/arm_arch_timer.h
parentKVM: arm64: timers: Rationalise per-vcpu timer init (diff)
downloadkernel-33c549460ef9119eb115484e81f54521122341db.tar.gz
kernel-33c549460ef9119eb115484e81f54521122341db.zip
KVM: arm64: timers: Abstract per-timer IRQ access
As we are about to move the location of the per-timer IRQ into the VM structure, abstract the location of the IRQ behind an accessor. This will make the repainting sligntly less painful. Reviewed-by: Colton Lewis <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/kvm/arm_arch_timer.h')
-rw-r--r--include/kvm/arm_arch_timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index c746ef64220b..27cada09f588 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -109,6 +109,8 @@ bool kvm_arch_timer_get_input_level(int vintid);
#define arch_timer_ctx_index(ctx) ((ctx) - vcpu_timer((ctx)->vcpu)->timers)
+#define timer_irq(ctx) ((ctx)->irq.irq)
+
u64 kvm_arm_timer_read_sysreg(struct kvm_vcpu *vcpu,
enum kvm_arch_timers tmr,
enum kvm_arch_timer_regs treg);