[v2,0/2] perf/x86: KVM: Disable vPMU on hybrid CPUs

Message ID 20230208204230.1360502-1-seanjc@google.com
Headers
Series perf/x86: KVM: Disable vPMU on hybrid CPUs |

Message

Sean Christopherson Feb. 8, 2023, 8:42 p.m. UTC
  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/20230120004051.2043777-1-seanjc@google.com

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
  

Comments

Paolo Bonzini Feb. 15, 2023, 1:27 p.m. UTC | #1
Queued, thanks.

Paolo