Thread (25 messages) read the whole thread 25 messages, 2 authors, 2021-03-22

Re: [RFC PATCH v4 8/9] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers

From: Andrew Jones <hidden>
Date: 2021-03-12 11:53:44
Also in: linux-kselftest, lkml

On Tue, Mar 02, 2021 at 08:57:50PM +0800, Yanan Wang wrote:
With VM_MEM_SRC_ANONYMOUS_THP specified in vm_userspace_mem_region_add(),
we have to get the transparent hugepage size for HVA alignment. With the
new helpers, we can use get_backing_src_pagesz() to check whether THP is
configured and then get the exact configured hugepage size.

As different architectures may have different THP page sizes configured,
this can get the accurate THP page sizes on any platform.

Signed-off-by: Yanan Wang <redacted>
Reviewed-by: Ben Gardon <redacted>
---
 tools/testing/selftests/kvm/lib/kvm_util.c | 28 +++++++---------------
 1 file changed, 9 insertions(+), 19 deletions(-)
Reviewed-by: Andrew Jones <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help