Skip to content

x86/pmu: Fixes and improvements

Sean Christopherson kvm 1 version Applied

Status from this message: Applied to kvm-x86 next (and now pulled by Paolo), thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v7 Latest18 patches 4 repliesApplied

Changes in v7 from the cover letter

- Rewrite the changelog for the patch that shrinks the size of pmu_counter_t.
- Cosmetic changes.

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/18x86: pmu: Remove duplicate code in pmu_init()lib/x86/pmu.c+0 -50 replies
2/18x86: pmu: Remove blank line and redundant spacex86/pmu.c+1 -20 replies
3/18x86: pmu: Refine fixed_events[] namesx86/pmu.c+3 -30 replies
4/18x86: pmu: Align fields in pmu_counter_t to better pack the structx86/pmu.c+1 -11 reply
5/18x86: pmu: Enlarge cnt[] length to 48 in check_counters_many()x86/pmu.c+2 -10 replies
6/18x86: pmu: Print measured event count if test failsx86/pmu.c+6 -20 replies
7/18x86: pmu: Fix potential out of bound access for fixed eventsx86/pmu.c+21 -60 replies
8/18x86: pmu: Fix cycles event validation failurex86/pmu.c+16 -00 replies
9/18x86: pmu: Use macro to replace hard-coded branches event indexx86/pmu.c+18 -10 replies
10/18x86: pmu: Use macro to replace hard-coded ref-cycles event indexx86/pmu.c+7 -30 replies
11/18x86: pmu: Use macro to replace hard-coded instructions event indexx86/pmu.c+27 -70 replies
12/18x86: pmu: Enable and disable PMCs in loop() asm blobx86/pmu.c+65 -150 replies
13/18x86: pmu: Improve instruction and branches events verificationx86/pmu.c+33 -00 replies
14/18x86: pmu: Improve LLC misses event verificationx86/pmu.c+26 -130 replies
15/18x86: pmu: Adjust lower boundary of llc-misses event to 0 for legacy CPUsx86/pmu.c+10 -01 reply
16/18x86: pmu: Add IBPB indirect jump asm blobx86/pmu.c+56 -140 replies
17/18x86: pmu: Adjust lower boundary of branch-misses eventx86/pmu.c+19 -40 replies
18/18x86: pmu: Optimize emulated instruction validationx86/pmu.c+65 -430 replies

Reviews trailers per patch

4 of 18 patches have a Reviewed-by or Acked-by.

PatchJim MattsonMingwei Zhang
1/18R-b R-b
2/18R-b R-b
3/18R-b R-b
4/18
5/18R-b
6/18
7/18
8/18
9/18
10/18
11/18
12/18
13/18
14/18
15/18
16/18
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [kvm-unit-tests PATCH v7 00/18] x86/pmu: Fixes and improvements

v7 of Dapeng's PMU fixes/cleanups series. FWIW, I haven't gone through the changes all that carefully, I mostly focused on the high level "what" and the style.

This blows up without the per-CPU fixes:
https://lore.kernel.org/all/[email protected]

v7:
- Rewrite the changelog for the patch that shrinks the size of pmu_counter_t.
- Cosmetic changes.

v6: https://lore.kernel.org/all/[email protected]

Dapeng Mi (17):
x86: pmu: Remove blank line and redundant space
x86: pmu: Refine fixed_events[] names
x86: pmu: Align fields in pmu_counter_t to better pack the struct
x86: pmu: Enlarge cnt[] length to 48 in check_counters_many()
x86: pmu: Print measured event count if test fails
x86: pmu: Fix potential out of bound access for fixed events
x86: pmu: Fix cycles event validation failure
x86: pmu: Use macro to replace hard-coded branches event index
x86: pmu: Use macro to replace hard-coded ref-cycles event index
x86: pmu: Use macro to replace hard-coded instructions event index
x86: pmu: Enable and disable PMCs in loop() asm blob
x86: pmu: Improve instruction and branches events verification
x86: pmu: Improve LLC misses event verification
x86: pmu: Adjust lower boundary of llc-misses event to 0 for legacy
CPUs
x86: pmu: Add IBPB indirect jump asm blob
x86: pmu: Adjust lower boundary of branch-misses event
x86: pmu: Optimize emulated instruction validation

Xiong Zhang (1):
x86: pmu: Remove duplicate code in pmu_init()

 lib/x86/pmu.c |   5 -
 x86/pmu.c     | 423 ++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 342 insertions(+), 86 deletions(-)

base-commit: f77fb696cfd0e4a5562cdca189be557946bf522f

Signature · 1 line
2.48.1.601.g30ceb7b040-goog