Skip to content

pmu test bugs fix and improvements

Dapeng Mi kvm lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest18 patches 14 repliesIn review
  2. v518 patches 6 repliesSuperseded
  3. v417 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v311 patches26 repliesSuperseded
v25 patches8 repliesSuperseded
v15 patches13 repliesSuperseded

Changes in v6 from the cover letter

* limit maximum fixed counters number to MIN(pmu.nr_fixed_counters, ARRAY_SIZE(fixed_events)) to avoid out-of-bound access for fixed_events[]. If supported fixed counters number is larger than array size of fixed_events[], print message to remind to update test case. (Jim)
* limit instructions & branches events precise validation for only Intel processors. (Sandipan Das)

Patches in v6 No applies recorded yet

#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: Fix the issue that pmu_counter_t.config crosses cache linex86/pmu.c+1 -12 replies
5/18x86: pmu: Enlarge cnt[] length to 48 in check_counters_many()x86/pmu.c+1 -13 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 -63 replies
8/18x86: pmu: Fix cycles event validation failurex86/pmu.c+16 -02 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+37 -02 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 -00 replies
16/18x86: pmu: Add IBPB indirect jump asm blobx86/pmu.c+56 -150 replies
17/18x86: pmu: Adjust lower boundary of branch-misses eventx86/pmu.c+21 -42 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 ZhangDapeng Mi
1/18R-b
2/18R-b
3/18R-b
4/18Signeduoff-by
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. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [kvm-unit-tests patch v6 00/18] pmu test bugs fix and improvements

Changes:
v5 -> v6:
* limit maximum fixed counters number to MIN(pmu.nr_fixed_counters, ARRAY_SIZE(fixed_events)) to avoid out-of-bound access for fixed_events[]. If supported fixed counters number is larger than array size of fixed_events[], print message to remind to update test case. (Jim)
* limit instructions & branches events precise validation for only Intel processors. (Sandipan Das)

KUT/pmu test passes on Intel Sapphire Rapids platform.

History:
v5: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/all/[email protected]/
v3: https://lore.kernel.org/lkml/[email protected]/
v2: https://lore.kernel.org/lkml/[email protected]/
v1: https://lore.kernel.org/lkml/[email protected]/

Dapeng Mi (17):
x86: pmu: Remove blank line and redundant space
x86: pmu: Refine fixed_events[] names
x86: pmu: Fix the issue that pmu_counter_t.config crosses cache line
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     | 427 ++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 346 insertions(+), 86 deletions(-)

base-commit: 17f6f2fd17935eb5e564f621c71244b4a3ddeafb

Signature · 1 line
2.40.1