]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Split vcpu_set_nested_state() into two helpers
authorSean Christopherson <seanjc@google.com>
Tue, 15 Feb 2022 18:08:45 +0000 (10:08 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 14:15:16 +0000 (10:15 -0400)
commit79c77e51fea898e1cc7f3d3b4fb3bf69bbdfeb00
treeb9d46dfa320fa76ed9bba0ddca2d73cd0e6c2304
parent18f10c2ba982093ee632dfd19221bb9ebc9b50ca
KVM: selftests: Split vcpu_set_nested_state() into two helpers

Split vcpu_nested_state_set() into a wrapper that asserts, and an inner
helper that does not.  Passing a bool is all kinds of awful as it's
unintuitive for readers and requires returning an 'int' from a function
that for most users can never return anything other than "success".

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