arm/arm64: KVM: Map the HYP text as read-only
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 13 Jun 2016 14:00:48 +0000 (15:00 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Jun 2016 12:01:34 +0000 (14:01 +0200)
commit5900270550cbb8a272bfc248b69531cd44dcf0d5
tree9683a4f7757d6e45d58302b4d950ac3df703dbad
parent74a6b8885f7026e33f8a4776b7ac17c76b8e5a52
arm/arm64: KVM: Map the HYP text as read-only

There should be no reason for mapping the HYP text read/write.

As such, let's have a new set of flags (PAGE_HYP_EXEC) that allows
execution, but makes the page as read-only, and update the two call
sites that deal with mapping code.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/asm/pgtable.h
arch/arm/kvm/arm.c
arch/arm/kvm/mmu.c
arch/arm64/include/asm/pgtable-prot.h