arm: KVM: Add optimized PIPT icache flushing
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 23 Oct 2017 16:11:17 +0000 (17:11 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Mon, 8 Jan 2018 14:20:44 +0000 (15:20 +0100)
commit91c703e0382a1212d249adf34af4943a5da90d54
tree5d5437a832c0ad19fed6306200a64bcf393b6eaa
parent4fee94736603cd6fd83c1ea1ee0388d1d2dbe11b
arm: KVM: Add optimized PIPT icache flushing

Calling __cpuc_coherent_user_range to invalidate the icache on
a PIPT icache machine has some pointless overhead, as it starts
by cleaning the dcache to the PoU, while we're guaranteed to
have already cleaned it to the PoC.

As KVM is the only user of such a feature, let's implement some
ad-hoc cache flushing in kvm_mmu.h. Should it become useful to
other subsystems, it can be moved to a more global location.

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