diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2010-11-22 15:44:15 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-05-08 10:09:59 +0200 |
commit | 67b724e69e8d65a4ac4355e3673969b5a3f26afd (patch) | |
tree | 2a5946f84818a28a36f736ce2d9178f6f1d43e71 /vl.c | |
parent | 303d4e865b74402b49f52e975c396c952f063e58 (diff) |
machine, Add default_machine_opts to QEMUMachine.
With this new field, we can specified which accelerator use to run the
machine, if the accelerator is not already specified by either a
configuration file or the command line options.
Currently, the only use will be made in the xenfv machine.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -2914,6 +2914,28 @@ int main(int argc, char **argv, char **envp) exit(1); } + /* + * Get the default machine options from the machine if it is not already + * specified either by the configuration file or by the command line. + */ + if (machine->default_machine_opts) { + QemuOptsList *list = qemu_find_opts("machine"); + const char *p = NULL; + + if (!QTAILQ_EMPTY(&list->head)) { + p = qemu_opt_get(QTAILQ_FIRST(&list->head), "accel"); + } + if (p == NULL) { + opts = qemu_opts_parse(qemu_find_opts("machine"), + machine->default_machine_opts, 0); + if (!opts) { + fprintf(stderr, "parse error for machine %s: %s\n", + machine->name, machine->default_machine_opts); + exit(1); + } + } + } + qemu_opts_foreach(qemu_find_opts("device"), default_driver_check, NULL, 0); qemu_opts_foreach(qemu_find_opts("global"), default_driver_check, NULL, 0); |