aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kvm/kvm_mips_emul.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-05-29 05:16:41 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-05-30 07:05:20 -0400
commit3d654833713ddb0464cbaee14fe75ef1e4e2ded0 (patch)
tree4015664df9a1044b08f7443523d24d9b9a597f0e /arch/mips/kvm/kvm_mips_emul.c
parent2dca3725cbe0bc5aeb195e7c098bcebae5d40f83 (diff)
MIPS: KVM: Fix kvm_debug bit-rottage
Fix build errors when DEBUG is defined in arch/mips/kvm/. - The DEBUG code in kvm_mips_handle_tlbmod() was missing some variables. - The DEBUG code in kvm_mips_host_tlb_write() was conditional on an undefined "debug" variable. - The DEBUG code in kvm_mips_host_tlb_inv() accessed asid_map directly rather than using kvm_mips_get_user_asid(). Also fixed brace placement. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gleb Natapov <gleb@kernel.org> Cc: kvm@vger.kernel.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/kvm_mips_emul.c')
-rw-r--r--arch/mips/kvm/kvm_mips_emul.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
index 6d257384c9b4..c81ab791b8f2 100644
--- a/arch/mips/kvm/kvm_mips_emul.c
+++ b/arch/mips/kvm/kvm_mips_emul.c
@@ -1831,8 +1831,12 @@ kvm_mips_handle_tlbmod(unsigned long cause, uint32_t *opc,
1831 struct kvm_run *run, struct kvm_vcpu *vcpu) 1831 struct kvm_run *run, struct kvm_vcpu *vcpu)
1832{ 1832{
1833 enum emulation_result er = EMULATE_DONE; 1833 enum emulation_result er = EMULATE_DONE;
1834
1835#ifdef DEBUG 1834#ifdef DEBUG
1835 struct mips_coproc *cop0 = vcpu->arch.cop0;
1836 unsigned long entryhi = (vcpu->arch.host_cp0_badvaddr & VPN2_MASK) |
1837 (kvm_read_c0_guest_entryhi(cop0) & ASID_MASK);
1838 int index;
1839
1836 /* 1840 /*
1837 * If address not in the guest TLB, then we are in trouble 1841 * If address not in the guest TLB, then we are in trouble
1838 */ 1842 */