Lines Matching defs:ctxt
66 u32 timer_get_ctl(struct arch_timer_context *ctxt)
68 struct kvm_vcpu *vcpu = ctxt->vcpu;
70 switch(arch_timer_ctx_index(ctxt)) {
85 u64 timer_get_cval(struct arch_timer_context *ctxt)
87 struct kvm_vcpu *vcpu = ctxt->vcpu;
89 switch(arch_timer_ctx_index(ctxt)) {
104 static u64 timer_get_offset(struct arch_timer_context *ctxt)
108 if (!ctxt)
111 if (ctxt->offset.vm_offset)
112 offset += *ctxt->offset.vm_offset;
113 if (ctxt->offset.vcpu_offset)
114 offset += *ctxt->offset.vcpu_offset;
119 static void timer_set_ctl(struct arch_timer_context *ctxt, u32 ctl)
121 struct kvm_vcpu *vcpu = ctxt->vcpu;
123 switch(arch_timer_ctx_index(ctxt)) {
141 static void timer_set_cval(struct arch_timer_context *ctxt, u64 cval)
143 struct kvm_vcpu *vcpu = ctxt->vcpu;
145 switch(arch_timer_ctx_index(ctxt)) {
163 static void timer_set_offset(struct arch_timer_context *ctxt, u64 offset)
165 if (!ctxt->offset.vm_offset) {
166 WARN(offset, "timer %ld\n", arch_timer_ctx_index(ctxt));
170 WRITE_ONCE(*ctxt->offset.vm_offset, offset);
989 struct arch_timer_context *ctxt = vcpu_get_timer(vcpu, timerid);
992 ctxt->vcpu = vcpu;
995 ctxt->offset.vm_offset = &kvm->arch.timer_data.voffset;
997 ctxt->offset.vm_offset = &kvm->arch.timer_data.poffset;
999 hrtimer_init(&ctxt->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
1000 ctxt->hrtimer.function = kvm_hrtimer_expire;
1005 ctxt->host_timer_irq = host_ptimer_irq;
1009 ctxt->host_timer_irq = host_vtimer_irq;