KVM: selftests: Test all immutable non-format bits in PERF_CAPABILITIES
authorSean Christopherson <seanjc@google.com>
Sat, 11 Mar 2023 00:46:12 +0000 (16:46 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 6 Apr 2023 21:58:44 +0000 (14:58 -0700)
commita2a34d148e75c242fd059e8c7ab31e88396013b6
treedb60fd66fc70a5245d519d999d22614c5cb29e4c
parent37f4e79c43e5750e75b3de8726b4c21bae6ab7aa
KVM: selftests: Test all immutable non-format bits in PERF_CAPABILITIES

Add negative testing of all immutable bits in PERF_CAPABILITIES, i.e.
single bits that are reserved-0 or are effectively reserved-1 by KVM.

Omit LBR and PEBS format bits from the test as it's easier to test them
manually than it is to add safeguards to the comment path, e.g. toggling
a single bit can yield a format of '0', which is legal as a "disable"
value.

Link: https://lore.kernel.org/r/20230311004618.920745-16-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c