|
@@ -1636,6 +1636,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
|
|
|
if (index < 0) {
|
|
|
vcpu->arch.host_cp0_entryhi = (va & VPN2_MASK);
|
|
|
vcpu->arch.host_cp0_badvaddr = va;
|
|
|
+ vcpu->arch.pc = curr_pc;
|
|
|
er = kvm_mips_emulate_tlbmiss_ld(cause, NULL, run,
|
|
|
vcpu);
|
|
|
preempt_enable();
|
|
@@ -1647,6 +1648,8 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
|
|
|
* invalid exception to the guest
|
|
|
*/
|
|
|
if (!TLB_IS_VALID(*tlb, va)) {
|
|
|
+ vcpu->arch.host_cp0_badvaddr = va;
|
|
|
+ vcpu->arch.pc = curr_pc;
|
|
|
er = kvm_mips_emulate_tlbinv_ld(cause, NULL,
|
|
|
run, vcpu);
|
|
|
preempt_enable();
|