@@ -148,13 +148,13 @@ static u64 kvm_timer_earliest_exp(struct kvm_vcpu *vcpu)
148148 return min(min_virt, min_phys);
149149}
150150
151- static enum hrtimer_restart kvm_timer_expire (struct hrtimer *hrt)
151+ static enum hrtimer_restart kvm_bg_timer_expire (struct hrtimer *hrt)
152152{
153153 struct arch_timer_cpu *timer;
154154 struct kvm_vcpu *vcpu;
155155 u64 ns;
156156
157- timer = container_of(hrt, struct arch_timer_cpu, timer );
157+ timer = container_of(hrt, struct arch_timer_cpu, bg_timer );
158158 vcpu = container_of(timer, struct kvm_vcpu, arch.timer_cpu);
159159
160160 /*
@@ -261,7 +261,7 @@ static void kvm_timer_emulate(struct kvm_vcpu *vcpu,
261261 return;
262262
263263 /* The timer has not yet expired, schedule a background timer */
264- soft_timer_start(&timer->timer , kvm_timer_compute_delta(timer_ctx));
264+ soft_timer_start(&timer->bg_timer , kvm_timer_compute_delta(timer_ctx));
265265}
266266
267267/*
@@ -294,14 +294,14 @@ void kvm_timer_schedule(struct kvm_vcpu *vcpu)
294294 * The guest timers have not yet expired, schedule a background timer.
295295 * Set the earliest expiration time among the guest timers.
296296 */
297- soft_timer_start(&timer->timer , kvm_timer_earliest_exp(vcpu));
297+ soft_timer_start(&timer->bg_timer , kvm_timer_earliest_exp(vcpu));
298298}
299299
300300void kvm_timer_unschedule(struct kvm_vcpu *vcpu)
301301{
302302 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
303303
304- soft_timer_cancel(&timer->timer , &timer->expired);
304+ soft_timer_cancel(&timer->bg_timer , &timer->expired);
305305}
306306
307307static void kvm_timer_flush_hwstate_vgic(struct kvm_vcpu *vcpu)
@@ -437,7 +437,7 @@ void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu)
437437 * This is to cancel the background timer for the physical timer
438438 * emulation if it is set.
439439 */
440- soft_timer_cancel(&timer->timer , &timer->expired);
440+ soft_timer_cancel(&timer->bg_timer , &timer->expired);
441441
442442 /*
443443 * The guest could have modified the timer registers or the timer
@@ -494,8 +494,8 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
494494 vcpu_ptimer(vcpu)->cntvoff = 0;
495495
496496 INIT_WORK(&timer->expired, kvm_timer_inject_irq_work);
497- hrtimer_init(&timer->timer , CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
498- timer->timer .function = kvm_timer_expire ;
497+ hrtimer_init(&timer->bg_timer , CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
498+ timer->bg_timer .function = kvm_bg_timer_expire ;
499499
500500 vtimer->irq.irq = default_vtimer_irq.irq;
501501 ptimer->irq.irq = default_ptimer_irq.irq;
@@ -604,7 +604,7 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu)
604604 struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
605605 struct arch_timer_context *vtimer = vcpu_vtimer(vcpu);
606606
607- soft_timer_cancel(&timer->timer , &timer->expired);
607+ soft_timer_cancel(&timer->bg_timer , &timer->expired);
608608 kvm_vgic_unmap_phys_irq(vcpu, vtimer->irq.irq);
609609}
610610
0 commit comments