Subject: Re: [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM

From: Harsh Prateek Bora <[email-masked]>
Date: Tue, 26 May 2026 12:30:43 +0530

On 18/05/26 10:11 am, Gautam Menghani wrote:
> Enable CONFIG_VPA_PMU with KVM to enable its usage. Currently, the
> vpa-pmu driver cannot be used since it is not enabled in distro configs.
> 

I think the commit log needs a rephrase as irrespective of current state 
of distro configs, it makes sense to enable CONFIG_VPA_PMU for KVM 
guests on Power by default since this is the only use-case for VPA 
counters (i.e. in a KVM guest).

> On fedora kernel 6.13.7, the config option is disabled:
> $ cat /boot/config-6.19.12-200.fc43.ppc64le  | grep VPA_PMU
>   # CONFIG_VPA_PMU is not set
> 
> Fixes: 176cda0619b6c ("powerpc/perf: Add perf interface to expose vpa counters")
> Cc: [email-masked] # v6.13+
> Signed-off-by: Gautam Menghani <[email-masked]>
> ---
> v1 -> v2:
> 1. Rebased on latest master
> 
>   arch/powerpc/kvm/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
> index 9a0d1c1aca6c..56e86b46ff13 100644
> --- a/arch/powerpc/kvm/Kconfig
> +++ b/arch/powerpc/kvm/Kconfig
> @@ -82,6 +82,7 @@ config KVM_BOOK3S_64_HV
>   	select KVM_BOOK3S_HV_POSSIBLE
>   	select KVM_BOOK3S_HV_PMU
>   	select CMA
> +	select VPA_PMU if HV_PERF_CTRS

Also, since we already select KVM_BOOK3S_HV_PMU, VPA_PMU is a natural 
extension, provided we enable only if the required dependecy is enabled.

With an update to the changelog with suggested rationale:

Reviewed-by: Harsh Prateek Bora <[email-masked]>

>   	help
>   	  Support running unmodified book3s_64 guest kernels in
>   	  virtual machines on POWER7 and newer processors that have