Lines Matching full:drift
524 * @before: Time before Count was saved, lower bound of drift calculation.
526 * @min_drift: Minimum amount of drift permitted before correction.
529 * Restores the timer from a particular @count, accounting for drift. This can
541 * Returns: Amount of correction to count_bias due to drift.
549 int drift, ret = 0; in kvm_mips_restore_hrtimer() local
556 * Detect significantly negative drift, where count is lower than in kvm_mips_restore_hrtimer()
557 * expected. Some negative drift is expected when hardware counter is in kvm_mips_restore_hrtimer()
559 * time to jump forwards a little, within reason. If the drift is too in kvm_mips_restore_hrtimer()
562 drift = count - before_count; in kvm_mips_restore_hrtimer()
563 if (drift < min_drift) { in kvm_mips_restore_hrtimer()
565 vcpu->arch.count_bias += drift; in kvm_mips_restore_hrtimer()
566 ret = drift; in kvm_mips_restore_hrtimer()
575 * Detect positive drift, where count is higher than expected, and in kvm_mips_restore_hrtimer()
578 drift = count - now_count; in kvm_mips_restore_hrtimer()
579 if (drift > 0) { in kvm_mips_restore_hrtimer()
581 vcpu->arch.count_bias += drift; in kvm_mips_restore_hrtimer()
582 ret = drift; in kvm_mips_restore_hrtimer()