Lines Matching refs:arch

27 	mutex_lock(&vcpu->arch.exit_timing_lock);  in kvmppc_init_timing_stats()
29 vcpu->arch.last_exit_type = 0xDEAD; in kvmppc_init_timing_stats()
31 vcpu->arch.timing_count_type[i] = 0; in kvmppc_init_timing_stats()
32 vcpu->arch.timing_max_duration[i] = 0; in kvmppc_init_timing_stats()
33 vcpu->arch.timing_min_duration[i] = 0xFFFFFFFF; in kvmppc_init_timing_stats()
34 vcpu->arch.timing_sum_duration[i] = 0; in kvmppc_init_timing_stats()
35 vcpu->arch.timing_sum_quad_duration[i] = 0; in kvmppc_init_timing_stats()
37 vcpu->arch.timing_last_exit = 0; in kvmppc_init_timing_stats()
38 vcpu->arch.timing_exit.tv64 = 0; in kvmppc_init_timing_stats()
39 vcpu->arch.timing_last_enter.tv64 = 0; in kvmppc_init_timing_stats()
41 mutex_unlock(&vcpu->arch.exit_timing_lock); in kvmppc_init_timing_stats()
48 mutex_lock(&vcpu->arch.exit_timing_lock); in add_exit_timing()
50 vcpu->arch.timing_count_type[type]++; in add_exit_timing()
53 old = vcpu->arch.timing_sum_duration[type]; in add_exit_timing()
54 vcpu->arch.timing_sum_duration[type] += duration; in add_exit_timing()
55 if (unlikely(old > vcpu->arch.timing_sum_duration[type])) { in add_exit_timing()
58 __func__, old, vcpu->arch.timing_sum_duration[type], in add_exit_timing()
59 type, vcpu->arch.timing_count_type[type]); in add_exit_timing()
63 old = vcpu->arch.timing_sum_quad_duration[type]; in add_exit_timing()
64 vcpu->arch.timing_sum_quad_duration[type] += (duration*duration); in add_exit_timing()
65 if (unlikely(old > vcpu->arch.timing_sum_quad_duration[type])) { in add_exit_timing()
69 vcpu->arch.timing_sum_quad_duration[type], in add_exit_timing()
70 type, vcpu->arch.timing_count_type[type]); in add_exit_timing()
74 if (unlikely(duration < vcpu->arch.timing_min_duration[type])) in add_exit_timing()
75 vcpu->arch.timing_min_duration[type] = duration; in add_exit_timing()
76 if (unlikely(duration > vcpu->arch.timing_max_duration[type])) in add_exit_timing()
77 vcpu->arch.timing_max_duration[type] = duration; in add_exit_timing()
79 mutex_unlock(&vcpu->arch.exit_timing_lock); in add_exit_timing()
84 u64 exit = vcpu->arch.timing_last_exit; in kvmppc_update_timing_stats()
85 u64 enter = vcpu->arch.timing_last_enter.tv64; in kvmppc_update_timing_stats()
88 vcpu->arch.timing_last_exit = vcpu->arch.timing_exit.tv64; in kvmppc_update_timing_stats()
90 if (unlikely(vcpu->arch.last_exit_type == 0xDEAD || exit == 0)) in kvmppc_update_timing_stats()
94 add_exit_timing(vcpu, (enter - exit), vcpu->arch.last_exit_type); in kvmppc_update_timing_stats()
96 add_exit_timing(vcpu, (vcpu->arch.timing_last_exit - enter), in kvmppc_update_timing_stats()
139 min = vcpu->arch.timing_min_duration[i]; in kvmppc_exit_timing_show()
141 max = vcpu->arch.timing_max_duration[i]; in kvmppc_exit_timing_show()
143 sum = vcpu->arch.timing_sum_duration[i]; in kvmppc_exit_timing_show()
145 sum_quad = vcpu->arch.timing_sum_quad_duration[i]; in kvmppc_exit_timing_show()
150 vcpu->arch.timing_count_type[i], in kvmppc_exit_timing_show()
217 vcpu->arch.debugfs_exit_timing = debugfs_file; in kvmppc_create_vcpu_debugfs()
222 debugfs_remove(vcpu->arch.debugfs_exit_timing); in kvmppc_remove_vcpu_debugfs()
223 vcpu->arch.debugfs_exit_timing = NULL; in kvmppc_remove_vcpu_debugfs()