Applied 4/5/9/10/11 (plus, 1 and 2 have replacements in kvm/queue).
I'll push shortly, please rebase and resend.
Paolo
On 11/11/20 13:26, Andrew Jones wrote:
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.
I've tested on x86 and AArch64 (one config each), but not s390x.
v2:
- Use extra_mem instead of per-vcpu mem for the test mem in
demand_paging_test and dirty_log_perf_test [Ben]
- Couple more cleanups, like adding perf_test_destroy_vm()
to balance create/destroy of a perf test vm [drew]
- Added new patches [drew]:
- Since dirty_log_perf_test works fine on AArch64,
"KVM: selftests: Also build dirty_log_perf_test on AArch64"
- More cleanup of redundant code,
"KVM: selftests: x86: Set supported CPUIDs on default VM"
- Keep test skipping consistent,
"KVM: selftests: Make test skipping consistent"
I definitely want to get x86 people's review on "KVM: selftests: x86:
Set supported CPUIDs on default VM" to be sure it's OK to do that.
Thanks,
drew
Andrew Jones (11):
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
KVM: selftests: Also build dirty_log_perf_test on AArch64
KVM: selftests: x86: Set supported CPUIDs on default VM
KVM: selftests: Make test skipping consistent
tools/testing/selftests/kvm/.gitignore | 2 +-
tools/testing/selftests/kvm/Makefile | 3 +-
.../selftests/kvm/demand_paging_test.c | 118 +++--------
.../selftests/kvm/dirty_log_perf_test.c | 183 ++++--------------
tools/testing/selftests/kvm/dirty_log_test.c | 182 +++++------------
.../selftests/kvm/include/guest_modes.h | 21 ++
.../testing/selftests/kvm/include/kvm_util.h | 42 +++-
.../selftests/kvm/include/perf_test_util.h | 171 ++--------------
.../selftests/kvm/lib/aarch64/processor.c | 17 --
tools/testing/selftests/kvm/lib/guest_modes.c | 70 +++++++
tools/testing/selftests/kvm/lib/kvm_util.c | 67 ++++++-
.../selftests/kvm/lib/perf_test_util.c | 134 +++++++++++++
.../selftests/kvm/lib/s390x/processor.c | 22 ---
.../selftests/kvm/lib/x86_64/processor.c | 32 ---
.../selftests/kvm/set_memory_region_test.c | 2 -
.../kvm/x86_64/cr4_cpuid_sync_test.c | 1 -
.../testing/selftests/kvm/x86_64/debug_regs.c | 1 -
.../testing/selftests/kvm/x86_64/evmcs_test.c | 2 -
.../selftests/kvm/x86_64/kvm_pv_test.c | 4 +-
tools/testing/selftests/kvm/x86_64/smm_test.c | 2 -
.../testing/selftests/kvm/x86_64/state_test.c | 1 -
.../selftests/kvm/x86_64/svm_vmcall_test.c | 1 -
.../selftests/kvm/x86_64/tsc_msrs_test.c | 1 -
.../selftests/kvm/x86_64/user_msr_test.c | 7 +-
.../kvm/x86_64/vmx_apic_access_test.c | 1 -
.../kvm/x86_64/vmx_close_while_nested_test.c | 1 -
.../selftests/kvm/x86_64/vmx_dirty_log_test.c | 1 -
.../kvm/x86_64/vmx_preemption_timer_test.c | 15 +-
.../kvm/x86_64/vmx_set_nested_state_test.c | 21 ++
.../kvm/x86_64/vmx_tsc_adjust_test.c | 1 -
30 files changed, 499 insertions(+), 627 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