diff options
Diffstat (limited to 'target-mips')
-rw-r--r-- | target-mips/op_helper.c | 11 | ||||
-rw-r--r-- | target-mips/translate.c | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 27651a4a00..df97b35f87 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -21,6 +21,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" +#include "sysemu/kvm.h" #ifndef CONFIG_USER_ONLY static inline void cpu_mips_tlb_flush (CPUMIPSState *env, int flush_global); @@ -2168,6 +2169,16 @@ void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr, MIPSCPU *cpu = MIPS_CPU(cs); CPUMIPSState *env = &cpu->env; + /* + * Raising an exception with KVM enabled will crash because it won't be from + * the main execution loop so the longjmp won't have a matching setjmp. + * Until we can trigger a bus error exception through KVM lets just ignore + * the access. + */ + if (kvm_enabled()) { + return; + } + if (is_exec) { helper_raise_exception(env, EXCP_IBE); } else { diff --git a/target-mips/translate.c b/target-mips/translate.c index d7b8c4dbc8..06db150325 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -30,6 +30,9 @@ #include "exec/helper-gen.h" #include "sysemu/kvm.h" +#include "trace-tcg.h" + + #define MIPS_DEBUG_DISAS 0 //#define MIPS_DEBUG_SIGN_EXTENSIONS @@ -15300,6 +15303,9 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx) gen_load_gpr(t1, rs); gen_helper_dinsv(cpu_gpr[rt], cpu_env, t1, t0); + + tcg_temp_free(t0); + tcg_temp_free(t1); break; } default: /* Invalid */ |