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 d34ec0f4e1e8..f6b764ae3fa7 100644 --- a/include/linux/pbha.h +++ b/include/linux/pbha.h @@ -43,6 +43,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);