Skip to content
Snippets Groups Projects
Commit a050dfb2 authored by Jan Kiszka's avatar Jan Kiszka Committed by Paolo Bonzini
Browse files

ARM: KVM: Fix size check in __coherent_cache_guest_page


The check is supposed to catch page-unaligned sizes, not the inverse.

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent c517d838
No related branches found
No related tags found
No related merge requests found
...@@ -207,7 +207,7 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn, ...@@ -207,7 +207,7 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn,
bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached; bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached;
VM_BUG_ON(size & PAGE_MASK); VM_BUG_ON(size & ~PAGE_MASK);
if (!need_flush && !icache_is_pipt()) if (!need_flush && !icache_is_pipt())
goto vipt_cache; goto vipt_cache;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment