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)
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;
}
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;
}
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 slirp_can_output(void)
{
- return qemu_can_send_packet(slirp_vc);
+ return !slirp_vc || qemu_can_send_packet(slirp_vc);
}
void slirp_output(const uint8_t *pkt, int pkt_len)
printf("slirp output:\n");
hex_dump(stdout, pkt, pkt_len);
#endif
+ if (!slirp_vc)
+ return;
qemu_send_packet(slirp_vc, pkt, pkt_len);
}
return -1;
}
}
+ if (get_param_value(buf, sizeof(buf), "model", p)) {
+ nd->model = strdup(buf);
+ }
nd->vlan = vlan;
nb_nics++;
ret = 0;
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;
#endif
"\n"
"Network options:\n"
- "-net nic[,vlan=n][,macaddr=addr]\n"
+ "-net nic[,vlan=n][,macaddr=addr][,model=type]\n"
" create a new Network Interface Card and connect it to VLAN 'n'\n"
#ifdef CONFIG_SLIRP
"-net user[,vlan=n]\n"
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 },
qemu_register_machine(&sun4m_machine);
#endif
#elif defined(TARGET_ARM)
- qemu_register_machine(&integratorcp_machine);
+ qemu_register_machine(&integratorcp926_machine);
+ qemu_register_machine(&integratorcp1026_machine);
#else
#error unsupported CPU
#endif
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;