diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2015-02-07 22:21:20 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-23 22:28:47 +0100 |
commit | a050dfb21cc22ac0c666d52531040c1bc48184cc (patch) | |
tree | dcecc74f8562461340b9fd4594f1f09edb8b2a35 /arch | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
download | linux-stable-a050dfb21cc22ac0c666d52531040c1bc48184cc.tar.gz linux-stable-a050dfb21cc22ac0c666d52531040c1bc48184cc.tar.bz2 linux-stable-a050dfb21cc22ac0c666d52531040c1bc48184cc.zip |
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>
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 37ca2a4c6f09..bf0fe99e8ca9 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h @@ -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; - VM_BUG_ON(size & PAGE_MASK); + VM_BUG_ON(size & ~PAGE_MASK); if (!need_flush && !icache_is_pipt()) goto vipt_cache; |