1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H
3 #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H
6 #include <linux/types.h>
13 typedef u64 pgprotval_t;
17 unsigned long pte_low, pte_high;
21 #endif /* !__ASSEMBLY__ */
23 #ifdef CONFIG_PARAVIRT_XXL
24 #define SHARED_KERNEL_PMD ((!static_cpu_has(X86_FEATURE_PTI) && \
25 (pv_info.shared_kernel_pmd)))
27 #define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI))
31 * PGDIR_SHIFT determines what a top-level page table entry can map
33 #define PGDIR_SHIFT 30
34 #define PTRS_PER_PGD 4
37 * PMD_SHIFT determines the size of the area a middle-level
41 #define PTRS_PER_PMD 512
44 * entries per page directory level
46 #define PTRS_PER_PTE 512
48 #define MAX_POSSIBLE_PHYSMEM_BITS 36
49 #define PGD_KERNEL_START (CONFIG_PAGE_OFFSET >> PGDIR_SHIFT)
51 #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */