diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2015-05-04 09:25:23 +0800 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-05-11 07:07:36 -0400 |
commit | f10b9c8a2ee0382e566f488f5d3d2a481369c593 (patch) | |
tree | 3cac46a1f20ff01b9334780f05c6814b107ff542 /arch | |
parent | a49ecf872ec8870c32f5d9d412edae4033e87f12 (diff) |
ARM: KVM: Fix size check in __coherent_cache_guest_page
commit a050dfb21cc22ac0c666d52531040c1bc48184cc upstream.
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>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/kvm_mmu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h index f95c1241b40f..d409c9c909e8 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h @@ -186,7 +186,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; - VM_BUG_ON(size & PAGE_MASK); + VM_BUG_ON(size & ~PAGE_MASK); if (!need_flush && !icache_is_pipt()) goto vipt_cache; |