diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-02-08 22:43:39 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-02-08 22:43:39 +0000 |
commit | f32fc64851c28e2dd3976d08f93006a3eff68a3d (patch) | |
tree | cede51124798a14285457a79aa28f12e72fad64f /cpu-exec.c | |
parent | f1c85677fc83b82e737223bfbff11241caa050b4 (diff) | |
download | qemu-f32fc64851c28e2dd3976d08f93006a3eff68a3d.zip qemu-f32fc64851c28e2dd3976d08f93006a3eff68a3d.tar.gz qemu-f32fc64851c28e2dd3976d08f93006a3eff68a3d.tar.bz2 |
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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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(); |