On Wed, May 27, 2026, Gautam Menghani wrote:
> On Mon, May 18, 2026 at 06:01:04PM -0700, Sean Christopherson wrote:
> > On Mon, May 18, 2026, 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.
> >
> > That seems like a problem to take up with distros, no?
>
> Rather than enabling individually for different distros, wouldn't it be
> better if it is enabled with KVM automatically? I can rephrase the
> commit log to emphasize that this config option is only relevant for
> KVM (similar to CONFIG_KVM_BOOK3S_HV_PMU).
Not if you can't turn it off. As proposed, CONFIG_VPA_PMU gets forced to
whatever CONFIG_KVM_BOOK3S_64_HV is set to. At that point, the existence of
the VPA_PMU Kconfig is pointless.
If you want it enabled by _default_, then turn it on by default, e.g.
diff --git arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/Kconfig
index f7052b131a4c..74910ce3a541 100644
--- arch/powerpc/platforms/pseries/Kconfig
+++ arch/powerpc/platforms/pseries/Kconfig
@@ -154,6 +154,7 @@ config HV_PERF_CTRS
config VPA_PMU
tristate "VPA PMU events"
depends on KVM_BOOK3S_64_HV && HV_PERF_CTRS
+ default m
help
Enable access to the VPA PMU counters via perf. This enables
code that support measurement for KVM on PowerVM(KoP) feature.