diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-11-17 09:58:52 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2014-11-25 08:57:27 -0500 |
commit | 840f4bfbe03f1ce94ade8fdf84e8cd925ef15a48 (patch) | |
tree | d9d0e1af88829649a866a5605b522053a13e2dc4 /arch/arm/include | |
parent | 1050dcda3052912984b26fb6d2695a3f41792000 (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/arm/include')
-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) | |||
161 | } | 161 | } |
162 | 162 | ||
163 | static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, | 163 | static inline void coherent_cache_guest_page(struct kvm_vcpu *vcpu, hva_t hva, |
164 | unsigned long size) | 164 | unsigned long size, |
165 | bool ipa_uncached) | ||
165 | { | 166 | { |
166 | if (!vcpu_has_cache_enabled(vcpu)) | 167 | if (!vcpu_has_cache_enabled(vcpu) || ipa_uncached) |
167 | kvm_flush_dcache_to_poc((void *)hva, size); | 168 | kvm_flush_dcache_to_poc((void *)hva, size); |
168 | 169 | ||
169 | /* | 170 | /* |