#include "disas/disas.h"
-
-#include "slirp/libslirp.h"
-
#include "trace-root.h"
#include "trace/control.h"
#include "qemu/queue.h"
QEMUClockType rtc_clock;
int vga_interface_type = VGA_NONE;
static DisplayOptions dpy;
-int no_frame;
static int num_serial_hds;
static Chardev **serial_hds;
Chardev *parallel_hds[MAX_PARALLEL_PORTS];
while (*opts) {
const char *nextopt;
- if (strstart(opts, ",frame=", &nextopt)) {
- g_printerr("The frame= sdl option is deprecated, and will be\n"
- "removed in a future release.\n");
- opts = nextopt;
- if (strstart(opts, "on", &nextopt)) {
- no_frame = 0;
- } else if (strstart(opts, "off", &nextopt)) {
- no_frame = 1;
- } else {
- goto invalid_sdl_args;
- }
- } else if (strstart(opts, ",alt_grab=", &nextopt)) {
+ if (strstart(opts, ",alt_grab=", &nextopt)) {
opts = nextopt;
if (strstart(opts, "on", &nextopt)) {
alt_grab = 1;
{
Error *local_err = NULL;
- if (!qemu_chr_new_from_opts(opts, &local_err)) {
+ if (!qemu_chr_new_from_opts(opts, NULL, &local_err)) {
if (local_err) {
error_propagate(errp, local_err);
return -1;
snprintf(label, sizeof(label), "serial%d", index);
serial_hds = g_renew(Chardev *, serial_hds, index + 1);
- serial_hds[index] = qemu_chr_new_mux_mon(label, devname);
+ serial_hds[index] = qemu_chr_new_mux_mon(label, devname, NULL);
if (!serial_hds[index]) {
error_report("could not connect serial device"
" to character backend '%s'", devname);
exit(1);
}
snprintf(label, sizeof(label), "parallel%d", index);
- parallel_hds[index] = qemu_chr_new_mux_mon(label, devname);
+ parallel_hds[index] = qemu_chr_new_mux_mon(label, devname, NULL);
if (!parallel_hds[index]) {
error_report("could not connect parallel device"
" to character backend '%s'", devname);
{
QemuOpts *opts;
- if (!qemu_chr_new_mux_mon("debugcon", devname)) {
+ if (!qemu_chr_new_mux_mon("debugcon", devname, NULL)) {
error_report("invalid character backend '%s'", devname);
exit(1);
}
module_call_init(MODULE_INIT_OPTS);
runstate_init();
+ precopy_infrastructure_init();
postcopy_infrastructure_init();
monitor_init_globals();
add_device_config(DEV_BT, optarg);
break;
case QEMU_OPTION_audio_help:
- AUD_help ();
+ audio_legacy_help();
exit (0);
break;
+ case QEMU_OPTION_audiodev:
+ audio_parse_option(optarg);
+ break;
case QEMU_OPTION_soundhw:
select_soundhw (optarg);
break;
dpy.has_full_screen = true;
dpy.full_screen = true;
break;
- case QEMU_OPTION_no_frame:
- g_printerr("The -no-frame switch is deprecated, and will be\n"
- "removed in a future release.\n");
- no_frame = 1;
- break;
case QEMU_OPTION_alt_grab:
alt_grab = 1;
break;
case QEMU_OPTION_old_param:
old_param = 1;
break;
- case QEMU_OPTION_clock:
- /* Clock options no longer exist. Keep this option for
- * backward compatibility.
- */
- warn_report("This option is ignored and will be removed soon");
- break;
case QEMU_OPTION_rtc:
opts = qemu_opts_parse_noisily(qemu_find_opts("rtc"), optarg,
false);
dpy.type = DISPLAY_TYPE_NONE;
}
- if ((no_frame || alt_grab || ctrl_grab) && dpy.type != DISPLAY_TYPE_SDL) {
- error_report("-no-frame, -alt-grab and -ctrl-grab are only valid "
+ if ((alt_grab || ctrl_grab) && dpy.type != DISPLAY_TYPE_SDL) {
+ error_report("-alt-grab and -ctrl-grab are only valid "
"for SDL, ignoring option");
}
if (dpy.has_window_close &&
machine_opts = qemu_get_machine_opts();
qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
&error_fatal);
+ current_machine->ram_size = ram_size;
+ current_machine->maxram_size = maxram_size;
+ current_machine->ram_slots = ram_slots;
configure_accelerator(current_machine, argv[0]);
replay_checkpoint(CHECKPOINT_INIT);
qdev_machine_init();
- current_machine->ram_size = ram_size;
- current_machine->maxram_size = maxram_size;
- current_machine->ram_slots = ram_slots;
current_machine->boot_order = boot_order;
/* parse features once if machine provides default cpu_type */
/* do monitor/qmp handling at preconfig state if requested */
main_loop();
+ audio_init_audiodevs();
+
/* from here on runstate is RUN_STATE_PRELAUNCH */
machine_run_board_init(current_machine);
gdbserver_cleanup();
+ /*
+ * cleaning up the migration object cancels any existing migration
+ * try to do this early so that it also stops using devices.
+ */
+ migration_shutdown();
+
/* No more vcpu or device emulation activity beyond this point */
vm_shutdown();
monitor_cleanup();
qemu_chr_cleanup();
user_creatable_cleanup();
- migration_object_finalize();
/* TODO: unref root container, check all devices are ok */
return 0;