aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2014-11-17 09:58:52 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2014-11-25 08:57:27 -0500
commit840f4bfbe03f1ce94ade8fdf84e8cd925ef15a48 (patch)
treed9d0e1af88829649a866a5605b522053a13e2dc4 /arch/arm64
parent1050dcda3052912984b26fb6d2695a3f41792000 (diff)
arm, arm64: KVM: allow forced dcache flush on page faults
To allow handling of incoherent memslots in a subsequent patch, this patch adds a paramater 'ipa_uncached' to cache_coherent_guest_page() so that we can instruct it to flush the page's contents to DRAM even if the guest has caching globally enabled. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/kvm_mmu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
index 0caf7a59f6a1..123b521a9908 100644
--- a/arch/arm64/include/asm/kvm_mmu.h
+++ b/arch/arm64/include/asm/kvm_mmu.h
@@ -243,9 +243,10 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
243} 243}
244 244
245static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, 245static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva,
246 unsigned long size) 246 unsigned long size,
247 bool ipa_uncached)
247{ 248{
248 if (!vcpu_has_cache_enabled(vcpu)) 249 if (!vcpu_has_cache_enabled(vcpu) || ipa_uncached)
249 kvm_flush_dcache_to_poc((void *)hva, size); 250 kvm_flush_dcache_to_poc((void *)hva, size);
250 251
251 if (!icache_is_aliasing()) { /* PIPT */ 252 if (!icache_is_aliasing()) { /* PIPT */