]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Add helper to check if the guest PMU has PERF_GLOBAL_CTRL
authorSean Christopherson <seanjc@google.com>
Fri, 22 Jul 2022 22:44:07 +0000 (22:44 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Jul 2022 17:23:57 +0000 (13:23 -0400)
commit825db332ac1a23d0d50265b43090f7929d8d03ef
tree8777e738715206876273b1ed9c29848d5c4e4838
parentaf639f518ae27a69a677b0d151231dec925f576f
KVM: VMX: Add helper to check if the guest PMU has PERF_GLOBAL_CTRL

Add a helper to check of the guest PMU has PERF_GLOBAL_CTRL, which is
unintuitive _and_ diverges from Intel's architecturally defined behavior.
Even worse, KVM currently implements the check using two different (but
equivalent) checks, _and_ there has been at least one attempt to add a
_third_ flavor.

Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220722224409.1336532-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/vmx/vmx.h