1
2 #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H
3 #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H
4
5 #ifndef __ASSEMBLY__
6 #include <linux/types.h>
7
8 typedef u64 pteval_t;
9 typedef u64 pmdval_t;
10 typedef u64 pudval_t;
11 typedef u64 p4dval_t;
12 typedef u64 pgdval_t;
13 typedef u64 pgprotval_t;
14
15 typedef union {
16 struct {
17 unsigned long pte_low, pte_high;
18 };
19 pteval_t pte;
20 } pte_t;
21 #endif
22
23 #ifdef CONFIG_PARAVIRT_XXL
24 #define SHARED_KERNEL_PMD ((!static_cpu_has(X86_FEATURE_PTI) && \
25 (pv_info.shared_kernel_pmd)))
26 #else
27 #define SHARED_KERNEL_PMD (!static_cpu_has(X86_FEATURE_PTI))
28 #endif
29
30
31
32
33 #define PGDIR_SHIFT 30
34 #define PTRS_PER_PGD 4
35
36
37
38
39
40 #define PMD_SHIFT 21
41 #define PTRS_PER_PMD 512
42
43
44
45
46 #define PTRS_PER_PTE 512
47
48 #define MAX_POSSIBLE_PHYSMEM_BITS 36
49 #define PGD_KERNEL_START (CONFIG_PAGE_OFFSET >> PGDIR_SHIFT)
50
51 #endif