optional support for kernel code virtualization

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1753 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-02-08 22:43:39 +00:00
parent f1c85677fc
commit f32fc64851
4 changed files with 216 additions and 37 deletions

View file

@ -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) ==
@ -755,6 +758,13 @@ int cpu_exec(CPUState *env1)
/* do not allow linking to another block */
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 {