arm64: KVM: Avoid marking pages as XN in Stage-2 if CTR_EL0.DIC is set
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 25 Apr 2018 16:58:20 +0000 (17:58 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 9 Jul 2018 10:37:42 +0000 (11:37 +0100)
commit2f6ea23f63cca99cd514c221f075c986b57c927e
tree23f3397f81f925209b318a6df577a58fa529ba47
parent09605e94c2cbb67c6472c07e1c06a7a0e7271f83
arm64: KVM: Avoid marking pages as XN in Stage-2 if CTR_EL0.DIC is set

On systems where CTR_EL0.DIC is set, we don't need to perform
icache invalidation to guarantee that we'll fetch the right
instruction stream.

This also means that taking a permission fault to invalidate the
icache is an unnecessary overhead.

On such systems, we can safely leave the page as being executable.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/pgtable-prot.h