File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ static inline void native_set_pte(pte_t *ptep , pte_t pte)
19
19
20
20
static inline void native_set_pmd (pmd_t * pmdp , pmd_t pmd )
21
21
{
22
+ #ifdef CONFIG_PAGE_TABLE_ISOLATION
23
+ pmd .pud .p4d .pgd = pti_set_user_pgtbl (& pmdp -> pud .p4d .pgd , pmd .pud .p4d .pgd );
24
+ #endif
22
25
* pmdp = pmd ;
23
26
}
24
27
@@ -58,6 +61,9 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp)
58
61
#ifdef CONFIG_SMP
59
62
static inline pmd_t native_pmdp_get_and_clear (pmd_t * xp )
60
63
{
64
+ #ifdef CONFIG_PAGE_TABLE_ISOLATION
65
+ pti_set_user_pgtbl (& xp -> pud .p4d .pgd , __pgd (0 ));
66
+ #endif
61
67
return __pmd (xchg ((pmdval_t * )xp , 0 ));
62
68
}
63
69
#else
@@ -67,6 +73,9 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp)
67
73
#ifdef CONFIG_SMP
68
74
static inline pud_t native_pudp_get_and_clear (pud_t * xp )
69
75
{
76
+ #ifdef CONFIG_PAGE_TABLE_ISOLATION
77
+ pti_set_user_pgtbl (& xp -> p4d .pgd , __pgd (0 ));
78
+ #endif
70
79
return __pud (xchg ((pudval_t * )xp , 0 ));
71
80
}
72
81
#else
You can’t perform that action at this time.
0 commit comments