@@ -148,13 +148,13 @@ static u64 kvm_timer_earliest_exp(struct kvm_vcpu *vcpu)
148
148
return min (min_virt , min_phys );
149
149
}
150
150
151
- static enum hrtimer_restart kvm_timer_expire (struct hrtimer * hrt )
151
+ static enum hrtimer_restart kvm_bg_timer_expire (struct hrtimer * hrt )
152
152
{
153
153
struct arch_timer_cpu * timer ;
154
154
struct kvm_vcpu * vcpu ;
155
155
u64 ns ;
156
156
157
- timer = container_of (hrt , struct arch_timer_cpu , timer );
157
+ timer = container_of (hrt , struct arch_timer_cpu , bg_timer );
158
158
vcpu = container_of (timer , struct kvm_vcpu , arch .timer_cpu );
159
159
160
160
/*
@@ -261,7 +261,7 @@ static void kvm_timer_emulate(struct kvm_vcpu *vcpu,
261
261
return ;
262
262
263
263
/* 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 ));
265
265
}
266
266
267
267
/*
@@ -294,14 +294,14 @@ void kvm_timer_schedule(struct kvm_vcpu *vcpu)
294
294
* The guest timers have not yet expired, schedule a background timer.
295
295
* Set the earliest expiration time among the guest timers.
296
296
*/
297
- soft_timer_start (& timer -> timer , kvm_timer_earliest_exp (vcpu ));
297
+ soft_timer_start (& timer -> bg_timer , kvm_timer_earliest_exp (vcpu ));
298
298
}
299
299
300
300
void kvm_timer_unschedule (struct kvm_vcpu * vcpu )
301
301
{
302
302
struct arch_timer_cpu * timer = & vcpu -> arch .timer_cpu ;
303
303
304
- soft_timer_cancel (& timer -> timer , & timer -> expired );
304
+ soft_timer_cancel (& timer -> bg_timer , & timer -> expired );
305
305
}
306
306
307
307
static void kvm_timer_flush_hwstate_vgic (struct kvm_vcpu * vcpu )
@@ -437,7 +437,7 @@ void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu)
437
437
* This is to cancel the background timer for the physical timer
438
438
* emulation if it is set.
439
439
*/
440
- soft_timer_cancel (& timer -> timer , & timer -> expired );
440
+ soft_timer_cancel (& timer -> bg_timer , & timer -> expired );
441
441
442
442
/*
443
443
* The guest could have modified the timer registers or the timer
@@ -494,8 +494,8 @@ void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu)
494
494
vcpu_ptimer (vcpu )-> cntvoff = 0 ;
495
495
496
496
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 ;
499
499
500
500
vtimer -> irq .irq = default_vtimer_irq .irq ;
501
501
ptimer -> irq .irq = default_ptimer_irq .irq ;
@@ -604,7 +604,7 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu)
604
604
struct arch_timer_cpu * timer = & vcpu -> arch .timer_cpu ;
605
605
struct arch_timer_context * vtimer = vcpu_vtimer (vcpu );
606
606
607
- soft_timer_cancel (& timer -> timer , & timer -> expired );
607
+ soft_timer_cancel (& timer -> bg_timer , & timer -> expired );
608
608
kvm_vgic_unmap_phys_irq (vcpu , vtimer -> irq .irq );
609
609
}
610
610
0 commit comments