|
@@ -2743,16 +2743,16 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
|
if (tsc_delta < 0)
|
|
if (tsc_delta < 0)
|
|
mark_tsc_unstable("KVM discovered backwards TSC");
|
|
mark_tsc_unstable("KVM discovered backwards TSC");
|
|
|
|
|
|
- if (kvm_lapic_hv_timer_in_use(vcpu) &&
|
|
|
|
- kvm_x86_ops->set_hv_timer(vcpu,
|
|
|
|
- kvm_get_lapic_tscdeadline_msr(vcpu)))
|
|
|
|
- kvm_lapic_switch_to_sw_timer(vcpu);
|
|
|
|
if (check_tsc_unstable()) {
|
|
if (check_tsc_unstable()) {
|
|
u64 offset = kvm_compute_tsc_offset(vcpu,
|
|
u64 offset = kvm_compute_tsc_offset(vcpu,
|
|
vcpu->arch.last_guest_tsc);
|
|
vcpu->arch.last_guest_tsc);
|
|
kvm_x86_ops->write_tsc_offset(vcpu, offset);
|
|
kvm_x86_ops->write_tsc_offset(vcpu, offset);
|
|
vcpu->arch.tsc_catchup = 1;
|
|
vcpu->arch.tsc_catchup = 1;
|
|
}
|
|
}
|
|
|
|
+ if (kvm_lapic_hv_timer_in_use(vcpu) &&
|
|
|
|
+ kvm_x86_ops->set_hv_timer(vcpu,
|
|
|
|
+ kvm_get_lapic_tscdeadline_msr(vcpu)))
|
|
|
|
+ kvm_lapic_switch_to_sw_timer(vcpu);
|
|
/*
|
|
/*
|
|
* On a host with synchronized TSC, there is no need to update
|
|
* On a host with synchronized TSC, there is no need to update
|
|
* kvmclock on vcpu->cpu migration
|
|
* kvmclock on vcpu->cpu migration
|