Skip to content

perf/x86: KVM: Disable vPMU on hybrid CPUs

Sean Christopherson kvm linux-perf-users lkml 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v11 patch 8 repliesSuperseded

Changes in v2 from the cover letter

- Disable vPMU on hybrid CPUs in KVM _and_ in perf. [Like]
- Use X86_FEATURE_HYBRID_CPU instead of is_hybrid().
- Tweak comments/changelogs to more clearly state that there are options beyond pinning vCPUs (though they still need KVM support). [Like]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs)arch/x86/kvm/pmu.h+19 -70 replies
2/2perf/x86: Refuse to export capabilities for hybrid PMUsarch/x86/events/core.c+8 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] perf/x86: KVM: Disable vPMU on hybrid CPUs

Disable vPMU support in KVM when running on hybrid CPUs to avoid inducing #GPs and other issues in guests. This is intended to be a stopgap to prevent unwitting KVM users from shooting themselves in the foot until KVM KVM gets proper enabling for hybrid CPUs.

Effectively squash exporting PMU capabilities from perf until it too gets proper enabling.

v2:
- Disable vPMU on hybrid CPUs in KVM _and_ in perf. [Like]
- Use X86_FEATURE_HYBRID_CPU instead of is_hybrid().
- Tweak comments/changelogs to more clearly state that there are options beyond pinning vCPUs (though they still need KVM support). [Like]

v1: https://lore.kernel.org/all/[email protected]

Sean Christopherson (2):
KVM: x86/pmu: Disable vPMU support on hybrid CPUs (host PMUs) perf/x86: Refuse to export capabilities for hybrid PMUs

 arch/x86/events/core.c | 14 ++++++++------
 arch/x86/kvm/pmu.h     | 26 +++++++++++++++++++-------
 2 files changed, 27 insertions(+), 13 deletions(-)

base-commit: 7cb79f433e75b05d1635aefaa851cfcd1cb7dc4f

Signature · 1 line
2.39.1.519.gcb327c4b5f-goog