Skip to content
Commit 623653b7 authored by Yanan Wang's avatar Yanan Wang Committed by Paolo Bonzini
Browse files

KVM: selftests: List all hugetlb src types specified with page sizes



With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system
default hugetlb pages to back the testing guest memory. In order to
add flexibility, now list all the known hugetlb backing src types with
different page sizes, so that we can specify use of hugetlb pages of the
exact granularity that we want. And as all the known hugetlb page sizes
are listed, it's appropriate for all architectures.

Besides, the helper get_backing_src_pagesz() is added to get the
granularity of different backing src types(anonumous, thp, hugetlb).

Suggested-by: default avatarBen Gardon <bgardon@google.com>
Signed-off-by: default avatarYanan Wang <wangyanan55@huawei.com>
Reviewed-by: default avatarAndrew Jones <drjones@redhat.com>
Message-Id: <20210330080856.14940-9-wangyanan55@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 5579fa68
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment