This series attempts to clean up demand_paging_test, dirty_log_perf_test, and dirty_log_test by factoring out common code, creating some new API along the way. It also splits include/perf_test_util.h into a more conventional header and source pair. There's still some stuff I don't like, for example the unbalanced ucall_uninit we now get for tests using the perf_test API, but I'll maybe revisit that stuff again some other day. I've tested on x86 and AArch64 (one config each), but not s390x. Thanks, drew Andrew Jones (8): KVM: selftests: Update .gitignore KVM: selftests: Remove deadcode KVM: selftests: Factor out guest mode code KVM: selftests: Make vm_create_default common KVM: selftests: Introduce vm_create_[default_]_with_vcpus KVM: selftests: dirty_log_test: Remove create_vm KVM: selftests: Use vm_create_with_vcpus in create_vm KVM: selftests: Implement perf_test_util more conventionally tools/testing/selftests/kvm/.gitignore | 2 +- tools/testing/selftests/kvm/Makefile | 2 +- .../selftests/kvm/demand_paging_test.c | 115 +++-------- .../selftests/kvm/dirty_log_perf_test.c | 174 ++++------------- tools/testing/selftests/kvm/dirty_log_test.c | 179 +++++------------- .../selftests/kvm/include/guest_modes.h | 21 ++ .../testing/selftests/kvm/include/kvm_util.h | 42 +++- .../selftests/kvm/include/perf_test_util.h | 170 +---------------- .../selftests/kvm/lib/aarch64/processor.c | 17 -- tools/testing/selftests/kvm/lib/guest_modes.c | 70 +++++++ tools/testing/selftests/kvm/lib/kvm_util.c | 60 +++++- .../selftests/kvm/lib/perf_test_util.c | 134 +++++++++++++ .../selftests/kvm/lib/s390x/processor.c | 22 --- .../selftests/kvm/lib/x86_64/processor.c | 32 ---- 14 files changed, 451 insertions(+), 589 deletions(-) create mode 100644 tools/testing/selftests/kvm/include/guest_modes.h create mode 100644 tools/testing/selftests/kvm/lib/guest_modes.c create mode 100644 tools/testing/selftests/kvm/lib/perf_test_util.c -- 2.26.2