MIPS: KVM: Dump guest tlbs if kvm_get_inst() fails
authorJames Hogan <james.hogan@imgtec.com>
Tue, 14 Jun 2016 08:40:16 +0000 (09:40 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2016 09:16:25 +0000 (11:16 +0200)
If kvm_get_inst() fails to find a guest TLB mapping for the guest PC
then dump the guest TLB entries. The contents of the guest TLB is likely
to be more interesting than the host TLB entries.

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: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/kvm/mmu.c

index 208f70409ccb44009297046dfe0af1c9318ac977..2f494ec5c939c0332487c6ea830908ffa797e846 100644 (file)
@@ -346,6 +346,7 @@ u32 kvm_get_inst(u32 *opc, struct kvm_vcpu *vcpu)
                                kvm_err("%s: get_user_failed for %p, vcpu: %p, ASID: %#lx\n",
                                        __func__, opc, vcpu, read_c0_entryhi());
                                kvm_mips_dump_host_tlbs();
+                               kvm_mips_dump_guest_tlbs(vcpu);
                                local_irq_restore(flags);
                                return KVM_INVALID_INST;
                        }
This page took 0.027204 seconds and 5 git commands to generate.