Skip to content

Fix "Instructions Retired" from incorrectly counting

Aaron Lewis kvm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 11 repliesIn review
  2. v25 patches 1 replySuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- s/pmc_is_allowed/event_is_allowed/ [Like]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: x86/pmu: Prevent the PMU from counting disallowed eventsarch/x86/kvm/pmu.c+8 -55 replies
2/5KVM: selftests: Add a common helper to the guesttools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+20 -111 reply
3/5KVM: selftests: Add helpers for PMC assertstools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+36 -341 reply
4/5KVM: selftests: Fixup test assertstools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+5 -61 reply
5/5KVM: selftests: Test the PMU event "Instructions retired"tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c+62 -181 reply

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchLike Xu
1/5R-b
2/5
3/5
4/5
5/5

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

Read the v3 thread

Cover letter [PATCH v3 0/5] Fix "Instructions Retired" from incorrectly counting

This series fixes an issue with the PMU event "Instructions Retired" (0xc0), then tests the fix to verify it works. Running the test updates without the fix will result in a failed test.

v2 -> v3:
- s/pmc_is_allowed/event_is_allowed/ [Like]

v1 -> v2:
- Add pmc_is_allowed() as common helper [Sean]
- Split test into multiple commits [Sean]
- Add macros for counting and not counting [Sean]
- Removed un-needed pr_info [Sean]

Aaron Lewis (5):
KVM: x86/pmu: Prevent the PMU from counting disallowed events
KVM: selftests: Add a common helper to the guest
KVM: selftests: Add helpers for PMC asserts
KVM: selftests: Fixup test asserts
KVM: selftests: Test the PMU event "Instructions retired"

 arch/x86/kvm/pmu.c                            |  13 +-
 .../kvm/x86_64/pmu_event_filter_test.c        | 146 ++++++++++++------
 2 files changed, 108 insertions(+), 51 deletions(-)
Signature · 1 line
2.40.0.rc0.216.gc4246ad0f0-goog