diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-11-17 17:58:52 +0300 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2014-11-25 16:57:27 +0300 |
commit | 840f4bfbe03f1ce94ade8fdf84e8cd925ef15a48 (patch) | |
tree | d9d0e1af88829649a866a5605b522053a13e2dc4 /arch/arm/include/asm/kvm_mmu.h | |
parent | 1050dcda3052912984b26fb6d2695a3f41792000 (diff) | |
download | linux-840f4bfbe03f1ce94ade8fdf84e8cd925ef15a48.tar.xz |
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/arm/include/asm/kvm_mmu.h')
-rw-r--r-- | arch/arm/include/asm/kvm_mmu.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h index acb0d5712716..f867060035ec 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h @@ -161,9 +161,10 @@ static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu) } static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, - unsigned long size) + unsigned long size, + bool ipa_uncached) { - if (!vcpu_has_cache_enabled(vcpu)) + if (!vcpu_has_cache_enabled(vcpu) || ipa_uncached) kvm_flush_dcache_to_poc((void *)hva, size); /* |