Lines Matching refs:timer_ctx

41 static bool kvm_timer_irq_can_fire(struct arch_timer_context *timer_ctx);
43 struct arch_timer_context *timer_ctx);
44 static bool kvm_timer_should_fire(struct arch_timer_context *timer_ctx);
256 static u64 kvm_counter_compute_delta(struct arch_timer_context *timer_ctx, in kvm_counter_compute_delta() argument
259 u64 now = kvm_phys_timer_read() - timer_get_offset(timer_ctx); in kvm_counter_compute_delta()
267 &timer_ctx->ns_frac); in kvm_counter_compute_delta()
274 static u64 kvm_timer_compute_delta(struct arch_timer_context *timer_ctx) in kvm_timer_compute_delta() argument
276 return kvm_counter_compute_delta(timer_ctx, timer_get_cval(timer_ctx)); in kvm_timer_compute_delta()
279 static bool kvm_timer_irq_can_fire(struct arch_timer_context *timer_ctx) in kvm_timer_irq_can_fire() argument
281 WARN_ON(timer_ctx && timer_ctx->loaded); in kvm_timer_irq_can_fire()
282 return timer_ctx && in kvm_timer_irq_can_fire()
283 ((timer_get_ctl(timer_ctx) & in kvm_timer_irq_can_fire()
380 static bool kvm_timer_should_fire(struct arch_timer_context *timer_ctx) in kvm_timer_should_fire() argument
385 if (!timer_ctx) in kvm_timer_should_fire()
388 index = arch_timer_ctx_index(timer_ctx); in kvm_timer_should_fire()
390 if (timer_ctx->loaded) { in kvm_timer_should_fire()
413 if (!kvm_timer_irq_can_fire(timer_ctx)) in kvm_timer_should_fire()
416 cval = timer_get_cval(timer_ctx); in kvm_timer_should_fire()
417 now = kvm_phys_timer_read() - timer_get_offset(timer_ctx); in kvm_timer_should_fire()
446 struct arch_timer_context *timer_ctx) in kvm_timer_update_irq() argument
450 timer_ctx->irq.level = new_level; in kvm_timer_update_irq()
451 trace_kvm_timer_update_irq(vcpu->vcpu_id, timer_irq(timer_ctx), in kvm_timer_update_irq()
452 timer_ctx->irq.level); in kvm_timer_update_irq()
456 timer_irq(timer_ctx), in kvm_timer_update_irq()
457 timer_ctx->irq.level, in kvm_timer_update_irq()
458 timer_ctx); in kvm_timer_update_irq()