arm, arm64: KVM: handle potential incoherency of readonly memslots
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 4 May 2015 01:25:07 +0000 (09:25 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 May 2015 11:07:30 +0000 (07:07 -0400)
commitcd7b8af485eb30fe38322564d2be2570a61d4d2a
treeb1eebae71fd8dfdc64174c8c96deec5e4ba6f840
parent4529fdd323d9614d548811d4d12dc7be02b6d80f
arm, arm64: KVM: handle potential incoherency of readonly memslots

commit 849260c72c6b8bd53850cb00b80027db3a273c2c upstream.

Readonly memslots are often used to implement emulation of ROMs and
NOR flashes, in which case the guest may legally map these regions as
uncached.
To deal with the incoherency associated with uncached guest mappings,
treat all readonly memslots as incoherent, and ensure that pages that
belong to regions tagged as such are flushed to DRAM before being passed
to the guest.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/arm/kvm/mmu.c