Lines Matching refs:now
246 static uint32_t kvm_mips_ktime_to_count(struct kvm_vcpu *vcpu, ktime_t now) in kvm_mips_ktime_to_count() argument
251 now_ns = ktime_to_ns(now); in kvm_mips_ktime_to_count()
303 static uint32_t kvm_mips_read_count_running(struct kvm_vcpu *vcpu, ktime_t now) in kvm_mips_read_count_running() argument
311 count = vcpu->arch.count_bias + kvm_mips_ktime_to_count(vcpu, now); in kvm_mips_read_count_running()
328 threshold = ktime_add_ns(now, vcpu->arch.count_period / 4); in kvm_mips_read_count_running()
393 ktime_t now; in kvm_mips_freeze_hrtimer() local
397 now = ktime_get(); in kvm_mips_freeze_hrtimer()
400 *count = kvm_mips_read_count_running(vcpu, now); in kvm_mips_freeze_hrtimer()
402 return now; in kvm_mips_freeze_hrtimer()
422 ktime_t now, uint32_t count) in kvm_mips_resume_hrtimer() argument
433 expire = ktime_add_ns(now, delta); in kvm_mips_resume_hrtimer()
450 ktime_t now; in kvm_mips_write_count() local
453 now = kvm_mips_count_time(vcpu); in kvm_mips_write_count()
454 vcpu->arch.count_bias = count - kvm_mips_ktime_to_count(vcpu, now); in kvm_mips_write_count()
461 kvm_mips_resume_hrtimer(vcpu, now, count); in kvm_mips_write_count()
498 ktime_t now; in kvm_mips_set_count_hz() local
511 now = kvm_mips_count_time(vcpu); in kvm_mips_set_count_hz()
514 now = kvm_mips_freeze_hrtimer(vcpu, &count); in kvm_mips_set_count_hz()
523 vcpu->arch.count_bias = count - kvm_mips_ktime_to_count(vcpu, now); in kvm_mips_set_count_hz()
527 kvm_mips_resume_hrtimer(vcpu, now, count); in kvm_mips_set_count_hz()
546 ktime_t now; in kvm_mips_write_compare() local
561 now = kvm_mips_freeze_hrtimer(vcpu, &count); in kvm_mips_write_compare()
570 kvm_mips_resume_hrtimer(vcpu, now, count); in kvm_mips_write_compare()
589 ktime_t now; in kvm_mips_count_disable() local
595 now = ktime_get(); in kvm_mips_count_disable()
596 count = kvm_mips_read_count_running(vcpu, now); in kvm_mips_count_disable()
599 return now; in kvm_mips_count_disable()
663 ktime_t expire, now; in kvm_mips_set_count_ctl() local
696 now = ktime_get(); in kvm_mips_set_count_ctl()
697 if (ktime_compare(now, expire) >= 0) in kvm_mips_set_count_ctl()
702 count = kvm_mips_read_count_running(vcpu, now); in kvm_mips_set_count_ctl()
703 kvm_mips_resume_hrtimer(vcpu, now, count); in kvm_mips_set_count_ctl()