KVM: selftests: Add functional test for Intel's fixed PMU counters
authorJinrong Liang <cloudliang@tencent.com>
Tue, 9 Jan 2024 23:02:40 +0000 (15:02 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 30 Jan 2024 23:29:39 +0000 (15:29 -0800)
commit787071fd02625151b94a2f93a47cdc9a25884633
tree0add0eeae4ed691eb8bb15cc8185f1ee6f412207
parentc7d7c76ecf78f93b2bd7d40bccabc813c1ed0a49
KVM: selftests: Add functional test for Intel's fixed PMU counters

Extend the fixed counters test to verify that supported counters can
actually be enabled in the control MSRs, that unsupported counters cannot,
and that enabled counters actually count.

Co-developed-by: Like Xu <likexu@tencent.com>
Signed-off-by: Like Xu <likexu@tencent.com>
Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
[sean: fold into the rd/wr access test, massage changelog]
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240109230250.424295-21-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/pmu_counters_test.c