* [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM
@ 2026-05-18 4:41 Gautam Menghani
2026-05-19 1:01 ` Sean Christopherson
2026-05-26 7:00 ` Harsh Prateek Bora
0 siblings, 2 replies; 5+ messages in thread
From: Gautam Menghani @ 2026-05-18 4:41 UTC (permalink / raw)
To: maddy, npiggin, mpe, chleroy, atrajeev
Cc: Gautam Menghani, linuxppc-dev, kvm, linux-kernel, stable
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.
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: stable@vger.kernel.org # v6.13+
Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
---
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
help
Support running unmodified book3s_64 guest kernels in
virtual machines on POWER7 and newer processors that have
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM 2026-05-18 4:41 [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM Gautam Menghani @ 2026-05-19 1:01 ` Sean Christopherson 2026-05-27 16:16 ` Gautam Menghani 2026-05-26 7:00 ` Harsh Prateek Bora 1 sibling, 1 reply; 5+ messages in thread From: Sean Christopherson @ 2026-05-19 1:01 UTC (permalink / raw) To: Gautam Menghani Cc: maddy, npiggin, mpe, chleroy, atrajeev, linuxppc-dev, kvm, linux-kernel, stable 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? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM 2026-05-19 1:01 ` Sean Christopherson @ 2026-05-27 16:16 ` Gautam Menghani 2026-05-27 17:40 ` Sean Christopherson 0 siblings, 1 reply; 5+ messages in thread From: Gautam Menghani @ 2026-05-27 16:16 UTC (permalink / raw) To: Sean Christopherson Cc: maddy, npiggin, mpe, chleroy, atrajeev, linuxppc-dev, kvm, linux-kernel, stable 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). Thanks, Gautam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM 2026-05-27 16:16 ` Gautam Menghani @ 2026-05-27 17:40 ` Sean Christopherson 0 siblings, 0 replies; 5+ messages in thread From: Sean Christopherson @ 2026-05-27 17:40 UTC (permalink / raw) To: Gautam Menghani Cc: maddy, npiggin, mpe, chleroy, atrajeev, linuxppc-dev, kvm, linux-kernel, stable 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. ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM 2026-05-18 4:41 [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM Gautam Menghani 2026-05-19 1:01 ` Sean Christopherson @ 2026-05-26 7:00 ` Harsh Prateek Bora 1 sibling, 0 replies; 5+ messages in thread From: Harsh Prateek Bora @ 2026-05-26 7:00 UTC (permalink / raw) To: Gautam Menghani, maddy, npiggin, mpe, chleroy, atrajeev Cc: linuxppc-dev, kvm, linux-kernel, stable 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: stable@vger.kernel.org # v6.13+ > Signed-off-by: Gautam Menghani <gautam@linux.ibm.com> > --- > 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 <harshpb@linux.ibm.com> > help > Support running unmodified book3s_64 guest kernels in > virtual machines on POWER7 and newer processors that have ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-27 17:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-18 4:41 [PATCH v2] KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM Gautam Menghani 2026-05-19 1:01 ` Sean Christopherson 2026-05-27 16:16 ` Gautam Menghani 2026-05-27 17:40 ` Sean Christopherson 2026-05-26 7:00 ` Harsh Prateek Bora
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox