diff options
author | Axel Rasmussen | 2021-05-19 13:03:33 -0700 |
---|---|---|
committer | Paolo Bonzini | 2021-05-27 07:45:55 -0400 |
commit | 32ffa4f71e10009498ae6b54da65ab316db967bd (patch) | |
tree | 9b35d53bcbad0af2f61bebb700038f49fb83eae2 /tools/testing/kunit/kunit_tool_test.py | |
parent | 25408e5a0246048e3e36d2cd513565ebcc481f51 (diff) |
KVM: selftests: compute correct demand paging size
This is a preparatory commit needed before we can use different kinds of
backing pages for guest memory.
Previously, we used perf_test_args.host_page_size, which is the host's
native page size (commonly 4K). For VM_MEM_SRC_ANONYMOUS this turns out
to be okay, but in a follow-up commit we want to allow using different
kinds of backing memory.
Take VM_MEM_SRC_ANONYMOUS_HUGETLB for example. Without this change, if
we used that backing page type, when we issued a UFFDIO_COPY ioctl we'd
only do so with 4K, rather than the full 2M of a backing hugepage. In
this case, UFFDIO_COPY returns -EINVAL (__mcopy_atomic_hugetlb checks
the size).
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Message-Id: <20210519200339.829146-5-axelrasmussen@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/kunit/kunit_tool_test.py')
0 files changed, 0 insertions, 0 deletions