aboutsummaryrefslogtreecommitdiff
path: root/qemu-config.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2010-09-21 20:05:31 +0100
committerAlexander Graf <agraf@suse.de>2011-05-08 10:09:59 +0200
commit303d4e865b74402b49f52e975c396c952f063e58 (patch)
tree5c707ba23fd12751f3dc48aae9315aa69230c30b /qemu-config.c
parent85097db6956bc86e2377b63a8309cb8b24d54139 (diff)
downloadqemu-303d4e865b74402b49f52e975c396c952f063e58.zip
qemu-303d4e865b74402b49f52e975c396c952f063e58.tar.gz
qemu-303d4e865b74402b49f52e975c396c952f063e58.tar.bz2
Introduce -machine command option.
This option gives the ability to switch one "accelerator" like kvm, xen or the default one tcg. We can specify more than one accelerator by separate them by a colon. QEMU will try each one and use the first whose works. So, ./qemu -machine accel=xen:kvm:tcg which would try Xen support first, then KVM and finally TCG if none of the other works. By default, QEMU will use TCG. But we can specify another default in the global configuration file. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/qemu-config.c b/qemu-config.c
index 14d3419..5d7ffa2 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -450,6 +450,19 @@ QemuOptsList qemu_option_rom_opts = {
},
};
+static QemuOptsList qemu_machine_opts = {
+ .name = "machine",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_machine_opts.head),
+ .desc = {
+ {
+ .name = "accel",
+ .type = QEMU_OPT_STRING,
+ .help = "accelerator list",
+ },
+ { /* End of list */ }
+ },
+};
+
static QemuOptsList *vm_config_groups[32] = {
&qemu_drive_opts,
&qemu_chardev_opts,
@@ -464,6 +477,7 @@ static QemuOptsList *vm_config_groups[32] = {
&qemu_trace_opts,
#endif
&qemu_option_rom_opts,
+ &qemu_machine_opts,
NULL,
};