arm64: KVM: PTE/PMD S2 XN bit definition

"Linux Kernel Mailing List" <[email protected]> Sat, 10 Feb 2018 22:00:23 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/fefb876b9b96fa7e4ed3d906979ea45b4cf07349
Commit:     fefb876b9b96fa7e4ed3d906979ea45b4cf07349
Parent:     91c703e0382a1212d249adf34af4943a5da90d54
Refname:    refs/heads/master
Author:     Marc Zyngier <[email protected]>
AuthorDate: Mon Oct 23 17:11:18 2017 +0100
Committer:  Christoffer Dall <[email protected]>
CommitDate: Mon Jan 8 15:20:44 2018 +0100

    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]>
---
 arch/arm64/include/asm/pgtable-hwdef.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h
index eb0c2bd90de9..af035331fb09 100644
--- a/arch/arm64/include/asm/pgtable-hwdef.h
+++ b/arch/arm64/include/asm/pgtable-hwdef.h
@@ -177,9 +177,11 @@
  */
 #define PTE_S2_RDONLY		(_AT(pteval_t, 1) << 6)   /* HAP[2:1] */
 #define PTE_S2_RDWR		(_AT(pteval_t, 3) << 6)   /* HAP[2:1] */
+#define PTE_S2_XN		(_AT(pteval_t, 2) << 53)  /* XN[1:0] */
 
 #define PMD_S2_RDONLY		(_AT(pmdval_t, 1) << 6)   /* HAP[2:1] */
 #define PMD_S2_RDWR		(_AT(pmdval_t, 3) << 6)   /* HAP[2:1] */
+#define PMD_S2_XN		(_AT(pmdval_t, 2) << 53)  /* XN[1:0] */
 
 /*
  * Memory Attribute override for Stage-2 (MemAttr[3:0])
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html