FROMGIT: 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>
(cherry picked from commit c8a4b35f50
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 178098380
Test: atest VirtualizationHostTestCases on an EL2-enabled device
Change-Id: I46464dc9ca6281d2cc2c4f23447c46240e7abced
This commit is contained in:
committed by
Quentin Perret
parent
8f25c7432f
commit
b0671cd753
@@ -637,7 +637,7 @@
|
|||||||
|
|
||||||
#define INIT_SCTLR_EL2_MMU_ON \
|
#define INIT_SCTLR_EL2_MMU_ON \
|
||||||
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | SCTLR_ELx_I | \
|
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | SCTLR_ELx_I | \
|
||||||
SCTLR_ELx_IESB | ENDIAN_SET_EL2 | SCTLR_EL2_RES1)
|
SCTLR_ELx_IESB | SCTLR_ELx_WXN | ENDIAN_SET_EL2 | SCTLR_EL2_RES1)
|
||||||
|
|
||||||
#define INIT_SCTLR_EL2_MMU_OFF \
|
#define INIT_SCTLR_EL2_MMU_OFF \
|
||||||
(SCTLR_EL2_RES1 | ENDIAN_SET_EL2)
|
(SCTLR_EL2_RES1 | ENDIAN_SET_EL2)
|
||||||
|
|||||||
Reference in New Issue
Block a user