mbox series

[v2,0/5] Fix "Instructions Retired" from incorrectly counting

Message ID 20230228000644.3204402-1-aaronlewis@google.com (mailing list archive)
Headers show
Series Fix "Instructions Retired" from incorrectly counting | expand

Message

Aaron Lewis Feb. 28, 2023, 12:06 a.m. UTC
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.

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(-)