aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/kvm/emulate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 52bec0fe2fbb..645c8a1982a7 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -1636,6 +1636,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
1636 if (index < 0) { 1636 if (index < 0) {
1637 vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK); 1637 vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK);
1638 vcpu->arch.host_cp0_badvaddr = va; 1638 vcpu->arch.host_cp0_badvaddr = va;
1639 vcpu->arch.pc = curr_pc;
1639 er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run, 1640 er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run,
1640 vcpu); 1641 vcpu);
1641 preempt_enable(); 1642 preempt_enable();
@@ -1647,6 +1648,8 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
1647 * invalid exception to the guest 1648 * invalid exception to the guest
1648 */ 1649 */
1649 if (!TLB_IS_VALID(*tlb, va)) { 1650 if (!TLB_IS_VALID(*tlb, va)) {
1651 vcpu->arch.host_cp0_badvaddr = va;
1652 vcpu->arch.pc = curr_pc;
1650 er = kvm_mips_emulate_tlbinv_ld(cause, NULL, 1653 er = kvm_mips_emulate_tlbinv_ld(cause, NULL,
1651 run, vcpu); 1654 run, vcpu);
1652 preempt_enable(); 1655 preempt_enable();