+6
−2
Loading
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR -------------------------------- A 512M hugepage is composed of 64 contiguous 8M hugepages. When setting up the page table entries, it assigned the PFN of first 8M hugepage to all the 64 contiguous PMDs and set the HPFN bit. This caused incorrect page in gup_huge_pmd() because of PMD_MASK, and resulted in incorrect address access in some scenarios when 512M hugepages were used. This patch fixes the page table setup to ensure that each PMD's PFN corresponds to an individual 8M hugepage. For kvm, although the original code works fine, this patch makes similar modifications to Additional Page Table(APT) to maintain consistency in the 512M hugepage setup method. Signed-off-by:Wang Yuanheng <wangyuanheng@wxiat.com> Reviewed-by:
He Sheng <hesheng@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>