Re: [PATCH v2 05/23] KVM: arm64: Cleanup PMU includes

From: Colton Lewis
Date: Mon Jun 23 2025 - 18:04:56 EST


drivers/perf/arm_pmuv3.c: In function 'armv8pmu_enable_event_counter':
drivers/perf/arm_pmuv3.c:680:2: error: implicit declaration of function 'kvm_set_pmu_events' [-Werror=implicit-function-declaration]
680 | kvm_set_pmu_events(mask, attr);
| ^~~~~~~~~~~~~~~~~~
drivers/perf/arm_pmuv3.c: In function 'armv8pmu_disable_event_counter':
drivers/perf/arm_pmuv3.c:702:2: error: implicit declaration of function 'kvm_clr_pmu_events' [-Werror=implicit-function-declaration]
702 | kvm_clr_pmu_events(mask);
| ^~~~~~~~~~~~~~~~~~
drivers/perf/arm_pmuv3.c: In function 'update_pmuserenr':
drivers/perf/arm_pmuv3.c:757:6: error: implicit declaration of function 'kvm_set_pmuserenr' [-Werror=implicit-function-declaration]
757 | if (kvm_set_pmuserenr(val))
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Looks like some dummy definitions didn't make it into a non-KVM config.

I fixed this and a similar problem I found with kvm_host_pmu_init().