]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: KVM: force cache clean on page fault when caches are off
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 14 Jan 2014 19:13:10 +0000 (19:13 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 3 Mar 2014 01:15:22 +0000 (01:15 +0000)
commit6af2f2da96ae194f44da9ad62f1983760216e0cc
tree535b618f36564c3a87e7146efa65523917fff28f
parentf18a9f938e77c5d07df6bfdac5a6c38b7e4e4b20
ARM: KVM: force cache clean on page fault when caches are off

In order for a guest with caches disabled to observe data written
contained in a given page, we need to make sure that page is
committed to memory, and not just hanging in the cache (as guest
accesses are completely bypassing the cache until it decides to
enable it).

For this purpose, hook into the coherent_cache_guest_page
function and flush the region if the guest SCTLR
register doesn't show the MMU and caches as being enabled.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/kvm_mmu.h