
From: Ma Wupeng <mawupeng1@huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7ZC0H -------------------------------- Set flag VM_PBHA_BIT0 for global init task during #PF. Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> --- include/linux/pbha.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/pbha.h b/include/linux/pbha.h index 9746bdda4f1d..8002324fc2d6 100644 --- a/include/linux/pbha.h +++ b/include/linux/pbha.h @@ -44,6 +44,10 @@ static inline pte_t maybe_mk_pbha_bit0(pte_t pte, struct vm_area_struct *vma) if (!system_support_pbha_bit0()) return pte; + if (unlikely(is_global_init(current)) && + !(vma->vm_flags & VM_PBHA_BIT0)) + vma->vm_flags |= VM_PBHA_BIT0; + if (vma->vm_flags & VM_PBHA_BIT0) pte = pte_mkpbha(pte, PBHA_VAL_BIT0); -- 2.25.1