Skip to content

KVM: arm64: Running the EL2 nVHE code with WXN

Marc Zyngier kvm kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restartarch/arm64/kernel/cpu-reset.S+1 -40 replies
2/4KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM teardownarch/arm64/kvm/hyp/nvhe/hyp-init.S+1 -30 replies
3/4KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGSarch/arm64/include/asm/sysreg.h arch/arm64/kvm/hyp/nvhe/hyp-init.S+2 -27 replies
4/4KVM: arm64: Force SCTLR_EL2.WXN when running nVHEarch/arm64/include/asm/sysreg.h+2 -10 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchWill DeaconMark Rutland
1/4
2/4
3/4A-b A-b A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN

Since we use distinct permissions when mapping things at EL2 depending on whether they are text or data, we are already using a W^X setup with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all times. It just cleans up a couple of code paths so that SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
teardown
KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)
Signature · 6 lines
2.29.2

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm