|
@@ -150,18 +150,12 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu,
|
|
|
* and iterate over the range.
|
|
|
*/
|
|
|
|
|
|
- bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached;
|
|
|
-
|
|
|
VM_BUG_ON(size & ~PAGE_MASK);
|
|
|
|
|
|
- if (!need_flush && !icache_is_pipt())
|
|
|
- goto vipt_cache;
|
|
|
-
|
|
|
while (size) {
|
|
|
void *va = kmap_atomic_pfn(pfn);
|
|
|
|
|
|
- if (need_flush)
|
|
|
- kvm_flush_dcache_to_poc(va, PAGE_SIZE);
|
|
|
+ kvm_flush_dcache_to_poc(va, PAGE_SIZE);
|
|
|
|
|
|
if (icache_is_pipt())
|
|
|
__cpuc_coherent_user_range((unsigned long)va,
|
|
@@ -173,7 +167,6 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu,
|
|
|
kunmap_atomic(va);
|
|
|
}
|
|
|
|
|
|
-vipt_cache:
|
|
|
if (!icache_is_pipt() && !icache_is_vivt_asid_tagged()) {
|
|
|
/* any kind of VIPT cache */
|
|
|
__flush_icache_all();
|