diff options
author | Laszlo Ersek <lersek@redhat.com> | 2015-05-04 09:25:06 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-05-11 07:07:30 -0400 |
commit | 4529fdd323d9614d548811d4d12dc7be02b6d80f (patch) | |
tree | 317a73e9a71abae9d2f3dc2b07678755fb07aaa3 /arch/arm64 | |
parent | 02f88a7f2ae921317c91f629d61c39e107b9af23 (diff) | |
download | lwn-4529fdd323d9614d548811d4d12dc7be02b6d80f.tar.gz lwn-4529fdd323d9614d548811d4d12dc7be02b6d80f.zip |
arm, arm64: KVM: allow forced dcache flush on page faults
commit 840f4bfbe03f1ce94ade8fdf84e8cd925ef15a48 upstream.
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>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/kvm_mmu.h | 5 |
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) } 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); if (!icache_is_aliasing()) { /* PIPT */ |