linux/arch/mips/kvm
James Hogan ba913e4f72 MIPS: KVM: Check for pfn noslot case
When mapping a page into the guest we error check using is_error_pfn(),
however this doesn't detect a value of KVM_PFN_NOSLOT, indicating an
error HVA for the page. This can only happen on MIPS right now due to
unusual memslot management (e.g. being moved / removed / resized), or
with an Enhanced Virtual Memory (EVA) configuration where the default
KVM_HVA_ERR_* and kvm_is_error_hva() definitions are unsuitable (fixed
in a later patch). This case will be treated as a pfn of zero, mapping
the first page of physical memory into the guest.

It would appear the MIPS KVM port wasn't updated prior to being merged
(in v3.10) to take commit 81c52c56e2 ("KVM: do not treat noslot pfn as
a error pfn") into account (merged v3.8), which converted a bunch of
is_error_pfn() calls to is_error_noslot_pfn(). Switch to using
is_error_noslot_pfn() instead to catch this case properly.

Fixes: 858dd5d457 ("KVM/MIPS32: MMU/TLB operations for the Guest.")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Cc: <stable@vger.kernel.org> # 3.10.y-
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-08-19 17:22:26 +02:00
..
00README.txt
Kconfig MIPS; KVM: Convert exception entry to uasm 2016-07-05 16:08:46 +02:00
Makefile MIPS; KVM: Convert exception entry to uasm 2016-07-05 16:08:46 +02:00
callback.c
commpage.c MIPS: KVM: Move commpage so 0x0 is unmapped 2016-06-15 23:58:36 +02:00
commpage.h
dyntrans.c MIPS: KVM: Fix ptr->int cast via KVM_GUEST_KSEGX() 2016-08-01 18:42:26 +02:00
emulate.c MIPS: KVM: Propagate kseg0/mapped tlb fault errors 2016-08-12 12:01:30 +02:00
entry.c MIPS: KVM: Use 64-bit CP0_EBase when appropriate 2016-08-01 18:42:24 +02:00
fpu.S MIPS: KVM: Fix fpu.S misassembly with r6 2016-07-05 16:09:11 +02:00
interrupt.c MIPS: KVM: Convert code to kernel sized types 2016-06-14 11:02:41 +02:00
interrupt.h MIPS; KVM: Convert exception entry to uasm 2016-07-05 16:08:46 +02:00
mips.c MIPS: KVM: Fail if ebase doesn't fit in CP0_EBase 2016-08-01 18:42:24 +02:00
mmu.c MIPS: KVM: Check for pfn noslot case 2016-08-19 17:22:26 +02:00
msa.S
stats.c MIPS: KVM: Clean up kvm_exit trace event 2016-06-14 11:16:23 +02:00
tlb.c MIPS: KVM: Reset CP0_PageMask during host TLB flush 2016-08-01 18:42:27 +02:00
trace.h MIPS: KVM: Combine entry trace events into class 2016-06-23 19:17:30 +02:00
trap_emul.c MIPS: KVM: Emulate generic QEMU machine on r6 T&E 2016-07-05 16:09:20 +02:00