Lines Matching defs:ctr_base
222 static int kvm_pmu_validate_counter_mask(struct kvm_pmu *kvpmu, unsigned long ctr_base,
226 if (!ctr_mask || (ctr_base + __fls(ctr_mask) >= kvm_pmu_num_counters(kvpmu)))
338 int kvm_riscv_vcpu_pmu_ctr_start(struct kvm_vcpu *vcpu, unsigned long ctr_base,
347 if (kvm_pmu_validate_counter_mask(kvpmu, ctr_base, ctr_mask) < 0) {
354 pmc_index = i + ctr_base;
394 int kvm_riscv_vcpu_pmu_ctr_stop(struct kvm_vcpu *vcpu, unsigned long ctr_base,
404 if (kvm_pmu_validate_counter_mask(kvpmu, ctr_base, ctr_mask) < 0) {
411 pmc_index = i + ctr_base;
456 int kvm_riscv_vcpu_pmu_ctr_cfg_match(struct kvm_vcpu *vcpu, unsigned long ctr_base,
482 if (kvm_pmu_validate_counter_mask(kvpmu, ctr_base, ctr_mask) < 0) {
499 if (!test_bit(ctr_base + __ffs(ctr_mask), kvpmu->pmc_in_use)) {
503 ctr_idx = ctr_base + __ffs(ctr_mask);
505 ctr_idx = pmu_get_pmc_index(kvpmu, eidx, ctr_base, ctr_mask);