KVM: selftests: Move raw KVM_SET_USER_MEMORY_REGION helper to utils
authorSean Christopherson <seanjc@google.com>
Sat, 26 Feb 2022 00:15:43 +0000 (00:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 15:59:10 +0000 (10:59 -0500)
commit3d7d6043f3c31bcfbed1f636035a2eab37117971
tree96d192cf77c8aff26eb5f981ece1434b6bf85874
parent396fd74d61343aaa4c30a7eb67132b7ef5762744
KVM: selftests: Move raw KVM_SET_USER_MEMORY_REGION helper to utils

Move set_memory_region_test's KVM_SET_USER_MEMORY_REGION helper to KVM's
utils so that it can be used by other tests.  Provide a raw version as
well as an assert-success version to reduce the amount of boilerplate
code need for basic usage.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220226001546.360188-26-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/set_memory_region_test.c