1
0
Fork 0
alistair23-linux/arch/powerpc/include/asm/book3s/64
Aneesh Kumar K.V a2087c04a2 powerpc/book3s64/hash/4k: Support large linear mapping range with 4K
[ Upstream commit 7746406baa ]

With commit: 0034d395f8 ("powerpc/mm/hash64: Map all the kernel
regions in the same 0xc range"), we now split the 64TB address range
into 4 contexts each of 16TB. That implies we can do only 16TB linear
mapping.

On some systems, eg. Power9, memory attached to nodes > 0 will appear
above 16TB in the linear mapping. This resulted in kernel crash when
we boot such systems in hash translation mode with 4K PAGE_SIZE.

This patch updates the kernel mapping such that we now start supporting upto
61TB of memory with 4K. The kernel mapping now looks like below 4K PAGE_SIZE
and hash translation.

    vmalloc start     = 0xc0003d0000000000
    IO start          = 0xc0003e0000000000
    vmemmap start     = 0xc0003f0000000000

Our MAX_PHYSMEM_BITS for 4K is still 64TB even though we can only map 61TB.
We prevent bolt mapping anything outside 61TB range by checking against
H_VMALLOC_START.

Fixes: 0034d395f8 ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range")
Reported-by: Cameron Berkenpas <cam@neo-zeon.de>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200608070904.387440-3-aneesh.kumar@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:48 +01:00
..
hash-4k.h powerpc/book3s64/hash/4k: Support large linear mapping range with 4K 2020-10-29 09:57:48 +01:00
hash-64k.h powerpc/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap PTE entries 2020-04-17 10:50:22 +02:00
hash.h powerpc/mm/hash: Fix get_region_id() for invalid addresses 2019-05-17 22:57:40 +10:00
hugetlb.h hugetlb: allow to free gigantic pages regardless of the configuration 2019-05-14 09:47:47 -07:00
kup-radix.h powerpc/kuap: Fix set direction in allow/prevent_user_access() 2020-02-11 04:35:55 -08:00
mmu-hash.h powerpc/mm/hash: Fix sharing context ids between kernel & userspace 2020-01-29 16:45:26 +01:00
mmu.h powerpc/book3s64/radix: Fix boot failure with large amount of guest memory 2020-09-23 12:40:39 +02:00
pgalloc.h powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case 2020-02-11 04:35:17 -08:00
pgtable-4k.h powerpc/mm/hash/4k: Free hugetlb page table caches correctly. 2018-06-20 09:13:25 +10:00
pgtable-64k.h powerpc/mm/thp: update pmd_trans_huge to check for pmd_present 2018-10-03 15:40:00 +10:00
pgtable.h powerpc/64s/pgtable: fix an undefined behaviour 2020-06-24 17:50:31 +02:00
radix-4k.h powerpc/mm/64: Document the sizes of/sizes mapped by Pxx_INDEX_SIZE 2019-04-20 22:02:11 +10:00
radix-64k.h powerpc/mm/64: Document the sizes of/sizes mapped by Pxx_INDEX_SIZE 2019-04-20 22:02:11 +10:00
radix.h powerpc/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap PTE entries 2020-04-17 10:50:22 +02:00
slice.h powerpc/mm: define subarch SLB_ADDR_LIMIT_DEFAULT 2019-05-03 01:20:23 +10:00
tlbflush-hash.h powerpc/64s: Improve local TLB flush for boot and MCE on POWER9 2018-01-18 00:40:31 +11:00
tlbflush-radix.h powerpc/64s/radix: Fix build failure with RADIX_MMU=n 2019-10-09 17:16:58 +11:00
tlbflush.h powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00