Question about ARM KVM stage2 contiguous bit support for contiguous hugetlb
Zhou Wang
wangzhou1 at hisilicon.com
Fri Mar 13 00:09:40 PDT 2026
Hi,
Current KVM stage2 supports contiguous hugetlb, e.g.4KB basic page size, 64KB hugetlb.
However, contiguous bit is not set in PTE, so there is no hint for hardware to create one
TLB for a contiguous huge page.
Seems to support this feature. We should do:
1. In user_mem_abort, do not force to do PTE map for CONT_PMD_SHIFT/CONT_PTE_SHIFT,
just map all contiguous pages at one time.
2. Add contiguous bit in above process.
3. Modify the permission fault related code. As in the first point, we change vma_pagesize
actually, vma_pagesize will be not equal with fault_granule, we will fail to enter into
kvm_pgtable_stage2_relax_perms.
4. The split of contiguous hugetlb should be considered. We need remove all related contiguous
bits, once one PTE has been changed.
Note sure if I miss any point to implement this feature. And do we have any plan to support this?
Best,
Zhou
More information about the linux-arm-kernel
mailing list