Lines Matching defs:counter
64 * kvm_pmc_is_64bit - determine if counter is 64bit
65 * @pmc: counter context
100 u64 counter, reg, enabled, running;
103 counter = __vcpu_sys_reg(vcpu, reg);
106 * The real counter value is equal to the value of counter register plus
110 counter += perf_event_read_value(pmc->perf_event, &enabled,
114 counter = lower_32_bits(counter);
116 return counter;
120 * kvm_pmu_get_counter_value - get PMU counter value
122 * @select_idx: The counter index
160 * kvm_pmu_set_counter_value - set PMU counter value
162 * @select_idx: The counter index
163 * @val: The counter value
175 * @pmc: The PMU counter pointer
187 * kvm_pmu_stop_counter - stop PMU counter
188 * @pmc: The PMU counter pointer
190 * If this counter has been configured to monitor some event, release it here.
210 * kvm_pmu_vcpu_init - assign pmu counter idx for cpu
445 /* Increment this counter */
464 /* Compute the sample period for a given counter value */
465 static u64 compute_period(struct kvm_pmc *pmc, u64 counter)
470 val = (-counter) & GENMASK(63, 0);
472 val = (-counter) & GENMASK(31, 0);
494 * i.e. the point where the counter overflows.
577 * kvm_pmu_create_perf_event - create a perf event for a counter
625 * If counting with a 64bit counter, advertise it to the perf
647 * kvm_pmu_set_counter_event_type - set selected counter to monitor some event
650 * @select_idx: The number of selected counter