aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 1ec49c2..3bf4b37 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -627,6 +627,9 @@ int cpu_exec(CPUState *env1)
jump. */
{
if (T0 != 0 &&
+#if USE_KQEMU
+ (env->kqemu_enabled != 2) &&
+#endif
tb->page_addr[1] == -1
#if defined(TARGET_I386) && defined(USE_CODE_COPY)
&& (tb->cflags & CF_CODE_COPY) ==
@@ -756,6 +759,13 @@ int cpu_exec(CPUState *env1)
T0 = 0;
}
#endif
+#if defined(USE_KQEMU)
+#define MIN_CYCLE_BEFORE_SWITCH (100 * 1000)
+ if (kqemu_is_ok(env) &&
+ (cpu_get_time_fast() - env->last_io_time) >= MIN_CYCLE_BEFORE_SWITCH) {
+ cpu_loop_exit();
+ }
+#endif
}
} else {
env_to_regs();