@@ -1400,7 +1400,7 @@ bool kvm_lapic_hv_timer_in_use(struct kvm_vcpu *vcpu)
1400
1400
}
1401
1401
EXPORT_SYMBOL_GPL (kvm_lapic_hv_timer_in_use );
1402
1402
1403
- static void cancel_hv_tscdeadline (struct kvm_lapic * apic )
1403
+ static void cancel_hv_timer (struct kvm_lapic * apic )
1404
1404
{
1405
1405
kvm_x86_ops -> cancel_hv_timer (apic -> vcpu );
1406
1406
apic -> lapic_timer .hv_timer_in_use = false;
@@ -1412,26 +1412,26 @@ void kvm_lapic_expired_hv_timer(struct kvm_vcpu *vcpu)
1412
1412
1413
1413
WARN_ON (!apic -> lapic_timer .hv_timer_in_use );
1414
1414
WARN_ON (swait_active (& vcpu -> wq ));
1415
- cancel_hv_tscdeadline (apic );
1415
+ cancel_hv_timer (apic );
1416
1416
apic_timer_expired (apic );
1417
1417
}
1418
1418
EXPORT_SYMBOL_GPL (kvm_lapic_expired_hv_timer );
1419
1419
1420
- static bool start_hv_tscdeadline (struct kvm_lapic * apic )
1420
+ static bool start_hv_timer (struct kvm_lapic * apic )
1421
1421
{
1422
1422
u64 tscdeadline = apic -> lapic_timer .tscdeadline ;
1423
1423
1424
1424
if (atomic_read (& apic -> lapic_timer .pending ) ||
1425
1425
kvm_x86_ops -> set_hv_timer (apic -> vcpu , tscdeadline )) {
1426
1426
if (apic -> lapic_timer .hv_timer_in_use )
1427
- cancel_hv_tscdeadline (apic );
1427
+ cancel_hv_timer (apic );
1428
1428
} else {
1429
1429
apic -> lapic_timer .hv_timer_in_use = true;
1430
1430
hrtimer_cancel (& apic -> lapic_timer .timer );
1431
1431
1432
1432
/* In case the sw timer triggered in the window */
1433
1433
if (atomic_read (& apic -> lapic_timer .pending ))
1434
- cancel_hv_tscdeadline (apic );
1434
+ cancel_hv_timer (apic );
1435
1435
}
1436
1436
trace_kvm_hv_timer_state (apic -> vcpu -> vcpu_id ,
1437
1437
apic -> lapic_timer .hv_timer_in_use );
@@ -1445,7 +1445,7 @@ void kvm_lapic_switch_to_hv_timer(struct kvm_vcpu *vcpu)
1445
1445
WARN_ON (apic -> lapic_timer .hv_timer_in_use );
1446
1446
1447
1447
if (apic_lvtt_tscdeadline (apic ))
1448
- start_hv_tscdeadline (apic );
1448
+ start_hv_timer (apic );
1449
1449
}
1450
1450
EXPORT_SYMBOL_GPL (kvm_lapic_switch_to_hv_timer );
1451
1451
@@ -1457,7 +1457,7 @@ void kvm_lapic_switch_to_sw_timer(struct kvm_vcpu *vcpu)
1457
1457
if (!apic -> lapic_timer .hv_timer_in_use )
1458
1458
return ;
1459
1459
1460
- cancel_hv_tscdeadline (apic );
1460
+ cancel_hv_timer (apic );
1461
1461
1462
1462
if (atomic_read (& apic -> lapic_timer .pending ))
1463
1463
return ;
@@ -1473,7 +1473,7 @@ static void start_apic_timer(struct kvm_lapic *apic)
1473
1473
if (apic_lvtt_period (apic ) || apic_lvtt_oneshot (apic ))
1474
1474
start_sw_period (apic );
1475
1475
else if (apic_lvtt_tscdeadline (apic )) {
1476
- if (!(kvm_x86_ops -> set_hv_timer && start_hv_tscdeadline (apic )))
1476
+ if (!(kvm_x86_ops -> set_hv_timer && start_hv_timer (apic )))
1477
1477
start_sw_tscdeadline (apic );
1478
1478
}
1479
1479
}
0 commit comments