Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>

authored by

Jan Kiszka and committed by
Paolo Bonzini
a050dfb2 c517d838

+1 -1
+1 -1
arch/arm/include/asm/kvm_mmu.h
··· 207 207 208 208 bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached; 209 209 210 - VM_BUG_ON(size & PAGE_MASK); 210 + VM_BUG_ON(size & ~PAGE_MASK); 211 211 212 212 if (!need_flush && !icache_is_pipt()) 213 213 goto vipt_cache;