KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM
Subsystems (4)
PATCH v2 1/1 KVM: PPC: Kconfig: Enable CONFIG_VPA_PMU with KVM
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
---
v1 -> v2:
1. Rebased on latest master
arch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/kvm/Kconfig +1 -0
@@ -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
Signature · 1 line
2.53.0
Sean Christopherson
reviewerQuoted 2 lines · Gautam Menghani
Enable
CONFIG_VPA_PMUwith 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?
Quoted 5 lines · Sean Christopherson
Quoted 2 lines · Gautam Menghani
Enable
CONFIG_VPA_PMUwith 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
Sean Christopherson
reviewerQuoted 11 lines · Gautam Menghani
Quoted 5 lines · Sean Christopherson
Quoted 2 lines · Gautam Menghani
Enable
CONFIG_VPA_PMUwith 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.
powerpc/platforms/pseries/Kconfig +1 -0
@@ -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.
Quoted 3 lines · Gautam Menghani
Enable
CONFIG_VPA_PMUwith 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).
Quoted 19 lines
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 setFixes 176cda0619b6c ("powerpc/perf: Add perf interface to expose vpa counters")Cc [email protected] # v6.13+Signed-off-by Gautam Menghani <[email protected]>---
v1 -> v2:
1. Rebased on latest masterarch/powerpc/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/powerpc/kvm/Kconfig +0
-0
arch/powerpc/kvm/Kconfig config KVM_BOOK3S_64_HV · line 85
Quoted 4 lines
arch/powerpc/kvm/Kconfig +1
-0@@ -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:
Quoted 3 lines
arch/powerpc/kvm/Kconfig +0
-0help Support running unmodified book3s_64 guest kernels in virtual machines on POWER7 and newer processors that have