]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Dedup MSR index list helpers, simplify dedicated test
authorSean Christopherson <seanjc@google.com>
Thu, 2 Jun 2022 19:24:18 +0000 (12:24 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:28 +0000 (11:46 -0400)
commit2638e4d0079e8567af3f82b8bf3898b68ee27362
treedd3667daba0196b3fd70cd589113de80a8b647df
parentdd1e6383bfaf9ea21c3662da7ba5100587f5b1a8
KVM: selftests: Dedup MSR index list helpers, simplify dedicated test

Consolidate the helper for retrieving the list of save/restore MSRs and
the list of feature MSRs, and use the common helpers in the related
get_msr_index_features test.  Switching to the common helpers eliminates
the testcase that KVM returns the same -E2BIG result if the input number
of MSRs is '1' versus '0', but considered that testcase isn't very
interesting, e.g. '0' and '1' are equally arbitrary, and certainly not
worth the additional code.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/get_msr_index_features.c