Lines Matching refs:eidx
50 static u32 kvm_pmu_get_perf_event_type(unsigned long eidx) in kvm_pmu_get_perf_event_type() argument
52 enum sbi_pmu_event_type etype = get_event_type(eidx); in kvm_pmu_get_perf_event_type()
73 static bool kvm_pmu_is_fw_event(unsigned long eidx) in kvm_pmu_is_fw_event() argument
75 return get_event_type(eidx) == SBI_PMU_EVENT_TYPE_FW; in kvm_pmu_is_fw_event()
114 static u64 kvm_pmu_get_perf_event_config(unsigned long eidx, uint64_t evt_data) in kvm_pmu_get_perf_event_config() argument
116 enum sbi_pmu_event_type etype = get_event_type(eidx); in kvm_pmu_get_perf_event_config()
117 u32 ecode = get_event_code(eidx); in kvm_pmu_get_perf_event_config()
142 static int kvm_pmu_get_fixed_pmc_index(unsigned long eidx) in kvm_pmu_get_fixed_pmc_index() argument
144 u32 etype = kvm_pmu_get_perf_event_type(eidx); in kvm_pmu_get_fixed_pmc_index()
145 u32 ecode = get_event_code(eidx); in kvm_pmu_get_fixed_pmc_index()
158 static int kvm_pmu_get_programmable_pmc_index(struct kvm_pmu *kvpmu, unsigned long eidx, in kvm_pmu_get_programmable_pmc_index() argument
165 if (kvm_pmu_is_fw_event(eidx)) { in kvm_pmu_get_programmable_pmc_index()
187 static int pmu_get_pmc_index(struct kvm_pmu *pmu, unsigned long eidx, in pmu_get_pmc_index() argument
193 ret = kvm_pmu_get_fixed_pmc_index(eidx); in pmu_get_pmc_index()
197 return kvm_pmu_get_programmable_pmc_index(pmu, eidx, cbase, cmask); in pmu_get_pmc_index()
310 unsigned long flags, unsigned long eidx, in kvm_pmu_create_perf_event() argument
316 attr->config = kvm_pmu_get_perf_event_config(eidx, evtdata); in kvm_pmu_create_perf_event()
330 pr_debug("kvm pmu event creation failed for eidx %lx: %ld\n", eidx, PTR_ERR(event)); in kvm_pmu_create_perf_event()
655 unsigned long eidx, u64 evtdata, in kvm_riscv_vcpu_pmu_ctr_cfg_match() argument
662 u32 etype = kvm_pmu_get_perf_event_type(eidx); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
685 event_code = get_event_code(eidx); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
686 is_fevent = kvm_pmu_is_fw_event(eidx); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
703 ctr_idx = pmu_get_pmc_index(kvpmu, eidx, ctr_base, ctr_mask); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
717 ret = kvm_pmu_create_perf_event(pmc, &attr, flags, eidx, evtdata); in kvm_riscv_vcpu_pmu_ctr_cfg_match()
725 pmc->event_idx = eidx; in kvm_riscv_vcpu_pmu_ctr_cfg_match()