]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Cache list of MSRs to save/restore
authorSean Christopherson <seanjc@google.com>
Thu, 2 Jun 2022 21:12:14 +0000 (14:12 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:26 +0000 (11:46 -0400)
commit3eb2d1265a3f5b3a467891b3acdb6b31b0e3ced4
tree302412dddbf177e6971e62e46dd053af17150b2d
parent060c09a437945b683d8670d0f7c323cb1fd2ba4f
KVM: selftests: Cache list of MSRs to save/restore

Cache the list of MSRs to save restore, mostly to justify not freeing the
list in the caller, which simplifies consumption of the list.

Opportunistically move the XSS test's so called is_supported_msr() to
common code as kvm_msr_is_in_save_restore_list().  The XSS is "supported"
by KVM, it's simply not in the save/restore list because KVM doesn't yet
allow a non-zero value.

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/xss_msr_test.c