arm/arm64: KVM: Support KVM_CAP_READONLY_MEM
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 19 Aug 2014 10:18:04 +0000 (12:18 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:11 +0000 (17:19 +0200)
commit7e7ef8405025cd7af730fce40ace2a9c77ee9970
tree066f77805a8e173ffd356ef701fcefb9613b9dc3
parent7ec68cffdc4807a95ae1db300bf857084f0c94da
arm/arm64: KVM: Support KVM_CAP_READONLY_MEM

When userspace loads code and data in a read-only memory regions, KVM
needs to be able to handle this on arm and arm64.  Specifically this is
used when running code directly from a read-only flash device; the
common scenario is a UEFI blob loaded with the -bios option in QEMU.

Note that the MMIO exit on writes to a read-only memory is ABI and can
be used to emulate block-erase style flash devices.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 98047888bb9fd57734028c44ec17413ddd623958)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/include/uapi/asm/kvm.h
arch/arm/kvm/arm.c
arch/arm/kvm/mmu.c
arch/arm64/include/uapi/asm/kvm.h