]> git.ipfire.org Git - people/ms/linux.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)
commitb663f0b5f3d665c261256d1f76e98f077c6e56af
tree8777e738715206876273b1ed9c29848d5c4e4838
parent93255bf92939d948bc86d81c6bb70bb0fecc5db1
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