diff options
author | Sean Christopherson <seanjc@google.com> | 2024-01-31 14:27:28 -0800 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-06 10:55:13 -0800 |
commit | 6fd78beed0213655c16ef728af0caec6d5ae4c73 (patch) | |
tree | c3d2d21619db6e6eaa5e573229802bf41484e08d /tools/testing/selftests/kvm/lib/test_util.c | |
parent | ba58f873cdeec30b6da48e28dd5782c5a3e1371b (diff) |
KVM: selftests: Don't assert on exact number of 4KiB in dirty log split test
Drop dirty_log_page_splitting_test's assertion that the number of 4KiB
pages remains the same across dirty logging being enabled and disabled, as
the test doesn't guarantee that mappings outside of the memslots being
dirty logged are stable, e.g. KVM's mappings for code and pages in
memslot0 can be zapped by things like NUMA balancing.
To preserve the spirit of the check, assert that (a) the number of 4KiB
pages after splitting is _at least_ the number of 4KiB pages across all
memslots under test, and (b) the number of hugepages before splitting adds
up to the number of pages across all memslots under test. (b) is a little
tenuous as it relies on memslot0 being incompatible with transparent
hugepages, but that holds true for now as selftests explicitly madvise()
MADV_NOHUGEPAGE for memslot0 (__vm_create() unconditionally specifies the
backing type as VM_MEM_SRC_ANONYMOUS).
Reported-by: Yi Lai <yi1.lai@intel.com>
Reported-by: Tao Su <tao1.su@linux.intel.com>
Reviewed-by: Tao Su <tao1.su@linux.intel.com>
Link: https://lore.kernel.org/r/20240131222728.4100079-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/test_util.c')
0 files changed, 0 insertions, 0 deletions