Skip to content

Commit 089be16

Browse files
sandip4nPeter Zijlstra
authored andcommitted
x86/msr: Add PerfCntrGlobal* registers
Add MSR definitions that will be used to enable the new AMD Performance Monitoring Version 2 (PerfMonV2) features. These include: * Performance Counter Global Control (PerfCntrGlobalCtl) * Performance Counter Global Status (PerfCntrGlobalStatus) * Performance Counter Global Status Clear (PerfCntrGlobalStatusClr) The new Performance Counter Global Control and Status MSRs provide an interface for enabling or disabling multiple counters at the same time and for testing overflow without probing the individual registers for each PMC. The availability of these registers is indicated through the PerfMonV2 feature bit of CPUID leaf 0x80000022 EAX. Signed-off-by: Sandipan Das <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/cdc0d8f75bd519848731b5c64d924f5a0619a573.1650515382.git.sandipan.das@amd.com
1 parent d6d0c7f commit 089be16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/x86/include/asm/msr-index.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,11 @@
524524
#define AMD_CPPC_DES_PERF(x) (((x) & 0xff) << 16)
525525
#define AMD_CPPC_ENERGY_PERF_PREF(x) (((x) & 0xff) << 24)
526526

527+
/* AMD Performance Counter Global Status and Control MSRs */
528+
#define MSR_AMD64_PERF_CNTR_GLOBAL_STATUS 0xc0000300
529+
#define MSR_AMD64_PERF_CNTR_GLOBAL_CTL 0xc0000301
530+
#define MSR_AMD64_PERF_CNTR_GLOBAL_STATUS_CLR 0xc0000302
531+
527532
/* Fam 17h MSRs */
528533
#define MSR_F17H_IRPERF 0xc00000e9
529534

0 commit comments

Comments
 (0)