]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: kvm/x86: Add test for KVM_SET_PMU_EVENT_FILTER
authorJim Mattson <jmattson@google.com>
Sat, 15 Jan 2022 05:24:31 +0000 (21:24 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Jan 2022 17:12:16 +0000 (12:12 -0500)
commit8bbfcfb9670513e98127e34b6b3ff05ee42645b0
tree26776a47c3dc2e0057212c0a635a0658c28e26bd
parent77d40b543086bfa50a70927185779c8e9803ef3c
selftests: kvm/x86: Add test for KVM_SET_PMU_EVENT_FILTER

Verify that the PMU event filter works as expected.

Note that the virtual PMU doesn't work as expected on AMD Zen CPUs (an
intercepted rdmsr is counted as a retired branch instruction), but the
PMU event filter does work.

Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220115052431.447232-7-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c [new file with mode: 0644]