aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-08 22:43:39 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-02-08 22:43:39 +0000
commitf32fc64851c28e2dd3976d08f93006a3eff68a3d (patch)
treecede51124798a14285457a79aa28f12e72fad64f /cpu-exec.c
parentf1c85677fc83b82e737223bfbff11241caa050b4 (diff)
optional support for kernel code virtualization
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1753 c046a42c-6fe2-441c-8c8c-71466251a162
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 1ec49c2d6a..3bf4b370a4 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();