]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Add defines for AMD PMU CPUID features and properties
authorColton Lewis <coltonlewis@google.com>
Wed, 18 Sep 2024 20:53:15 +0000 (20:53 +0000)
committerSean Christopherson <seanjc@google.com>
Wed, 8 Jan 2025 20:01:18 +0000 (12:01 -0800)
commitc76a923828059ac9999e4415dcbd9706ac9540a0
tree800320c3b39251a4225c36d16d00d2a9c1e2033c
parent97d0d1655ea82ac8a54241d5457e6944fbff954c
KVM: selftests: Add defines for AMD PMU CPUID features and properties

Add macros for AMD's PMU related CPUID features.  To make it easier to
cross reference selftest code with KVM/kernel code, use the same macro
names as the kernel for the features.

For reference, the AMD APM defines the features/properties as:

  * PerfCtrExtCore (six core counters instead of four)
  * PerfCtrExtNB (four counters for northbridge events)
  * PerfCtrExtL2I (four counters for L2 cache events)
  * PerfMonV2 (support for registers to control multiple
    counters with a single register write)
  * LbrAndPmcFreeze (support for freezing last branch recorded stack on
    performance counter overflow)
  * NumPerfCtrCore (number of core counters)
  * NumPerfCtrNB (number of northbridge counters)

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Link: https://lore.kernel.org/r/20240918205319.3517569-3-coltonlewis@google.com
[sean: massage changelog, use same names as the kernel]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/processor.h