On 8/19/2022 4:39 PM, Like Xu wrote: > From: Like Xu <likexu@xxxxxxxxxxx> > > AMD core PMU before Zen4 did not have version numbers, there were > no fixed counters, it had a hard-coded number of generic counters, > bit-width, and only hardware events common across amd generations > (starting with K7) were added to amd_gp_events[] table. > > All above differences are instantiated at the detection step, and it > also covers the K7 PMU registers, which is consistent with bare-metal. > > Signed-off-by: Like Xu <likexu@xxxxxxxxxxx> > --- > lib/x86/msr.h | 17 ++++++++++++ > lib/x86/processor.h | 32 ++++++++++++++++++++-- > x86/pmu.c | 67 ++++++++++++++++++++++++++++++++++++++++----- > 3 files changed, 106 insertions(+), 10 deletions(-) > > [...] Reviewed-by: Sandipan Das <sandipan.das@xxxxxxx>