Re: [RFC PATCH v2 6/7] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers

2021-02-25 Thread wangyanan (Y)
On 2021/2/26 7:44, Ben Gardon wrote: On Wed, Feb 24, 2021 at 10:03 PM 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

Re: [RFC PATCH v2 6/7] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers

2021-02-25 Thread Ben Gardon
On Wed, Feb 24, 2021 at 10:03 PM 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 th

[RFC PATCH v2 6/7] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers

2021-02-24 Thread Yanan Wang
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 archi