Re: [PATCH 00/15] VM: selftests: Hugepage fixes and cleanups

From: Andrew Jones
Date: Thu Feb 11 2021 - 07:10:15 EST


On Wed, Feb 10, 2021 at 03:06:10PM -0800, Sean Christopherson wrote:
> Fix hugepage bugs in the KVM selftests that specifically affect dirty
> logging and demand paging tests. Found while attempting to verify KVM
> changes/fixes related to hugepages and dirty logging (patches incoming in
> a separate series).
>
> Clean up the perf_test_args util on top of the hugepage fixes to clarify
> what "page size" means, and to improve confidence in the code doing what
> it thinks it's doing. In a few cases, users of perf_test_args were
> duplicating (approximating?) calculations made by perf_test_args, and it
> wasn't obvious that both pieces of code were guaranteed to end up with the
> same result.
>
> Sean Christopherson (15):
> KVM: selftests: Explicitly state indicies for vm_guest_mode_params
> array
> KVM: selftests: Expose align() helpers to tests
> KVM: selftests: Align HVA for HugeTLB-backed memslots
> KVM: selftests: Force stronger HVA alignment (1gb) for hugepages
> KVM: selftests: Require GPA to be aligned when backed by hugepages
> KVM: selftests: Use shorthand local var to access struct
> perf_tests_args
> KVM: selftests: Capture per-vCPU GPA in perf_test_vcpu_args
> KVM: selftests: Use perf util's per-vCPU GPA/pages in demand paging
> test
> KVM: selftests: Move per-VM GPA into perf_test_args
> KVM: selftests: Remove perf_test_args.host_page_size
> KVM: selftests: Create VM with adjusted number of guest pages for perf
> tests
> KVM: selftests: Fill per-vCPU struct during "perf_test" VM creation
> KVM: selftests: Sync perf_test_args to guest during VM creation
> KVM: selftests: Track size of per-VM memslot in perf_test_args
> KVM: selftests: Get rid of gorilla math in memslots modification test
>
> .../selftests/kvm/demand_paging_test.c | 39 ++---
> .../selftests/kvm/dirty_log_perf_test.c | 10 +-
> .../testing/selftests/kvm/include/kvm_util.h | 28 ++++
> .../selftests/kvm/include/perf_test_util.h | 18 +--
> tools/testing/selftests/kvm/lib/kvm_util.c | 36 ++---
> .../selftests/kvm/lib/perf_test_util.c | 139 ++++++++++--------
> .../kvm/memslot_modification_stress_test.c | 16 +-
> 7 files changed, 145 insertions(+), 141 deletions(-)
>
> --
> 2.30.0.478.g8a0d178c01-goog
>

For the series

Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>

Thanks,
drew