KVM: arm64: Force SCTLR_EL2.WXN when running nVHE
authorMarc Zyngier <maz@kernel.org>
Wed, 10 Mar 2021 13:34:26 +0000 (13:34 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 18 Mar 2021 15:52:06 +0000 (15:52 +0000)
commitc8a4b35f5063c256451a3508e9f0b9e6b49debbb
tree550d2a5f4b55ac7b57572244d7f0906e19dfcfff
parentfe2c8d19189e23a951e45fdb73aade25b1665bce
KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

As the EL2 nVHE object is nicely split into sections and that
we already use differenciating permissions for data and code,
we can enable SCTLR_EL2.WXN so that we don't have to worry
about misconfiguration of the page tables.

Flip the WXN bit and get the ball running!

Acked-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/sysreg.h