Message ID | 7f1545b32a29d1ba686a38a741bf34a2a92297a2.1471018462.git-series.james.hogan@imgtec.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/mips/kvm/tlb.c b/arch/mips/kvm/tlb.c index 6c17ee73b8a3..b872cb0b0f5d 100644 --- a/arch/mips/kvm/tlb.c +++ b/arch/mips/kvm/tlb.c @@ -284,7 +284,7 @@ int kvm_mips_handle_kseg0_tlb_fault(unsigned long badvaddr, } gfn = (KVM_GUEST_CPHYSADDR(badvaddr) >> PAGE_SHIFT); - if (gfn >= kvm->arch.guest_pmap_npages) { + if ((gfn | 1) >= kvm->arch.guest_pmap_npages) { kvm_err("%s: Invalid gfn: %#llx, BadVaddr: %#lx\n", __func__, gfn, badvaddr); kvm_mips_dump_host_tlbs();