Lines Matching refs:arch

38 	mutex_lock(&vcpu->arch.exit_timing_lock);  in kvmppc_init_timing_stats()
40 vcpu->arch.last_exit_type = 0xDEAD; in kvmppc_init_timing_stats()
42 vcpu->arch.timing_count_type[i] = 0; in kvmppc_init_timing_stats()
43 vcpu->arch.timing_max_duration[i] = 0; in kvmppc_init_timing_stats()
44 vcpu->arch.timing_min_duration[i] = 0xFFFFFFFF; in kvmppc_init_timing_stats()
45 vcpu->arch.timing_sum_duration[i] = 0; in kvmppc_init_timing_stats()
46 vcpu->arch.timing_sum_quad_duration[i] = 0; in kvmppc_init_timing_stats()
48 vcpu->arch.timing_last_exit = 0; in kvmppc_init_timing_stats()
49 vcpu->arch.timing_exit.tv64 = 0; in kvmppc_init_timing_stats()
50 vcpu->arch.timing_last_enter.tv64 = 0; in kvmppc_init_timing_stats()
52 mutex_unlock(&vcpu->arch.exit_timing_lock); in kvmppc_init_timing_stats()
59 mutex_lock(&vcpu->arch.exit_timing_lock); in add_exit_timing()
61 vcpu->arch.timing_count_type[type]++; in add_exit_timing()
64 old = vcpu->arch.timing_sum_duration[type]; in add_exit_timing()
65 vcpu->arch.timing_sum_duration[type] += duration; in add_exit_timing()
66 if (unlikely(old > vcpu->arch.timing_sum_duration[type])) { in add_exit_timing()
69 __func__, old, vcpu->arch.timing_sum_duration[type], in add_exit_timing()
70 type, vcpu->arch.timing_count_type[type]); in add_exit_timing()
74 old = vcpu->arch.timing_sum_quad_duration[type]; in add_exit_timing()
75 vcpu->arch.timing_sum_quad_duration[type] += (duration*duration); in add_exit_timing()
76 if (unlikely(old > vcpu->arch.timing_sum_quad_duration[type])) { in add_exit_timing()
80 vcpu->arch.timing_sum_quad_duration[type], in add_exit_timing()
81 type, vcpu->arch.timing_count_type[type]); in add_exit_timing()
85 if (unlikely(duration < vcpu->arch.timing_min_duration[type])) in add_exit_timing()
86 vcpu->arch.timing_min_duration[type] = duration; in add_exit_timing()
87 if (unlikely(duration > vcpu->arch.timing_max_duration[type])) in add_exit_timing()
88 vcpu->arch.timing_max_duration[type] = duration; in add_exit_timing()
90 mutex_unlock(&vcpu->arch.exit_timing_lock); in add_exit_timing()
95 u64 exit = vcpu->arch.timing_last_exit; in kvmppc_update_timing_stats()
96 u64 enter = vcpu->arch.timing_last_enter.tv64; in kvmppc_update_timing_stats()
99 vcpu->arch.timing_last_exit = vcpu->arch.timing_exit.tv64; in kvmppc_update_timing_stats()
101 if (unlikely(vcpu->arch.last_exit_type == 0xDEAD || exit == 0)) in kvmppc_update_timing_stats()
105 add_exit_timing(vcpu, (enter - exit), vcpu->arch.last_exit_type); in kvmppc_update_timing_stats()
107 add_exit_timing(vcpu, (vcpu->arch.timing_last_exit - enter), in kvmppc_update_timing_stats()
150 min = vcpu->arch.timing_min_duration[i]; in kvmppc_exit_timing_show()
152 max = vcpu->arch.timing_max_duration[i]; in kvmppc_exit_timing_show()
154 sum = vcpu->arch.timing_sum_duration[i]; in kvmppc_exit_timing_show()
156 sum_quad = vcpu->arch.timing_sum_quad_duration[i]; in kvmppc_exit_timing_show()
161 vcpu->arch.timing_count_type[i], in kvmppc_exit_timing_show()
235 vcpu->arch.debugfs_exit_timing = debugfs_file; in kvmppc_create_vcpu_debugfs()
240 if (vcpu->arch.debugfs_exit_timing) { in kvmppc_remove_vcpu_debugfs()
241 debugfs_remove(vcpu->arch.debugfs_exit_timing); in kvmppc_remove_vcpu_debugfs()
242 vcpu->arch.debugfs_exit_timing = NULL; in kvmppc_remove_vcpu_debugfs()