Skip to content

Commit f5dec21

Browse files
committed
mm: mark special bits for huge pfn mappings when inject
jira LE-3557 Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6 commit-author Peter Xu <[email protected]> commit 3c8e44c We need these special bits to be around on pfnmaps. Mark properly for !devmap case, reflecting that there's no page struct backing the entry. Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Peter Xu <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Alex Williamson <[email protected]> Cc: Aneesh Kumar K.V <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Gavin Shan <[email protected]> Cc: Gerald Schaefer <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Niklas Schnelle <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> (cherry picked from commit 3c8e44c) Signed-off-by: Jonathan Maple <[email protected]>
1 parent aececef commit f5dec21

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mm/huge_memory.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,8 @@ static void insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,
860860
entry = pmd_mkhuge(pfn_t_pmd(pfn, prot));
861861
if (pfn_t_devmap(pfn))
862862
entry = pmd_mkdevmap(entry);
863+
else
864+
entry = pmd_mkspecial(entry);
863865
if (write) {
864866
entry = pmd_mkyoung(pmd_mkdirty(entry));
865867
entry = maybe_pmd_mkwrite(entry, vma);
@@ -958,6 +960,8 @@ static void insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr,
958960
entry = pud_mkhuge(pfn_t_pud(pfn, prot));
959961
if (pfn_t_devmap(pfn))
960962
entry = pud_mkdevmap(entry);
963+
else
964+
entry = pud_mkspecial(entry);
961965
if (write) {
962966
entry = pud_mkyoung(pud_mkdirty(entry));
963967
entry = maybe_pud_mkwrite(entry, vma);

0 commit comments

Comments
 (0)