Skip to content

Commit fefb876

Browse files
Marc Zyngierchazy
authored andcommitted
arm64: KVM: PTE/PMD S2 XN bit definition
As we're about to make S2 page-tables eXecute Never by default, add the required bits for both PMDs and PTEs. Reviewed-by: Christoffer Dall <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Christoffer Dall <[email protected]>
1 parent 91c703e commit fefb876

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/include/asm/pgtable-hwdef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@
177177
*/
178178
#define PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[2:1] */
179179
#define PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */
180+
#define PTE_S2_XN (_AT(pteval_t, 2) << 53) /* XN[1:0] */
180181

181182
#define PMD_S2_RDONLY (_AT(pmdval_t, 1) << 6) /* HAP[2:1] */
182183
#define PMD_S2_RDWR (_AT(pmdval_t, 3) << 6) /* HAP[2:1] */
184+
#define PMD_S2_XN (_AT(pmdval_t, 2) << 53) /* XN[1:0] */
183185

184186
/*
185187
* Memory Attribute override for Stage-2 (MemAttr[3:0])

0 commit comments

Comments
 (0)