fprintf(logfile, "outb: %04x %02x\n", addr, val);
#endif
ioport_write_table[0][addr](ioport_opaque[addr], addr, val);
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
+#endif
}
void cpu_outw(CPUState *env, int addr, int val)
fprintf(logfile, "outw: %04x %04x\n", addr, val);
#endif
ioport_write_table[1][addr](ioport_opaque[addr], addr, val);
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
+#endif
}
void cpu_outl(CPUState *env, int addr, int val)
fprintf(logfile, "outl: %04x %08x\n", addr, val);
#endif
ioport_write_table[2][addr](ioport_opaque[addr], addr, val);
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
+#endif
}
int cpu_inb(CPUState *env, int addr)
#ifdef DEBUG_IOPORT
if (loglevel & CPU_LOG_IOPORT)
fprintf(logfile, "inb : %04x %02x\n", addr, val);
+#endif
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
#ifdef DEBUG_IOPORT
if (loglevel & CPU_LOG_IOPORT)
fprintf(logfile, "inw : %04x %04x\n", addr, val);
+#endif
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
#ifdef DEBUG_IOPORT
if (loglevel & CPU_LOG_IOPORT)
fprintf(logfile, "inl : %04x %08x\n", addr, val);
+#endif
+#ifdef USE_KQEMU
+ if (env)
+ env->last_io_time = cpu_get_time_fast();
#endif
return val;
}
int main_loop(void)
{
int ret, timeout;
+#ifdef CONFIG_PROFILER
+ int64_t ti;
+#endif
CPUState *env;
cur_cpu = first_cpu;
env = env->next_cpu;
if (!env)
env = first_cpu;
+#ifdef CONFIG_PROFILER
+ ti = profile_getclock();
+#endif
ret = cpu_exec(env);
+#ifdef CONFIG_PROFILER
+ qemu_time += profile_getclock() - ti;
+#endif
if (ret != EXCP_HALTED)
break;
/* all CPUs are halted ? */
} else {
timeout = 10;
}
+#ifdef CONFIG_PROFILER
+ ti = profile_getclock();
+#endif
main_loop_wait(timeout);
+#ifdef CONFIG_PROFILER
+ dev_time += profile_getclock() - ti;
+#endif
}
cpu_disable_ticks();
return ret;
QEMU_OPTION_full_screen,
QEMU_OPTION_pidfile,
QEMU_OPTION_no_kqemu,
+ QEMU_OPTION_kernel_kqemu,
QEMU_OPTION_win2k_hack,
QEMU_OPTION_usb,
QEMU_OPTION_usbdevice,
{ "no-code-copy", 0, QEMU_OPTION_no_code_copy },
#ifdef USE_KQEMU
{ "no-kqemu", 0, QEMU_OPTION_no_kqemu },
+ { "kernel-kqemu", 0, QEMU_OPTION_kernel_kqemu },
#endif
#if defined(TARGET_PPC) || defined(TARGET_SPARC)
{ "g", 1, QEMU_OPTION_g },
case QEMU_OPTION_no_kqemu:
kqemu_allowed = 0;
break;
+ case QEMU_OPTION_kernel_kqemu:
+ kqemu_allowed = 2;
+ break;
#endif
case QEMU_OPTION_usb:
usb_enabled = 1;