[PATCH v5 3/5] KVM: arm64: PMU: Fix SET_ONE_REG for vPMC regs

Marc Zyngier maz at kernel.org
Mon Mar 17 07:49:24 PDT 2025


On Mon, 17 Mar 2025 13:02:47 +0000,
kernel test robot <lkp at intel.com> wrote:
> 
> Hi Akihiko,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on 80e54e84911a923c40d7bee33a34c1b4be148d7a]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Akihiko-Odaki/KVM-arm64-PMU-Set-raw-values-from-user-to-PM-C-I-NTEN-SET-CLR-PMOVS-SET-CLR/20250315-173731
> base:   80e54e84911a923c40d7bee33a34c1b4be148d7a
> patch link:    https://lore.kernel.org/r/20250315-pmc-v5-3-ecee87dab216%40daynix.com
> patch subject: [PATCH v5 3/5] KVM: arm64: PMU: Fix SET_ONE_REG for vPMC regs
> config: arm64-randconfig-r122-20250317 (https://download.01.org/0day-ci/archive/20250317/202503172023.fzyJ3TMB-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 14.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20250317/202503172023.fzyJ3TMB-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp at intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202503172023.fzyJ3TMB-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    arch/arm64/kvm/sys_regs.c: In function 'set_pmu_evcntr':
> >> arch/arm64/kvm/sys_regs.c:975:9: error: implicit declaration of function 'kvm_pmu_set_counter_value_user'; did you mean 'kvm_pmu_set_counter_value'? [-Wimplicit-function-declaration]
>      975 |         kvm_pmu_set_counter_value_user(vcpu, idx, val);
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>          |         kvm_pmu_set_counter_value
> 
> 
> vim +975 arch/arm64/kvm/sys_regs.c
> 
>    962	
>    963	static int set_pmu_evcntr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r,
>    964				  u64 val)
>    965	{
>    966		u64 idx;
>    967	
>    968		if (r->CRn == 9 && r->CRm == 13 && r->Op2 == 0)
>    969			/* PMCCNTR_EL0 */
>    970			idx = ARMV8_PMU_CYCLE_IDX;
>    971		else
>    972			/* PMEVCNTRn_EL0 */
>    973			idx = ((r->CRm & 3) << 3) | (r->Op2 & 7);
>    974	
>  > 975		kvm_pmu_set_counter_value_user(vcpu, idx, val);
>    976		return 0;
>    977	}
>    978	
> 

Looks like a case of missing stub definitions when
CONFIG_HW_PERF_EVENTS isn't selected.

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list