]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Refuse to export capabilities for hybrid PMUs
authorSean Christopherson <seanjc@google.com>
Wed, 8 Feb 2023 20:42:30 +0000 (20:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:59:55 +0000 (12:59 +0100)
commita893a6bcedbdcb3ac8c172fd3a5baf4d0931c90a
tree2657f8be02df63113ce9e70a48c4edc5374297af
parentbfe4572a262ad96862fe3528dc80cb1aa0ff9f01
perf/x86: Refuse to export capabilities for hybrid PMUs

commit 0e5c87cae776ef0dbe7e28f17575f0753c1ba00a upstream.

Now that KVM disables vPMU support on hybrid CPUs, WARN and return zeros
if perf_get_x86_pmu_capability() is invoked on a hybrid CPU.  The helper
doesn't provide an accurate accounting of the PMU capabilities for hybrid
CPUs and needs to be enhanced if KVM, or anything else outside of perf,
wants to act on the PMU capabilities.

Cc: stable@vger.kernel.org
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Link: https://lore.kernel.org/all/20220818181530.2355034-1-kan.liang@linux.intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230208204230.1360502-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/events/core.c