qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 28/32] vl: QAPIfy command line option definition


From: Markus Armbruster
Subject: [Qemu-devel] [RFC PATCH 28/32] vl: QAPIfy command line option definition
Date: Mon, 2 Oct 2017 17:25:48 +0200

Move options definition from qemu-options.hx to the QAPI schema.

Schema deficiencies:

* TODO rework doc strings into QAPIDoc format
* TODO generate (parts of) 'help' from 'data'?
* FIXME many 'str' option arguments (marked FIXME/TODO) need to be QAPIfied,
  anything that can't be QAPIfied needs to be replaced & deprecated
* FIXME conditionals (marked #if in qapi/options.json)
* TODO move the non-miscellaneous options next to their subsystem's
* schema definitions

qemu-doc breakage:

* FIXME need to include options part of
  docs/interop/qemu-qmp-qapi.texi into qemu-doc
* FIXME several references in qemu-doc

vl.c TODOs:

* Drop conditionals hackery once we have schema conditionals
* Read and write .json config files
* How can we port -set from QemuOpts to QAPI?

The next few commits QAPIfy a few easy 'str' option arguments, to
demonstrate how.  Many more remain, and some of them are going to be
harder.

QAPIfication switches from the QemuOpts parser to keyval_parse(),
which isn't 100% backward compatible.  We need to decide how far to
push reproducing QemuOpts parsing quirks.

QemuOpts also serves as configuration repository.  QAPIfication gets
rid of that.  Code relying on the configuration repository features
will need updates.

Signed-off-by: Markus Armbruster <address@hidden>
---
 .gitignore             |    2 -
 Makefile               |   18 +-
 include/qemu-common.h  |    2 +-
 os-posix.c             |   26 +-
 os-win32.c             |    3 +-
 qapi-schema.json       |    1 +
 qapi/options.json      | 4574 ++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-doc.texi          |    4 +-
 qemu-options-wrapper.h |   41 -
 qemu-options.h         |   36 -
 qemu-options.hx        | 4256 --------------------------------------------
 scripts/qapi.py        |   15 +-
 vl.c                   |  694 ++++----
 13 files changed, 4961 insertions(+), 4711 deletions(-)
 create mode 100644 qapi/options.json
 delete mode 100644 qemu-options-wrapper.h
 delete mode 100644 qemu-options.h
 delete mode 100644 qemu-options.hx

diff --git a/.gitignore b/.gitignore
index 84a57060ad..8a79affa46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,8 +39,6 @@
 /qemu-doc.txt
 /qemu-img
 /qemu-nbd
-/qemu-options.def
-/qemu-options.texi
 /qemu-img-cmds.texi
 /qemu-img-cmds.h
 /qemu-io
diff --git a/Makefile b/Makefile
index 5e858f7295..fcce2dd5f9 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ endif
 
 include $(SRC_PATH)/rules.mak
 
-GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
+GENERATED_FILES = qemu-version.h config-host.h
 GENERATED_FILES += builtin-qapi-types.h builtin-qapi-types.c
 GENERATED_FILES += builtin-qapi-visit.h builtin-qapi-visit.c
 GENERATED_FILES += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
@@ -314,8 +314,6 @@ qemu-version.h: FORCE
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
-qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
-       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > 
$@,"GEN","$@")
 
 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
 SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
@@ -422,6 +420,7 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json 
$(SRC_PATH)/qapi/common.json \
                $(SRC_PATH)/qapi/introspect.json \
                $(SRC_PATH)/qapi/migration.json \
                $(SRC_PATH)/qapi/net.json \
+               $(SRC_PATH)/qapi/options.json \
                $(SRC_PATH)/qapi/rocker.json \
                $(SRC_PATH)/qapi/run-state.json \
                $(SRC_PATH)/qapi/sockets.json \
@@ -529,7 +528,6 @@ module_block.h: $(SRC_PATH)/scripts/modules/module_block.py 
config-host.mak
 clean:
 # avoid old build problems by removing potentially incorrect old files
        rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h 
gen-op-arm.h
-       rm -f qemu-options.def
        rm -f *.msi
        find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name 
'*.[oda]' \) -type f -exec rm {} +
        rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* 
*.pod *~ */*~
@@ -544,7 +542,6 @@ clean:
        rm -rf qga/qapi-generated
        for d in $(ALL_SUBDIRS); do \
        if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
-       rm -f $$d/qemu-options.def; \
         done
        rm -f $(SUBDIR_DEVICES_MAK) config-all-devices.mak
 
@@ -556,7 +553,7 @@ qemu-%.tar.bz2:
        $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst 
qemu-%.tar.bz2,%,$@)"
 
 distclean: clean
-       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) 
qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
+       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) 
qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
        rm -f config-all-devices.mak config-all-disas.mak config.status
        rm -f po/*.mo tests/qemu-iotests/common.env
        rm -f roms/seabios/config.mak roms/vgabios/config.mak
@@ -715,7 +712,7 @@ ui/console-gl.o: $(SRC_PATH)/ui/console-gl.c \
 
 # documentation
 MAKEINFO=makeinfo
-MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D)
+MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D) -I $(SRC_PATH)
 MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES)
 TEXI2PODFLAGS=$(MAKEINFOINCLUDES) "-DVERSION=$(VERSION)"
 TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES)
@@ -737,9 +734,6 @@ docs/version.texi: $(SRC_PATH)/VERSION
 %.pdf: %.texi docs/version.texi
        $(call quiet-command,texi2pdf $(TEXI2PDFFLAGS) $< -o $@,"GEN","$@")
 
-qemu-options.texi: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
-       $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > 
$@,"GEN","$@")
-
 qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
        $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > 
$@,"GEN","$@")
 
@@ -757,7 +751,7 @@ docs/interop/qemu-qmp-qapi.texi: $(qapi-modules)
 docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json
        $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py $< > 
$@,"GEN","$@")
 
-qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi 
qemu-monitor-info.texi
+qemu.1: qemu-doc.texi docs/interop/qemu-qmp-ref.texi  qemu-monitor.texi 
qemu-monitor-info.texi
 qemu.1: qemu-option-trace.texi
 qemu-img.1: qemu-img.texi qemu-option-trace.texi qemu-img-cmds.texi
 fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
@@ -771,7 +765,7 @@ pdf: qemu-doc.pdf docs/interop/qemu-qmp-ref.pdf 
docs/interop/qemu-ga-ref.pdf
 txt: qemu-doc.txt docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt
 
 qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \
-       qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-option-trace.texi \
+       qemu-img.texi qemu-nbd.texi docs/interop/qemu-qmp-ref.texi  
qemu-option-trace.texi \
        qemu-monitor.texi qemu-img-cmds.texi qemu-ga.texi \
        qemu-monitor-info.texi docs/qemu-block-drivers.texi
 
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 0456c79df4..871f622d6a 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -139,7 +139,7 @@ char *qemu_find_file(int type, const char *name);
 /* OS specific functions */
 void os_setup_early_signal_handling(void);
 char *os_find_datadir(void);
-void os_parse_cmd_args(int index, const char *optarg);
+void os_parse_cmd_args(const QAPIOption *opt);
 
 #include "qemu/module.h"
 
diff --git a/os-posix.c b/os-posix.c
index b9c2343b1e..4c134c9dc5 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -32,7 +32,6 @@
 /* Needed early for CONFIG_BSD etc. */
 #include "sysemu/sysemu.h"
 #include "net/slirp.h"
-#include "qemu-options.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/cutils.h"
@@ -131,35 +130,38 @@ void os_set_proc_name(const char *s)
  * Parse OS specific command line options.
  * return 0 if option handled, -1 otherwise
  */
-void os_parse_cmd_args(int index, const char *optarg)
+void os_parse_cmd_args(const QAPIOption *opt)
 {
-    switch (index) {
+    switch (opt->type) {
 #ifdef CONFIG_SLIRP
-    case QEMU_OPTION_smb:
+    case QAPI_OPTION_KIND_SMB:
         error_report("The -smb option is deprecated. "
                      "Please use '-netdev user,smb=...' instead.");
-        if (net_slirp_smb(optarg) < 0)
+        if (net_slirp_smb(opt->u.smb.data) < 0) {
             exit(1);
+        }
         break;
 #endif
-    case QEMU_OPTION_runas:
-        user_pwd = getpwnam(optarg);
+    case QAPI_OPTION_KIND_RUNAS:
+        user_pwd = getpwnam(opt->u.runas.data);
         if (!user_pwd) {
-            fprintf(stderr, "User \"%s\" doesn't exist\n", optarg);
+            fprintf(stderr, "User \"%s\" doesn't exist\n", opt->u.runas.data);
             exit(1);
         }
         break;
-    case QEMU_OPTION_chroot:
-        chroot_dir = optarg;
+    case QAPI_OPTION_KIND_CHROOT:
+        chroot_dir = opt->u.chroot.data;
         break;
-    case QEMU_OPTION_daemonize:
+    case QAPI_OPTION_KIND_DAEMONIZE:
         daemonize = 1;
         break;
 #if defined(CONFIG_LINUX)
-    case QEMU_OPTION_enablefips:
+    case QAPI_OPTION_KIND_ENABLE_FIPS:
         fips_set_state(true);
         break;
 #endif
+    default:
+        ;
     }
 }
 
diff --git a/os-win32.c b/os-win32.c
index 586a7c7d49..7b01cf821f 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -26,7 +26,6 @@
 #include <windows.h>
 #include <mmsystem.h>
 #include "sysemu/sysemu.h"
-#include "qemu-options.h"
 
 /***********************************************************/
 /* Functions missing in mingw */
@@ -93,7 +92,7 @@ void os_set_line_buffering(void)
  * Parse OS specific command line options.
  * return 0 if option handled, -1 otherwise
  */
-void os_parse_cmd_args(int index, const char *optarg)
+void os_parse_cmd_args(const QEMUOption *opt)
 {
     return;
 }
diff --git a/qapi-schema.json b/qapi-schema.json
index a6ef550fd5..a2a096d172 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -96,6 +96,7 @@
 { 'include': 'qapi/transaction.json' }
 { 'include': 'qapi/trace.json' }
 { 'include': 'qapi/introspect.json' }
+{ 'include': 'qapi/options.json' }
 
 ##
 # = Miscellanea
diff --git a/qapi/options.json b/qapi/options.json
new file mode 100644
index 0000000000..5a8fdc04ad
--- /dev/null
+++ b/qapi/options.json
@@ -0,0 +1,4574 @@
+# -*- Mode: Python -*-
+#
+# Copyright (C) 2017 Red Hat, Inc.
+#
+# Authors:
+#  Markus Armbruster <address@hidden>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or later.
+# See the COPYING file in the top-level directory.
+
+#
+# TODO rework doc strings into QAPIDoc format
+# TODO generate (parts of) 'help' from 'data'?
+# FIXME many 'str' option arguments (marked FIXME) need to be QAPIfied
+#       anything that can't be QAPIfied needs to be replaced & deprecated
+# FIXME conditionals (marked #if)
+#
+
+##
+# = Miscellaneous command line options
+#
+# TODO move the non-miscellaneous options next to their subsystem's
+# schema definitions
+##
+
+##
+# == Standard options
+##
+
+##
+# @--help:
+# Display help and exit
+##
+{ 'option': '--help', 'short': 'h',
+  'help': '-h or -help     display this help and exit' }
+
+##
+# @--version:
+# Display version information and exit
+##
+{ 'option': '--version',
+  'help': '-version        display version information and exit' }
+
+##
+# @--machine:
+# !texinfo
+# -machine address@hidden,address@hidden,address@hidden
+# Select the emulated machine by @var{name}. Use @code{-machine help} to list
+# available machines.
+#
+# For architectures which aim to support live migration compatibility
+# across releases, each release will introduce a new versioned machine
+# type. For example, the 2.8.0 release introduced machine types
+# ``pc-i440fx-2.8'' and ``pc-q35-2.8'' for the x86_64/i686 architectures.
+#
+# To allow live migration of guests from QEMU version 2.8.0, to QEMU
+# version 2.9.0, the 2.9.0 version must support the ``pc-i440fx-2.8''
+# and ``pc-q35-2.8'' machines too. To allow users live migrating VMs
+# to skip multiple intermediate releases when upgrading, new releases
+# of QEMU will support machine types from many previous versions.
+#
+# Supported machine properties are:
+# @table @option
+# @item address@hidden:@var{accels2}[:...]]
+# This is used to enable an accelerator. Depending on the target architecture,
+# kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
+# more than one accelerator specified, the next one is used if the previous one
+# fails to initialize.
+# @item kernel_irqchip=on|off
+# Controls in-kernel irqchip support for the chosen accelerator when available.
+# @item gfx_passthru=on|off
+# Enables IGD GFX passthrough support for the chosen machine when available.
+# @item vmport=on|off|auto
+# Enables emulation of VMWare IO port, for vmmouse etc. auto says to select the
+# value based on accel. For accel=xen the default is off otherwise the default
+# is on.
+# @item kvm_shadow_mem=size
+# Defines the size of the KVM shadow MMU.
+# @item dump-guest-core=on|off
+# Include guest memory in a core dump. The default is on.
+# @item mem-merge=on|off
+# Enables or disables memory merge support. This feature, when supported by
+# the host, de-duplicates identical memory pages among VMs instances
+# (enabled by default).
+# @item aes-key-wrap=on|off
+# Enables or disables AES key wrapping support on s390-ccw hosts. This feature
+# controls whether AES wrapping keys will be created to allow
+# execution of AES cryptographic functions.  The default is on.
+# @item dea-key-wrap=on|off
+# Enables or disables DEA key wrapping support on s390-ccw hosts. This feature
+# controls whether DEA wrapping keys will be created to allow
+# execution of DEA cryptographic functions.  The default is on.
+# @item nvdimm=on|off
+# Enables or disables NVDIMM support. The default is off.
+# @item s390-squash-mcss=on|off
+# Enables or disables squashing subchannels into the default css.
+# The default is off.
+# @item enforce-config-section=on|off
+# If @option{enforce-config-section} is set to @var{on}, force migration
+# code to send configuration section even if the machine-type sets the
+# @option{migration.send-configuration} property to @var{off}.
+# NOTE: this parameter is deprecated. Please use @option{-global}
+# @address@hidden|off} instead.
+# @end table
+# !end texinfo
+##
+{ 'option': '--machine', 'short': 'M',
+  'data': 'str',                # FIXME QAPIfy qemu_machine_opts, 
machine_parse(), machine_set_property()
+  'help': [
+"-machine [type=]name[,prop[=value][,...]]",
+"                selects emulated machine ('-machine help' for list)",
+"                property accel=accel1[:accel2[:...]] selects accelerator",
+"                supported accelerators are kvm, xen, hax or tcg (default: 
tcg)",
+"                kernel_irqchip=on|off|split controls accelerated irqchip 
support (default=off)",
+"                vmport=on|off|auto controls emulation of vmport (default: 
auto)",
+"                kvm_shadow_mem=size of KVM shadow MMU in bytes",
+"                dump-guest-core=on|off include guest memory in a core dump 
(default=on)",
+"                mem-merge=on|off controls memory merge support (default: on)",
+"                igd-passthru=on|off controls IGD GFX passthrough support 
(default=off)",
+"                aes-key-wrap=on|off controls support for AES key wrapping 
(default=on)",
+"                dea-key-wrap=on|off controls support for DEA key wrapping 
(default=on)",
+"                suppress-vmdesc=on|off disables self-describing migration 
(default=off)",
+"                nvdimm=on|off controls NVDIMM support (default=off)",
+"                enforce-config-section=on|off enforce configuration section 
migration (default=off)",
+"                s390-squash-mcss=on|off controls support for squashing into 
default css (default=off)"] }
+
+##
+# @--cpu:
+# !texinfo
+# -cpu @address@hidden
+# Select CPU model (@code{-cpu help} for list and additional feature selection)
+# !end texinfo
+##
+{ 'option': '--cpu',
+  'data': 'str',                # TODO enum
+  'help': "-cpu cpu        select CPU ('-cpu help' for list)" }
+
+##
+# @--accel:
+# !texinfo
+# -accel @var{name}[,address@hidden,address@hidden
+# This is used to enable an accelerator. Depending on the target architecture,
+# kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
+# more than one accelerator specified, the next one is used if the previous one
+# fails to initialize.
+# @table @option
+# @item thread=single|multi
+# Controls number of TCG threads. When the TCG is multi-threaded there will be 
one
+# thread per vCPU therefor taking advantage of additional host cores. The 
default
+# is to enable multi-threading where both the back-end and front-ends support 
it and
+# no incompatible TCG features have been enabled (e.g. icount/replay).
+# @end table
+# !end texinfo
+##
+{ 'option': '--accel',
+  'data': 'str',                # FIXME enum
+  'help': [
+"-accel [accel=]accelerator[,thread=single|multi]",
+"                select accelerator (kvm, xen, hax or tcg; use 'help' for a 
list)",
+"                thread=single|multi (enable multi-threaded TCG)"] }
+
+##
+# @--smp:
+# !texinfo
+# -smp 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
+# CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
+# to 4.
+# For the PC target, the number of @var{cores} per socket, the number
+# of @var{threads} per cores and the total number of @var{sockets} can be
+# specified. Missing values will be computed. If any on the three values is
+# given, the total number of CPUs @var{n} can be omitted. @var{maxcpus}
+# specifies the maximum number of hotpluggable CPUs.
+# !end texinfo
+##
+{ 'option': '--smp',
+  'data': 'str',                # FIXME QAPIfy qemu_smp_opts
+  'help': [
+"-smp 
[cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]",
+"                set the number of CPUs to 'n' [default=1]",
+"                maxcpus= maximum number of total cpus, including",
+"                offline CPUs for hotplug, etc",
+"                cores= number of CPU cores on one socket",
+"                threads= number of threads on one CPU core",
+"                sockets= number of discrete sockets in the system"] }
+
+##
+# @--numa:
+# !texinfo
+# -numa node[,address@hidden,address@hidden@var{lastcpu}]][,address@hidden@*
+# -numa node[,address@hidden,address@hidden@var{lastcpu}]][,address@hidden@*
+# -numa dist,address@hidden,address@hidden,address@hidden@*
+# -numa cpu,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Define a NUMA node and assign RAM and VCPUs to it.
+# Set the NUMA distance from a source node to a destination node.
+#
+# Legacy VCPU assignment uses @samp{cpus} option where
+# @var{firstcpu} and @var{lastcpu} are CPU indexes. Each
+# @samp{cpus} option represent a contiguous range of CPU indexes
+# (or a single VCPU if @var{lastcpu} is omitted). A non-contiguous
+# set of VCPUs can be represented by providing multiple @samp{cpus}
+# options. If @samp{cpus} is omitted on all nodes, VCPUs are automatically
+# split between them.
+#
+# For example, the following option assigns VCPUs 0, 1, 2 and 5 to
+# a NUMA node:
+# @example
+# -numa node,cpus=0-2,cpus=5
+# @end example
+#
+# @samp{cpu} option is a new alternative to @samp{cpus} option
+# which uses @samp{socket-id|core-id|thread-id} properties to assign
+# CPU objects to a @var{node} using topology layout properties of CPU.
+# The set of properties is machine specific, and depends on used
+# machine type/@samp{smp} options. It could be queried with
+# @samp{hotpluggable-cpus} monitor command.
+# @samp{node-id} property specifies @var{node} to which CPU object
+# will be assigned, it's required for @var{node} to be declared
+# with @samp{node} option before it's used with @samp{cpu} option.
+#
+# For example:
+# @example
+# -M pc \
+# -smp 1,sockets=2,maxcpus=2 \
+# -numa node,nodeid=0 -numa node,nodeid=1 \
+# -numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
+# @end example
+#
+# @samp{mem} assigns a given RAM amount to a node. @samp{memdev}
+# assigns RAM from a given memory backend device to a node. If
+# @samp{mem} and @samp{memdev} are omitted in all nodes, RAM is
+# split equally between them.
+#
+# @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore,
+# if one node uses @samp{memdev}, all of them have to use it.
+#
+# @var{source} and @var{destination} are NUMA node IDs.
+# @var{distance} is the NUMA distance from @var{source} to @var{destination}.
+# The distance from a node to itself is always 10. If any pair of nodes is
+# given a distance, then all pairs must be given distances. Although, when
+# distances are only given in one direction for each pair of nodes, then
+# the distances in the opposite directions are assumed to be the same. If,
+# however, an asymmetrical pair of distances is given for even one node
+# pair, then all node pairs must be provided distance values for both
+# directions, even when they are symmetrical. When a node is unreachable
+# from another node, set the pair's distance to 255.
+#
+# Note that the address@hidden option doesn't allocate any of the
+# specified resources, it just assigns existing resources to NUMA
+# nodes. This means that one still has to use the @option{-m},
+# @option{-smp} options to allocate RAM and VCPUs respectively.
+# !end texinfo
+##
+{ 'option': '--numa',
+  'data': 'str',                # FIXME QAPIfy qemu_numa_opts: NumaOptions
+  'help': [
+"-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node]",
+"-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node]",
+"-numa dist,src=source,dst=destination,val=distance"] }
+
+##
+# @--add-fd:
+# !texinfo
+# -add-fd address@hidden,address@hidden,address@hidden@*
+#
+# Add a file descriptor to an fd set.  Valid options are:
+#
+# @table @option
+# @item address@hidden
+# This option defines the file descriptor of which a duplicate is added to fd 
set.
+# The file descriptor cannot be stdin, stdout, or stderr.
+# @item address@hidden
+# This option defines the ID of the fd set to add the file descriptor to.
+# @item address@hidden
+# This option defines a free-form string that can be used to describe @var{fd}.
+# @end table
+#
+# You can open an image using pre-opened file descriptors from an fd set:
+# @example
+# qemu-system-i386
+# -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
+# -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
+# -drive file=/dev/fdset/2,index=0,media=disk
+# @end example
+# !end texinfo
+##
+{ 'option': '--add-fd',
+  'data': 'str',                # FIXME QAPIfy qemu_add_fd_opts
+  'help': [
+"-add-fd fd=fd,set=set[,opaque=opaque]",
+"                Add 'fd' to fd 'set'"] }
+
+##
+# @--set:
+# !texinfo
+# -set @address@hidden@address@hidden@*
+# Set parameter @var{arg} for item @var{id} of type @var{group}
+# !end texinfo
+##
+{ 'option': '--set',
+  'data': 'str',                # note: ad hoc syntax
+  'help': [
+"-set group.id.arg=value",
+"                set <arg> parameter for item <id> of type <group>",
+"                i.e. -set drive.$id.file=/path/to/image"] }
+
+##
+# @--global:
+# !texinfo
+# -global @address@hidden@address@hidden
+# -global address@hidden,address@hidden,address@hidden@*
+# Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
+#
+# @example
+# qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
+# @end example
+#
+# In particular, you can use this to set driver properties for devices which 
are
+# created automatically by the machine model. To create a device which is not
+# created automatically and set properties on it, use address@hidden
+#
+# -global @address@hidden@var{value} is shorthand for -global
+# address@hidden,address@hidden,address@hidden  The
+# longhand syntax works even when @var{driver} contains a dot.
+# !end texinfo
+##
+{ 'option': '--global',
+  'data': 'str',                # note: ad hoc syntax
+  'help': [
+"-global driver.property=value",
+"-global driver=driver,property=property,value=value",
+"                set a global default for a driver property"] }
+
+##
+# @--boot:
+# !texinfo
+# -boot 
address@hidden,address@hidden,menu=on|off][,address@hidden,address@hidden,address@hidden,strict=on|address@hidden
+# Specify boot order @var{drives} as a string of drive letters. Valid
+# drive letters depend on the target architecture. The x86 PC uses: a, b
+# (floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
+# from network adapter 1-4), hard disk boot is the default. To apply a
+# particular boot order only on the first startup, specify it via
+# @option{once}. Note that the @option{order} or @option{once} parameter
+# should not be used together with the @option{bootindex} property of
+# devices, since the firmware implementations normally do not support both
+# at the same time.
+#
+# Interactive boot menus/prompts can be enabled via @option{menu=on} as far
+# as firmware/BIOS supports them. The default is non-interactive boot.
+#
+# A splash picture could be passed to bios, enabling user to show it as logo,
+# when option address@hidden is given and menu=on, If firmware/BIOS
+# supports them. Currently Seabios for X86 system support it.
+# limitation: The splash file could be a jpeg file or a BMP file in 24 BPP
+# format(true color). The resolution should be supported by the SVGA mode, so
+# the recommended is 320x240, 640x480, 800x640.
+#
+# A timeout could be passed to bios, guest will pause for @var{rb_timeout} ms
+# when boot failed, then reboot. If @var{rb_timeout} is '-1', guest will not
+# reboot, qemu passes '-1' to bios by default. Currently Seabios for X86
+# system support it.
+#
+# Do strict boot via @option{strict=on} as far as firmware/BIOS
+# supports it. This only effects when boot priority is changed by
+# bootindex options. The default is non-strict boot.
+#
+# @example
+# # try to boot from network first, then from hard disk
+# qemu-system-i386 -boot order=nc
+# # boot from CD-ROM first, switch back to default order after reboot
+# qemu-system-i386 -boot once=d
+# # boot with a splash picture for 5 seconds.
+# qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
+# @end example
+#
+# Note: The legacy format '-boot @var{drives}' is still supported but its
+# use is discouraged as it may be removed from future versions.
+# !end texinfo
+##
+{ 'option': '--boot',
+  'data': 'str',                # FIXME QAPIfy qemu_boot_opts
+  'help': [
+"-boot [order=drives][,once=drives][,menu=on|off]",
+"      
[,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]",
+"                'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)",
+"                'sp_name': the file's name that would be passed to bios as 
logo picture, if menu=on",
+"                'sp_time': the period that splash picture last if menu=on, 
unit is ms",
+"                'rb_timeout': the timeout before guest reboot when boot 
failed, unit is ms"] }
+
+##
+# @--mem:
+# !texinfo
+# -m address@hidden,slots=n,address@hidden
+# Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
+# Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
+# megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
+# could be used to set amount of hotpluggable memory slots and maximum amount 
of
+# memory. Note that @var{maxmem} must be aligned to the page size.
+#
+# For example, the following command-line sets the guest startup RAM size to
+# 1GB, creates 3 slots to hotplug additional memory and sets the maximum
+# memory the guest can reach to 4GB:
+#
+# @example
+# qemu-system-x86_64 -m 1G,slots=3,maxmem=4G
+# @end example
+#
+# If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
+# be enabled and the guest startup RAM will never increase.
+# !end texinfo
+##
+{ 'option': '--mem', 'short': 'm',
+  'data': 'str',                # FIXME QAPIfy qemu_mem_opts
+  'help': [
+"-m [size=]megs[,slots=n,maxmem=size]",
+"                configure guest RAM",
+"                size: initial amount of guest memory",
+"                slots: number of hotplug slots (default: none)",
+"                maxmem: maximum amount of guest memory (default: none)",
+"NOTE: Some architectures might enforce a specific granularity"] }
+
+##
+# @--mem-path:
+# !texinfo
+# -mem-path @address@hidden
+# Allocate guest RAM from a temporarily created file in @var{path}.
+# !end texinfo
+##
+{ 'option': '--mem-path',
+  'data': 'str',
+  'help': "-mem-path FILE  provide backing storage for guest RAM" }
+
+##
+# @--mem-prealloc:
+# !texinfo
+# address@hidden
+# Preallocate memory when using -mem-path.
+# !end texinfo
+##
+{ 'option': '--mem-prealloc',
+  'help': "-mem-prealloc   preallocate guest memory (use with -mem-path)" }
+
+##
+# @--keyboard-layout:
+# !texinfo
+# -k @address@hidden
+# Use keyboard layout @var{language} (for example @code{fr} for
+# French). This option is only needed where it is not easy to get raw PC
+# keycodes (e.g. on Macs, with some X11 servers or with a VNC or curses
+# display). You don't normally need to use it on PC/Linux or PC/Windows
+# hosts.
+#
+# The available layouts are:
+# @example
+# ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
+# da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
+# de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
+# @end example
+#
+# The default is @code{en-us}.
+# !end texinfo
+##
+{ 'option': '--keyboard-layout', 'short': 'k',
+  'data': 'str',                # FIXME enum?
+  'help': "-k language     use keyboard layout (for example 'fr' for French)" }
+
+##
+# @--audio-help:
+# !texinfo
+# address@hidden
+# Will show the audio subsystem help: list of drivers, tunable
+# parameters.
+# !end texinfo
+##
+{ 'option': '--audio-help',
+  'help': "-audio-help     print list of audio drivers and their options" }
+
+##
+# @--soundhw:
+# !texinfo
+# -soundhw @var{card1}[,@var{card2},...] or -soundhw address@hidden
+# Enable audio and selected sound hardware. Use 'help' to print all
+# available sound hardware.
+#
+# @example
+# qemu-system-i386 -soundhw sb16,adlib disk.img
+# qemu-system-i386 -soundhw es1370 disk.img
+# qemu-system-i386 -soundhw ac97 disk.img
+# qemu-system-i386 -soundhw hda disk.img
+# qemu-system-i386 -soundhw all disk.img
+# qemu-system-i386 -soundhw help
+# @end example
+#
+# Note that Linux's i810_audio OSS kernel (for AC97) module might
+# require manually specifying clocking.
+#
+# @example
+# modprobe i810_audio clocking=48000
+# @end example
+# !end texinfo
+##
+{ 'option': '--soundhw',
+  'data': 'str',                # FIXME QAPIfy select_soundhw()
+  'help': [
+"-soundhw c1,... enable audio support",
+"                and only specified sound cards (comma separated list)",
+"                use '-soundhw help' to get the list of supported cards",
+"                use '-soundhw all' to enable all of them"] }
+
+##
+# @--balloon:
+# !texinfo
+# -balloon address@hidden
+# Disable balloon device.
+# -balloon virtio[,address@hidden@*
+# Enable virtio balloon device (default), optionally with PCI address
+# @var{addr}.
+# !end texinfo
+##
+{ 'option': '--balloon',
+  'data': 'str',                # FIXME QAPIfy balloon_parse()
+  'help': [
+"-balloon none   disable balloon device",
+"-balloon virtio[,addr=str]",
+"                enable virtio balloon device (default)"] }
+
+##
+# @--device:
+# !texinfo
+# -device @var{driver}[,@address@hidden,address@hidden
+# Add device @var{driver}.  @address@hidden sets driver
+# properties.  Valid properties depend on the driver.  To get help on
+# possible drivers and properties, use @code{-device help} and
+# @code{-device @var{driver},help}.
+#
+# Some drivers are:
+# -device 
ipmi-bmc-sim,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+#
+# Add an IPMI BMC.  This is a simulation of a hardware management
+# interface processor that normally sits on a system.  It provides
+# a watchdog and the ability to reset and power control the system.
+# You need to connect this to an IPMI interface to make it useful
+#
+# The IPMI slave address to use for the BMC.  The default is 0x20.
+# This address is the BMC's address on the I2C network of management
+# controllers.  If you don't know what this means, it is safe to ignore
+# it.
+#
+# @table @option
+# @item address@hidden
+# The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
+# @item address@hidden
+# Define slave address to use for the BMC.  The default is 0x20.
+# @item address@hidden
+# file containing raw Sensor Data Records (SDR) data. The default is none.
+# @item address@hidden
+# size of a Field Replaceable Unit (FRU) area.  The default is 1024.
+# @item address@hidden
+# file containing raw Field Replaceable Unit (FRU) inventory data. The default 
is none.
+# @end table
+#
+# -device ipmi-bmc-extern,address@hidden,address@hidden,address@hidden@*
+#
+# Add a connection to an external IPMI BMC simulator.  Instead of
+# locally emulating the BMC like the above item, instead connect
+# to an external entity that provides the IPMI services.
+#
+# A connection is made to an external BMC simulator.  If you do this, it
+# is strongly recommended that you use the "reconnect=" chardev option
+# to reconnect to the simulator if the connection is lost.  Note that if
+# this is not used carefully, it can be a security issue, as the
+# interface has the ability to send resets, NMIs, and power off the VM.
+# It's best if QEMU makes a connection to an external simulator running
+# on a secure port on localhost, so neither the simulator nor QEMU is
+# exposed to any outside network.
+#
+# See the "lanserv/README.vm" file in the OpenIPMI library for more
+# details on the external interface.
+#
+# -device isa-ipmi-kcs,address@hidden,address@hidden,address@hidden@*
+#
+# Add a KCS IPMI interafce on the ISA bus.  This also adds a
+# corresponding ACPI and SMBIOS entries, if appropriate.
+#
+# @table @option
+# @item address@hidden
+# The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
+# @item address@hidden
+# Define the I/O address of the interface.  The default is 0xca0 for KCS.
+# @item address@hidden
+# Define the interrupt to use.  The default is 5.  To disable interrupts,
+# set this to 0.
+# @end table
+#
+# -device isa-ipmi-bt,address@hidden,address@hidden,address@hidden@*
+#
+# Like the KCS interface, but defines a BT interface.  The default port is
+# 0xe4 and the default interrupt is 5.
+# !end texinfo
+##
+{ 'option': '--device',
+  'data': 'str',                # FIXME QAPIfy qemu_device_opts: device_add
+  'help': [
+"-device driver[,prop[=value][,...]]",
+"                add device (based on driver)",
+"                prop=value,... sets driver properties",
+"                use '-device help' to print all possible drivers",
+"                use '-device driver,help' to print all possible properties"] }
+
+##
+# @--name:
+# !texinfo
+# -name @address@hidden
+# Sets the @var{name} of the guest.
+# This name will be displayed in the SDL window caption.
+# The @var{name} will also be used for the VNC server.
+# Also optionally set the top visible process name in Linux.
+# Naming of individual threads can also be enabled on Linux to aid debugging.
+# !end texinfo
+##
+# FIXME document the additional parameters
+{ 'option': '--name',
+  'data': 'str',                # FIXME QAPIfy qemu_name_opts
+  'help': [
+"-name string1[,process=string2][,debug-threads=on|off]",
+"                set the name of the guest",
+"                string1 sets the window title and string2 the process name 
(on Linux)",
+"                When debug-threads is enabled, individual threads are given a 
separate name (on Linux)",
+"                NOTE: The thread names are for debugging and not a stable 
API."] }
+
+##
+# @--uuid:
+# !texinfo
+# -uuid @address@hidden
+# Set system UUID.
+# !end texinfo
+##
+{ 'option': '--uuid',
+  'data': 'str',                # FIXME uuid?
+  'help': [
+"-uuid %08x-%04x-%04x-%04x-%012x",
+"                specify machine UUID"] }
+
+##
+# == Block device options
+##
+
+##
+# @--fda:
+# !texinfo
+# -fda @address@hidden
+# -fdb @address@hidden
+# Use @var{file} as floppy disk 0/1 image (FIXME @@address@hidden@}).
+# !end texinfo
+##
+{ 'option': '--fda',
+  'data': 'str',
+  'help': "-fda/-fdb file  use 'file' as floppy disk 0/1 image" }
+# FIXME
+
+##
+# @--fdb:
+##
+{ 'option': '--fdb',
+  'data': 'str',
+  'help': null }                # FIXME
+
+##
+# @--hda:
+# !texinfo
+# -hda @address@hidden
+# -hdb @address@hidden
+# -hdc @address@hidden
+# -hdd @address@hidden
+# Use @var{file} as hard disk 0, 1, 2 or 3 image (FIXME @@address@hidden@}).
+# !end texinfo
+##
+{ 'option': '--hda',
+  'data': 'str',
+  'help': "-hda/-hdb file  use 'file' as IDE hard disk 0/1 image" }
+# FIXME
+
+##
+# @--hdb:
+##
+{ 'option': '--hdb',
+  'data': 'str',
+  'help': null }                # FIXME
+
+##
+# @--hdc:
+##
+{ 'option': '--hdc',
+  'data': 'str',
+  'help': "-hdc/-hdd file  use 'file' as IDE hard disk 2/3 image" }
+# FIXME
+
+##
+# @--hdd:
+##
+{ 'option': '--hdd',
+  'data': 'str',
+  'help': null }                # FIXME
+
+##
+# @--cdrom:
+# !texinfo
+# -cdrom @address@hidden
+# Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and
+# @option{-cdrom} at the same time). You can use the host CD-ROM by
+# using @file{/dev/cdrom} as filename (FIXME @@address@hidden@}).
+# !end texinfo
+##
+{ 'option': '--cdrom',
+  'data': 'str',
+  'help': "-cdrom file     use 'file' as IDE cdrom image (cdrom is ide1 
master)" }
+
+##
+# @--blockdev:
+# !texinfo
+# -blockdev @var{option}[,@var{option}[,@var{option}[,address@hidden
+#
+# Define a new block driver node. Some of the options apply to all block 
drivers,
+# other options are only accepted for a specific block driver. See below for a
+# list of generic options and options for the most common block drivers.
+#
+# Options that expect a reference to another node (e.g. @code{file}) can be
+# given in two ways. Either you specify the node name of an already existing 
node
+# (address@hidden), or you define a new node inline, adding options
+# for the referenced node after a dot (address@hidden,file.aio=native).
+#
+# A block driver node created with @option{-blockdev} can be used for a guest
+# device by specifying its node name for the @code{drive} property in a
+# @option{-device} argument that defines a block device.
+#
+# @table @option
+# @item Valid options for any block driver node:
+#
+# @table @code
+# @item driver
+# Specifies the block driver to use for the given node.
+# @item node-name
+# This defines the name of the block driver node by which it will be referenced
+# later. The name must be unique, i.e. it must not match the name of a 
different
+# block driver node, or (if you use @option{-drive} as well) the ID of a drive.
+#
+# If no node name is specified, it is automatically generated. The generated 
node
+# name is not intended to be predictable and changes between QEMU invocations.
+# For the top level, an explicit node name must be specified.
+# @item read-only
+# Open the node read-only. Guest write attempts will fail.
+# @item cache.direct
+# The host page cache can be avoided with @option{cache.direct=on}. This will
+# attempt to do disk IO directly to the guest's memory. QEMU may still perform 
an
+# internal copy of the data.
+# @item cache.no-flush
+# In case you don't care about data integrity over host failures, you can use
+# @option{cache.no-flush=on}. This option tells QEMU that it never needs to 
write
+# any data to the disk but can instead keep things in cache. If anything goes
+# wrong, like your host losing power, the disk storage getting disconnected
+# accidentally, etc. your image will most probably be rendered unusable.
+# @item address@hidden
+# @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and controls
+# whether @code{discard} (also known as @code{trim} or @code{unmap}) requests 
are
+# ignored or passed to the filesystem. Some machine types may not support
+# discard requests.
+# @item address@hidden
+# @var{detect-zeroes} is "off", "on" or "unmap" and enables the automatic
+# conversion of plain zero writes by the OS to driver specific optimized
+# zero write commands. You may even choose "unmap" if @var{discard} is set
+# to "unmap" to allow a zero write to be converted to an @code{unmap} 
operation.
+# @end table
+#
+# @item Driver-specific options for @code{file}
+#
+# This is the protocol-level block driver for accessing regular files.
+#
+# @table @code
+# @item filename
+# The path to the image file in the local filesystem
+# @item aio
+# Specifies the AIO backend (threads/native, default: threads)
+# @end table
+# Example:
+# @example
+# -blockdev driver=file,node-name=disk,filename=disk.img
+# @end example
+#
+# @item Driver-specific options for @code{raw}
+#
+# This is the image format block driver for raw images. It is usually
+# stacked on top of a protocol level block driver such as @code{file}.
+#
+# @table @code
+# @item file
+# Reference to or definition of the data source block driver node
+# (e.g. a @code{file} driver node)
+# @end table
+# Example 1:
+# @example
+# -blockdev driver=file,node-name=disk_file,filename=disk.img
+# -blockdev driver=raw,node-name=disk,file=disk_file
+# @end example
+# Example 2:
+# @example
+# -blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
+# @end example
+#
+# @item Driver-specific options for @code{qcow2}
+#
+# This is the image format block driver for qcow2 images. It is usually
+# stacked on top of a protocol level block driver such as @code{file}.
+#
+# @table @code
+# @item file
+# Reference to or definition of the data source block driver node
+# (e.g. a @code{file} driver node)
+#
+# @item backing
+# Reference to or definition of the backing file block device (default is taken
+# from the image file). It is allowed to pass an empty string here in order to
+# disable the default backing file.
+#
+# @item lazy-refcounts
+# Whether to enable the lazy refcounts feature (on/off; default is taken from 
the
+# image file)
+#
+# @item cache-size
+# The maximum total size of the L2 table and refcount block caches in bytes
+# (default: 1048576 bytes or 8 clusters, whichever is larger)
+#
+# @item l2-cache-size
+# The maximum size of the L2 table cache in bytes
+# (default: 4/5 of the total cache size)
+#
+# @item refcount-cache-size
+# The maximum size of the refcount block cache in bytes
+# (default: 1/5 of the total cache size)
+#
+# @item cache-clean-interval
+# Clean unused entries in the L2 and refcount caches. The interval is in 
seconds.
+# The default value is 0 and it disables this feature.
+#
+# @item pass-discard-request
+# Whether discard requests to the qcow2 device should be forwarded to the data
+# source (on/off; default: on if discard=unmap is specified, off otherwise)
+#
+# @item pass-discard-snapshot
+# Whether discard requests for the data source should be issued when a snapshot
+# operation (e.g. deleting a snapshot) frees clusters in the qcow2 file 
(on/off;
+# default: on)
+#
+# @item pass-discard-other
+# Whether discard requests for the data source should be issued on other
+# occasions where a cluster gets freed (on/off; default: off)
+#
+# @item overlap-check
+# Which overlap checks to perform for writes to the image
+# (none/constant/cached/all; default: cached). For details or finer
+# granularity control refer to the QAPI documentation of @code{blockdev-add}.
+# @end table
+#
+# Example 1:
+# @example
+# -blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2
+# -blockdev 
driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
+# @end example
+# Example 2:
+# @example
+# -blockdev 
driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
+# @end example
+#
+# @item Driver-specific options for other drivers
+# Please refer to the QAPI documentation of the @code{blockdev-add} QMP 
command.
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--blockdev',
+  'data': 'str',                # FIXME BlockdevOptions
+  'help': [
+"-blockdev [driver=]driver[,node-name=N][,discard=ignore|unmap]",
+"          [,cache.direct=on|off][,cache.no-flush=on|off]",
+"          [,read-only=on|off][,detect-zeroes=on|off|unmap]",
+"          [,driver specific parameters...]",
+"                configure a block backend"] }
+
+##
+# @--drive:
+# !texinfo
+# -drive @var{option}[,@var{option}[,@var{option}[,address@hidden
+#
+# Define a new drive. This includes creating a block driver node (the backend) 
as
+# well as a guest device, and is mostly a shortcut for defining the 
corresponding
+# @option{-blockdev} and @option{-device} options.
+#
+# @option{-drive} accepts all options that are accepted by @option{-blockdev}. 
In
+# addition, it knows the following options:
+#
+# @table @option
+# @item address@hidden
+# This option defines which disk image (FIXME @@address@hidden@}) to use with
+# this drive. If the filename contains comma, you must double it
+# (for instance, "file=my,,file" to use file "my,file").
+#
+# Special files such as iSCSI devices can be specified using protocol
+# specific URLs. See the section for "Device URL Syntax" for more information.
+# @item address@hidden
+# This option defines on which type on interface the drive is connected.
+# Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio, none.
+# @item address@hidden,address@hidden
+# These options define where is connected the drive by defining the bus number 
and
+# the unit id.
+# @item address@hidden
+# This option defines where is connected the drive by using an index in the 
list
+# of available connectors of a given interface type.
+# @item address@hidden
+# This option defines the type of the media: disk or cdrom.
+# @item address@hidden,address@hidden,address@hidden,address@hidden
+# These options have the same definition as they have in @option{-hdachs}.
+# These parameters are deprecated, use the corresponding parameters
+# of @code{-device} instead.
+# @item address@hidden
+# @var{snapshot} is "on" or "off" and controls snapshot mode for the given 
drive
+# (see @option{-snapshot}).
+# @item address@hidden
+# @var{cache} is "none", "writeback", "unsafe", "directsync" or "writethrough"
+# and controls how the host cache is used to access block data. This is a
+# shortcut that sets the @option{cache.direct} and @option{cache.no-flush}
+# options (as in @option{-blockdev}), and additionally 
@option{cache.writeback},
+# which provides a default for the @option{write-cache} option of block guest
+# devices (as in @option{-device}). The modes correspond to the following
+# settings:
+#
+# @c Our texi2pod.pl script doesn't support @multitable, so fall back to using
+# @c plain ASCII art (well, UTF-8 art really). This looks okay both in the 
manpage
+# @c and the HTML output.
+# @example
+#              | cache.writeback   cache.direct   cache.no-flush
+# -------------+------------------------------------------------
+# writeback    | on                off            off
+# none         | on                on             off
+# writethrough | off               off            off
+# directsync   | off               on             off
+# unsafe       | on                off            on
+# @end example
+#
+# The default mode is @option{cache=writeback}.
+#
+# @item address@hidden
+# @var{aio} is "threads", or "native" and selects between pthread based disk 
I/O and native Linux AIO.
+# @item address@hidden
+# Specify which disk @var{format} will be used rather than detecting
+# the format.  Can be used to specify format=raw to avoid interpreting
+# an untrusted format header.
+# @item address@hidden
+# This option specifies the serial number to assign to the device. This
+# parameter is deprecated, use the corresponding parameter of @code{-device}
+# instead.
+# @item address@hidden
+# Specify the controller's PCI address (if=virtio only). This parameter is
+# deprecated, use the corresponding parameter of @code{-device} instead.
+# @item address@hidden,address@hidden
+# Specify which @var{action} to take on write and read errors. Valid actions 
are:
+# "ignore" (ignore the error and try to continue), "stop" (pause QEMU),
+# "report" (report the error to the guest), "enospc" (pause QEMU only if the
+# host disk is full; report the error to the guest otherwise).
+# The default setting is @option{werror=enospc} and @option{rerror=report}.
+# @item address@hidden
+# @var{copy-on-read} is "on" or "off" and enables whether to copy read backing
+# file sectors into the image file.
+# @item address@hidden,address@hidden,address@hidden
+# Specify bandwidth throttling limits in bytes per second, either for all 
request
+# types or for reads or writes only.  Small values can lead to timeouts or 
hangs
+# inside the guest.  A safe minimum for disks is 2 MB/s.
+# @item address@hidden,address@hidden,address@hidden
+# Specify bursts in bytes per second, either for all request types or for reads
+# or writes only.  Bursts allow the guest I/O to spike above the limit
+# temporarily.
+# @item address@hidden,address@hidden,address@hidden
+# Specify request rate limits in requests per second, either for all request
+# types or for reads or writes only.
+# @item address@hidden,address@hidden,address@hidden
+# Specify bursts in requests per second, either for all request types or for 
reads
+# or writes only.  Bursts allow the guest I/O to spike above the limit
+# temporarily.
+# @item address@hidden
+# Let every @var{is} bytes of a request count as a new request for iops
+# throttling purposes.  Use this option to prevent guests from circumventing 
iops
+# limits by sending fewer but larger requests.
+# @item address@hidden
+# Join a throttling quota group with given name @var{g}.  All drives that are
+# members of the same group are accounted for together.  Use this option to
+# prevent guests from circumventing throttling limits by using many small disks
+# instead of a single larger disk.
+# @end table
+#
+# By default, the @option{cache.writeback=on} mode is used. It will report data
+# writes as completed as soon as the data is present in the host page cache.
+# This is safe as long as your guest OS makes sure to correctly flush disk 
caches
+# where needed. If your guest OS does not handle volatile disk write caches
+# correctly and your host crashes or loses power, then the guest may experience
+# data corruption.
+#
+# For such guests, you should consider using @option{cache.writeback=off}. This
+# means that the host page cache will be used to read and write data, but write
+# notification will be sent to the guest only after QEMU has made sure to flush
+# each write to the disk. Be aware that this has a major impact on performance.
+#
+# When using the @option{-snapshot} option, unsafe caching is always used.
+#
+# Copy-on-read avoids accessing the same backing file sectors repeatedly and is
+# useful when the backing file is over a slow network.  By default copy-on-read
+# is off.
+#
+# Instead of @option{-cdrom} you can use:
+# @example
+# qemu-system-i386 -drive file=file,index=2,media=cdrom
+# @end example
+#
+# Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you 
can
+# use:
+# @example
+# qemu-system-i386 -drive file=file,index=0,media=disk
+# qemu-system-i386 -drive file=file,index=1,media=disk
+# qemu-system-i386 -drive file=file,index=2,media=disk
+# qemu-system-i386 -drive file=file,index=3,media=disk
+# @end example
+#
+# You can open an image using pre-opened file descriptors from an fd set:
+# @example
+# qemu-system-i386
+# -add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
+# -add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
+# -drive file=/dev/fdset/2,index=0,media=disk
+# @end example
+#
+# You can connect a CDROM to the slave of ide0:
+# @example
+# qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
+# @end example
+#
+# If you don't specify the "file=" argument, you define an empty drive:
+# @example
+# qemu-system-i386 -drive if=ide,index=1,media=cdrom
+# @end example
+#
+# Instead of @option{-fda}, @option{-fdb}, you can use:
+# @example
+# qemu-system-i386 -drive file=file,index=0,if=floppy
+# qemu-system-i386 -drive file=file,index=1,if=floppy
+# @end example
+#
+# By default, @var{interface} is "ide" and @var{index} is automatically
+# incremented:
+# @example
+# qemu-system-i386 -drive file=a -drive file=b"
+# @end example
+# is interpreted like:
+# @example
+# qemu-system-i386 -hda a -hdb b
+# @end example
+# !end texinfo
+##
+{ 'option': '--drive',
+  'data': 'str',                # FIXME
+  'help': [
+"-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]",
+"       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]",
+"       [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]",
+"       [,serial=s][,addr=A][,rerror=ignore|stop|report]",
+"       [,werror=ignore|stop|report|enospc][,id=name][,aio=threads|native]",
+"       [,readonly=on|off][,copy-on-read=on|off]",
+"       [,discard=ignore|unmap][,detect-zeroes=on|off|unmap]",
+"       [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]]",
+"       [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]]",
+"       [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]]",
+"       [[,iops_max=im]|[[,iops_rd_max=irm][,iops_wr_max=iwm]]]",
+"       [[,iops_size=is]]",
+"       [[,group=g]]",
+"                use 'file' as a drive image"] }
+
+##
+# @--mtdblock:
+# !texinfo
+# -mtdblock @address@hidden
+# Use @var{file} as on-board Flash memory image.
+# !end texinfo
+##
+{ 'option': '--mtdblock',
+  'data': 'str',
+  'help': "-mtdblock file  use 'file' as on-board Flash memory image" }
+
+##
+# @--sd:
+# !texinfo
+# -sd @address@hidden
+# Use @var{file} as SecureDigital card image.
+# !end texinfo
+##
+{ 'option': '--sd',
+  'data': 'str',
+  'help': "-sd file        use 'file' as SecureDigital card image" }
+
+##
+# @--pflash:
+# !texinfo
+# -pflash @address@hidden
+# Use @var{file} as a parallel flash image.
+# !end texinfo
+##
+{ 'option': '--pflash',
+  'data': 'str',
+  'help': "-pflash file    use 'file' as a parallel flash image" }
+
+##
+# @--snapshot:
+# !texinfo
+
+# address@hidden
+# Write to temporary files instead of disk image files. In this case,
+# the raw disk image you use is not written back. You can however force
+# the write back by pressing @key{C-a s} (FIXME @@address@hidden@}).
+# !end texinfo
+##
+{ 'option': '--snapshot',
+  'help': "-snapshot       write to temporary files instead of disk image 
files" }
+
+##
+# @--hdachs:
+# !texinfo
+# -hdachs @var{c},@var{h},@var{s},[,@address@hidden
+# Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
+# @var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
+# translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
+# all those parameters. This option is deprecated, please use
+# @code{-device ide-hd,cyls=c,heads=h,secs=s,...} instead.
+# !end texinfo
+##
+# TODO deprecate
+{ 'option': '--hdachs',
+  'data': 'str',                # note: ad hoc syntax
+  'help': [
+"-hdachs c,h,s[,t]",
+"                force hard disk 0 physical geometry and the optional BIOS",
+"                translation (t=none or lba) (usually QEMU can guess them)"] }
+
+##
+# @--fsdev:
+# !texinfo
+#
+# -fsdev 
@var{fsdriver},address@hidden,address@hidden,address@hidden,address@hidden,readonly][,address@hidden|address@hidden,address@hidden,address@hidden@*
+# Define a new file system device. Valid options are:
+# @table @option
+# @item @var{fsdriver}
+# This option specifies the fs driver backend to use.
+# Currently "local", "handle" and "proxy" file system drivers are supported.
+# @item address@hidden
+# Specifies identifier for this device
+# @item address@hidden
+# Specifies the export path for the file system device. Files under
+# this path will be available to the 9p client on the guest.
+# @item address@hidden
+# Specifies the security model to be used for this export path.
+# Supported security models are "passthrough", "mapped-xattr", "mapped-file" 
and "none".
+# In "passthrough" security model, files are stored using the same
+# credentials as they are created on the guest. This requires QEMU
+# to run as root. In "mapped-xattr" security model, some of the file
+# attributes like uid, gid, mode bits and link target are stored as
+# file attributes. For "mapped-file" these attributes are stored in the
+# hidden .virtfs_metadata directory. Directories exported by this security 
model cannot
+# interact with other unix tools. "none" security model is same as
+# passthrough except the sever won't report failures if it fails to
+# set file attributes like ownership. Security model is mandatory
+# only for local fsdriver. Other fsdrivers (like handle, proxy) don't take
+# security model as a parameter.
+# @item address@hidden
+# This is an optional argument. The only supported value is "immediate".
+# This means that host page cache will be used to read and write data but
+# write notification will be sent to the guest only when the data has been
+# reported as written by the storage subsystem.
+# @item readonly
+# Enables exporting 9p share as a readonly mount for guests. By default
+# read-write access is given.
+# @item address@hidden
+# Enables proxy filesystem driver to use passed socket file for communicating
+# with virtfs-proxy-helper
+# @item address@hidden
+# Enables proxy filesystem driver to use passed socket descriptor for
+# communicating with virtfs-proxy-helper. Usually a helper like libvirt
+# will create socketpair and pass one of the fds as sock_fd
+# @item address@hidden
+# Specifies the default mode for newly created files on the host. Works only
+# with security models "mapped-xattr" and "mapped-file".
+# @item address@hidden
+# Specifies the default mode for newly created directories on the host. Works
+# only with security models "mapped-xattr" and "mapped-file".
+# @end table
+#
+# -fsdev option is used along with -device driver "virtio-9p-pci".
+# -device virtio-9p-pci,address@hidden,address@hidden@*
+# Options for virtio-9p-pci driver are:
+# @table @option
+# @item address@hidden
+# Specifies the id value specified along with -fsdev option
+# @item address@hidden
+# Specifies the tag name to be used by the guest to mount this export point
+# @end table
+# !end texinfo
+##
+{ 'option': '--fsdev',
+  'data': 'str',                # FIXME QAPIfy qemu_fsdev_opts
+  'help': [
+"-fsdev 
fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]",
+" 
[,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]",
+" 
[[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]",
+" 
[[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]",
+" 
[[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]",
+" 
[[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]",
+" [[,throttling.iops-size=is]]"] }
+
+##
+# @--virtfs:
+# !texinfo
+#
+# -virtfs 
@var{fsdriver}[,address@hidden,address@hidden,address@hidden,address@hidden,readonly][,address@hidden|address@hidden,address@hidden,address@hidden@*
+#
+# The general form of a Virtual File system pass-through options are:
+# @table @option
+# @item @var{fsdriver}
+# This option specifies the fs driver backend to use.
+# Currently "local", "handle" and "proxy" file system drivers are supported.
+# @item address@hidden
+# Specifies identifier for this device
+# @item address@hidden
+# Specifies the export path for the file system device. Files under
+# this path will be available to the 9p client on the guest.
+# @item address@hidden
+# Specifies the security model to be used for this export path.
+# Supported security models are "passthrough", "mapped-xattr", "mapped-file" 
and "none".
+# In "passthrough" security model, files are stored using the same
+# credentials as they are created on the guest. This requires QEMU
+# to run as root. In "mapped-xattr" security model, some of the file
+# attributes like uid, gid, mode bits and link target are stored as
+# file attributes. For "mapped-file" these attributes are stored in the
+# hidden .virtfs_metadata directory. Directories exported by this security 
model cannot
+# interact with other unix tools. "none" security model is same as
+# passthrough except the sever won't report failures if it fails to
+# set file attributes like ownership. Security model is mandatory only
+# for local fsdriver. Other fsdrivers (like handle, proxy) don't take security
+# model as a parameter.
+# @item address@hidden
+# This is an optional argument. The only supported value is "immediate".
+# This means that host page cache will be used to read and write data but
+# write notification will be sent to the guest only when the data has been
+# reported as written by the storage subsystem.
+# @item readonly
+# Enables exporting 9p share as a readonly mount for guests. By default
+# read-write access is given.
+# @item address@hidden
+# Enables proxy filesystem driver to use passed socket file for
+# communicating with virtfs-proxy-helper. Usually a helper like libvirt
+# will create socketpair and pass one of the fds as sock_fd
+# @item sock_fd
+# Enables proxy filesystem driver to use passed 'sock_fd' as the socket
+# descriptor for interfacing with virtfs-proxy-helper
+# @item address@hidden
+# Specifies the default mode for newly created files on the host. Works only
+# with security models "mapped-xattr" and "mapped-file".
+# @item address@hidden
+# Specifies the default mode for newly created directories on the host. Works
+# only with security models "mapped-xattr" and "mapped-file".
+# @end table
+# !end texinfo
+##
+{ 'option': '--virtfs',
+  'data': 'str',                # FIXME QAPIfy qemu_virtfs_opts
+  'help': [
+"-virtfs 
local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none]",
+"        
[,id=id][,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]"]
 }
+
+##
+# @--virtfs_synth:
+# !texinfo
+# address@hidden
+# Create synthetic file system image
+# !end texinfo
+##
+{ 'option': '--virtfs_synth',
+  'help': "-virtfs_synth Create synthetic file system image" }
+
+##
+# @--iscsi:
+# Configure iSCSI session parameters.
+##
+{ 'option': '--iscsi',
+  'data': 'str',                # FIXME QAPIfy qemu_iscsi_opts
+  'help': [
+"-iscsi [user=user][,password=password]",
+"       [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE",
+"       [,initiator-name=initiator-iqn][,id=target-iqn]",
+"       [,timeout=timeout]",
+"                iSCSI session parameters"] }
+
+##
+# == USB options
+##
+
+##
+# @--usb:
+# !texinfo
+# address@hidden
+# Enable the USB driver (if it is not used by default yet).
+# !end texinfo
+##
+{ 'option': '--usb',
+  'help': "-usb            enable the USB driver (if it is not used by default 
yet)" }
+
+##
+# @--usbdevice:
+# !texinfo
+#
+# -usbdevice @address@hidden
+# Add the USB device @var{devname}. Note that this option is deprecated,
+# please use @code{-device usb-...} instead. FIXME @@address@hidden@}.
+#
+# @table @option
+#
+# @item mouse
+# Virtual Mouse. This will override the PS/2 mouse emulation when activated.
+#
+# @item tablet
+# Pointer device that uses absolute coordinates (like a touchscreen). This
+# means QEMU is able to report the mouse position without having to grab the
+# mouse. Also overrides the PS/2 mouse emulation when activated.
+#
+# @item disk:address@hidden:@var{file}
+# Mass storage device based on file. The optional @var{format} argument
+# will be used rather than detecting the format. Can be used to specify
+# @code{format=raw} to avoid interpreting an untrusted format header.
+#
+# @item host:@address@hidden
+# Pass through the host device identified by @address@hidden (Linux only).
+#
+# @item host:@var{vendor_id}:@var{product_id}
+# Pass through the host device identified by @var{vendor_id}:@var{product_id}
+# (Linux only).
+#
+# @item serial:address@hidden,address@hidden:@var{dev}
+# Serial converter to host character device @var{dev}, see @code{-serial} for 
the
+# available devices.
+#
+# @item braille
+# Braille device.  This will use BrlAPI to display the braille output on a real
+# or fake device.
+#
+# @item net:@var{options}
+# Network adapter that supports CDC ethernet and RNDIS protocols.
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--usbdevice',
+  'data': 'str',                # FIXME QAPIfy usb_parse()
+  'help': "-usbdevice name add the host or guest USB device 'name'" }
+
+##
+# == Display options
+##
+
+##
+# @--display:
+# !texinfo
+# -display @address@hidden
+# Select type of display to use. This option is a replacement for the
+# old style -sdl/-curses/... options. Valid values for @var{type} are
+# @table @option
+# @item sdl
+# Display video output via SDL (usually in a separate graphics
+# window; see the SDL documentation for other possibilities).
+# @item curses
+# Display video output via curses. For graphics device models which
+# support a text mode, QEMU can display this output using a
+# curses/ncurses interface. Nothing is displayed when the graphics
+# device is in graphical mode or if the graphics device does not support
+# a text mode. Generally only the VGA device models support text mode.
+# @item none
+# Do not display video output. The guest will still see an emulated
+# graphics card, but its output will not be displayed to the QEMU
+# user. This option differs from the -nographic option in that it
+# only affects what is done with video output; -nographic also changes
+# the destination of the serial and parallel port data.
+# @item gtk
+# Display video output in a GTK window. This interface provides drop-down
+# menus and other UI elements to configure and control the VM during
+# runtime.
+# @item vnc
+# Start a VNC server on display <arg>
+# @end table
+# !end texinfo
+##
+{ 'option': '--display',
+  'data': 'str',                # FIXME QAPIfy select_display()
+  'help': [
+"-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]",
+"            [,window_close=on|off][,gl=on|off]",
+"-display gtk[,grab_on_hover=on|off][,gl=on|off]|",
+"-display vnc=<display>[,<optargs>]",
+"-display curses",
+"-display none",
+"                select display type",
+"The default display is equivalent to",
+"        '-display FIXME'"] }
+
+##
+# @--nographic:
+# !texinfo
+# address@hidden
+# Normally, if QEMU is compiled with graphical window support, it displays
+# output such as guest graphics, guest console, and the QEMU monitor in a
+# window. With this option, you can totally disable graphical output so
+# that QEMU is a simple command line application. The emulated serial port
+# is redirected on the console and muxed with the monitor (unless
+# redirected elsewhere explicitly). Therefore, you can still use QEMU to
+# debug a Linux kernel with a serial console. Use @key{C-a h} for help on
+# switching between the console and monitor.
+# !end texinfo
+##
+# TODO deprecate
+{ 'option': '--nographic',
+  'help': "-nographic      disable graphical output and redirect serial I/Os 
to console" }
+
+##
+# @--curses:
+# !texinfo
+# address@hidden
+# Normally, if QEMU is compiled with graphical window support, it displays
+# output such as guest graphics, guest console, and the QEMU monitor in a
+# window. With this option, QEMU can display the VGA output when in text
+# mode using a curses/ncurses interface. Nothing is displayed in graphical
+# mode.
+# !end texinfo
+##
+{ 'option': '--curses',
+  'help': "-curses         shorthand for -display curses" }
+
+##
+# @--no-frame:
+# !texinfo
+# address@hidden
+# Do not use decorations for SDL windows and start them using the whole
+# available screen space. This makes the using QEMU in a dedicated desktop
+# workspace more convenient.
+# !end texinfo
+##
+{ 'option': '--no-frame',
+  'help': "-no-frame       open SDL window without a frame and window 
decorations" }
+
+##
+# @--alt-grab:
+# !texinfo
+# address@hidden
+# Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also
+# affects the special keys (for fullscreen, monitor-mode switching, etc).
+# !end texinfo
+##
+{ 'option': '--alt-grab',
+  'help': "-alt-grab       use Ctrl-Alt-Shift to grab mouse (instead of 
Ctrl-Alt)" }
+
+##
+# @--ctrl-grab:
+# !texinfo
+# address@hidden
+# Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also
+# affects the special keys (for fullscreen, monitor-mode switching, etc).
+# !end texinfo
+##
+{ 'option': '--ctrl-grab',
+  'help': "-ctrl-grab      use Right-Ctrl to grab mouse (instead of Ctrl-Alt)" 
}
+
+##
+# @--no-quit:
+# !texinfo
+# address@hidden
+# Disable SDL window close capability.
+# !end texinfo
+##
+{ 'option': '--no-quit',
+  'help': "-no-quit        disable SDL window close capability" }
+
+##
+# @--sdl:
+# !texinfo
+# address@hidden
+# Enable SDL.
+# !end texinfo
+##
+{ 'option': '--sdl',
+  'help': "-sdl            shorthand for -display sdl" }
+
+##
+# @--spice:
+# !texinfo
+# -spice @var{option}[,@var{option}[,address@hidden
+# Enable the spice remote desktop protocol. Valid options are
+#
+# @table @option
+#
+# @item port=<nr>
+# Set the TCP port spice is listening on for plaintext channels.
+#
+# @item addr=<addr>
+# Set the IP address spice is listening on.  Default is any address.
+#
+# @item ipv4
+# @itemx ipv6
+# @itemx unix
+# Force using the specified IP version.
+#
+# @item password=<secret>
+# Set the password you need to authenticate.
+#
+# @item sasl
+# Require that the client use SASL to authenticate with the spice.
+# The exact choice of authentication method used is controlled from the
+# system / user's SASL configuration file for the 'qemu' service. This
+# is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
+# unprivileged user, an environment variable SASL_CONF_PATH can be used
+# to make it search alternate locations for the service config.
+# While some SASL auth methods can also provide data encryption (eg GSSAPI),
+# it is recommended that SASL always be combined with the 'tls' and
+# 'x509' settings to enable use of SSL and server certificates. This
+# ensures a data encryption preventing compromise of authentication
+# credentials.
+#
+# @item disable-ticketing
+# Allow client connects without authentication.
+#
+# @item disable-copy-paste
+# Disable copy paste between the client and the guest.
+#
+# @item disable-agent-file-xfer
+# Disable spice-vdagent based file-xfer between the client and the guest.
+#
+# @item tls-port=<nr>
+# Set the TCP port spice is listening on for encrypted channels.
+#
+# @item x509-dir=<dir>
+# Set the x509 file directory. Expects same filenames as -vnc 
$display,x509=$dir
+#
+# @item x509-key-file=<file>
+# @itemx x509-key-password=<file>
+# @itemx x509-cert-file=<file>
+# @itemx x509-cacert-file=<file>
+# @itemx x509-dh-key-file=<file>
+# The x509 file names can also be configured individually.
+#
+# @item tls-ciphers=<list>
+# Specify which ciphers to use.
+#
+# @item tls-channel=[main|display|cursor|inputs|record|playback]
+# @itemx plaintext-channel=[main|display|cursor|inputs|record|playback]
+# Force specific channel to be used with or without TLS encryption.  The
+# options can be specified multiple times to configure multiple
+# channels.  The special name "default" can be used to set the default
+# mode.  For channels which are not explicitly forced into one mode the
+# spice client is allowed to pick tls/plaintext as he pleases.
+#
+# @item image-compression=[auto_glz|auto_lz|quic|glz|lz|off]
+# Configure image compression (lossless).
+# Default is auto_glz.
+#
+# @item jpeg-wan-compression=[auto|never|always]
+# @itemx zlib-glz-wan-compression=[auto|never|always]
+# Configure wan image compression (lossy for slow links).
+# Default is auto.
+#
+# @item streaming-video=[off|all|filter]
+# Configure video stream detection.  Default is off.
+#
+# @item agent-mouse=[on|off]
+# Enable/disable passing mouse events via vdagent.  Default is on.
+#
+# @item playback-compression=[on|off]
+# Enable/disable audio stream compression (using celt 0.5.1).  Default is on.
+#
+# @item seamless-migration=[on|off]
+# Enable/disable spice seamless migration. Default is off.
+#
+# @item gl=[on|off]
+# Enable/disable OpenGL context. Default is off.
+#
+# @item rendernode=<file>
+# DRM render node for OpenGL rendering. If not specified, it will pick
+# the first available. (Since 2.9)
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--spice',
+  'data': 'str',                # FIXME QAPIfy qemu_spice_opts
+  'help': [
+"-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]",
+"       [,x509-key-file=<file>][,x509-key-password=<file>]",
+"       [,x509-cert-file=<file>][,x509-cacert-file=<file>]",
+"       [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6|unix]",
+"       [,tls-ciphers=<list>]",
+"       [,tls-channel=[main|display|cursor|inputs|record|playback]]",
+"       [,plaintext-channel=[main|display|cursor|inputs|record|playback]]",
+"       [,sasl][,password=<secret>][,disable-ticketing]",
+"       [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]",
+"       [,jpeg-wan-compression=[auto|never|always]]",
+"       [,zlib-glz-wan-compression=[auto|never|always]]",
+"       [,streaming-video=[off|all|filter]][,disable-copy-paste]",
+"       [,disable-agent-file-xfer][,agent-mouse=[on|off]]",
+"       [,playback-compression=[on|off]][,seamless-migration=[on|off]]",
+"       [,gl=[on|off]][,rendernode=<file>]",
+"   enable spice",
+"   at least one of {port, tls-port} is mandatory"] }
+
+##
+# @--portrait:
+# !texinfo
+# address@hidden
+# Rotate graphical output 90 deg left (only PXA LCD).
+# !end texinfo
+##
+{ 'option': '--portrait',
+  'help': "-portrait       rotate graphical output 90 deg left (only PXA LCD)" 
}
+
+##
+# @--rotate:
+# !texinfo
+# -rotate @address@hidden
+# Rotate graphical output some deg left (only PXA LCD).
+# !end texinfo
+##
+{ 'option': '--rotate',
+  'data': 'str',                # FIXME int or enum
+  'help': "-rotate <deg>   rotate graphical output some deg left (only PXA 
LCD)" }
+
+##
+# @--vga:
+# !texinfo
+# -vga @address@hidden
+# Select type of VGA card to emulate. Valid values for @var{type} are
+# @table @option
+# @item cirrus
+# Cirrus Logic GD5446 Video card. All Windows versions starting from
+# Windows 95 should recognize and use this graphic card. For optimal
+# performances, use 16 bit color depth in the guest and the host OS.
+# (This card was the default before QEMU 2.2)
+# @item std
+# Standard VGA card with Bochs VBE extensions.  If your guest OS
+# supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
+# to use high resolution modes (>= 1280x1024x16) then you should use
+# this option. (This card is the default since QEMU 2.2)
+# @item vmware
+# VMWare SVGA-II compatible adapter. Use it if you have sufficiently
+# recent XFree86/XOrg server or Windows guest with a driver for this
+# card.
+# @item qxl
+# QXL paravirtual graphic card.  It is VGA compatible (including VESA
+# 2.0 VBE support).  Works best with qxl guest drivers installed though.
+# Recommended choice when using the spice protocol.
+# @item tcx
+# (sun4m only) Sun TCX framebuffer. This is the default framebuffer for
+# sun4m machines and offers both 8-bit and 24-bit colour depths at a
+# fixed resolution of 1024x768.
+# @item cg3
+# (sun4m only) Sun cgthree framebuffer. This is a simple 8-bit framebuffer
+# for sun4m machines available in both 1024x768 (OpenBIOS) and 1152x900 (OBP)
+# resolutions aimed at people wishing to run older Solaris versions.
+# @item virtio
+# Virtio VGA card.
+# @item none
+# Disable VGA card.
+# @end table
+# !end texinfo
+##
+# TODO either document retrace=..., or kill it
+{ 'option': '--vga',
+  'data': 'str',                # FIXME QAPIfy select_vgahw()
+  'help': [
+"-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]",
+"                select video card type"] }
+
+##
+# @--full-screen:
+# !texinfo
+# address@hidden
+# Start in full screen.
+# !end texinfo
+##
+{ 'option': '--full-screen',
+  'help': "-full-screen    start in full screen" }
+
+##
+# @--graphical-resolution:
+# !texinfo
+# -g @address@hidden@address@hidden
+# Set the initial graphical resolution and depth (PPC, SPARC only).
+# !end texinfo
+##
+{ 'option': '--graphical-resolution', 'short': 'g',
+  'data': 'str',                # FIXME QAPIfy case 
QAPI_OPTION_KIND_GRAPHICAL_RESOLUTION
+  'help': "-g WxH[xDEPTH]  Set the initial graphical resolution and depth" }
+
+##
+# @--vnc:
+# !texinfo
+# -vnc @var{display}[,@var{option}[,@var{option}[,address@hidden
+# Normally, if QEMU is compiled with graphical window support, it displays
+# output such as guest graphics, guest console, and the QEMU monitor in a
+# window. With this option, you can have QEMU listen on VNC display
+# @var{display} and redirect the VGA display over the VNC session. It is
+# very useful to enable the usb tablet device when using this option
+# (option @option{-device usb-tablet}). When using the VNC display, you
+# must use the @option{-k} parameter to set the keyboard layout if you are
+# not using en-us. Valid syntax for the @var{display} is
+#
+# @table @option
+#
+# @item address@hidden
+#
+# With this option, QEMU will try next available VNC @var{display}s, until the
+# number @var{L}, if the origianlly defined "-vnc @var{display}" is not
+# available, e.g. port address@hidden is already used by another
+# application. By default, to=0.
+#
+# @item @var{host}:@var{d}
+#
+# TCP connections will only be allowed from @var{host} on display @var{d}.
+# By convention the TCP port is address@hidden Optionally, @var{host} can
+# be omitted in which case the server will accept connections from any host.
+#
+# @item unix:@var{path}
+#
+# Connections will be allowed over UNIX domain sockets where @var{path} is the
+# location of a unix socket to listen for connections on.
+#
+# @item none
+#
+# VNC is initialized but not started. The monitor @code{change} command
+# can be used to later start the VNC server.
+#
+# @end table
+#
+# Following the @var{display} value there may be one or more @var{option} flags
+# separated by commas. Valid options are
+#
+# @table @option
+#
+# @item reverse
+#
+# Connect to a listening VNC client via a ``reverse'' connection. The
+# client is specified by the @var{display}. For reverse network
+# connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
+# is a TCP port number, not a display number.
+#
+# @item websocket
+#
+# Opens an additional TCP listening port dedicated to VNC Websocket 
connections.
+# If a bare @var{websocket} option is given, the Websocket port is
+# address@hidden An alternative port can be specified with the
+# syntax @address@hidden
+#
+# If @var{host} is specified connections will only be allowed from this host.
+# It is possible to control the websocket listen address independently, using
+# the syntax @address@hidden:@var{port}.
+#
+# If no TLS credentials are provided, the websocket connection runs in
+# unencrypted mode. If TLS credentials are provided, the websocket connection
+# requires encrypted client connections.
+#
+# @item password
+#
+# Require that password based authentication is used for client connections.
+#
+# The password must be set separately using the @code{set_password} command in
+# the FIXME @@address@hidden@}. The syntax to change your password is:
+# @code{set_password <protocol> <password>} where <protocol> could be either
+# "vnc" or "spice".
+#
+# If you would like to change <protocol> password expiration, you should use
+# @code{expire_password <protocol> <expiration-time>} where expiration time 
could
+# be one of the following options: now, never, +seconds or UNIX time of
+# expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800
+# to make password expire on "Mon Apr 23 12:00:00 EDT 2012" (UNIX time for this
+# date and time).
+#
+# You can also use keywords "now" or "never" for the expiration time to
+# allow <protocol> password to expire immediately or never expire.
+#
+# @item address@hidden
+#
+# Provides the ID of a set of TLS credentials to use to secure the
+# VNC server. They will apply to both the normal VNC server socket
+# and the websocket socket (if enabled). Setting TLS credentials
+# will cause the VNC server socket to enable the VeNCrypt auth
+# mechanism.  The credentials should have been previously created
+# using the @option{-object tls-creds} argument.
+#
+# The @option{tls-creds} parameter obsoletes the @option{tls},
+# @option{x509}, and @option{x509verify} options, and as such
+# it is not permitted to set both new and old type options at
+# the same time.
+#
+# @item tls
+#
+# Require that client use TLS when communicating with the VNC server. This
+# uses anonymous TLS credentials so is susceptible to a man-in-the-middle
+# attack. It is recommended that this option be combined with either the
+# @option{x509} or @option{x509verify} options.
+#
+# This option is now deprecated in favor of using the @option{tls-creds}
+# argument.
+#
+# @item address@hidden/path/to/certificate/dir}
+#
+# Valid if @option{tls} is specified. Require that x509 credentials are used
+# for negotiating the TLS session. The server will send its x509 certificate
+# to the client. It is recommended that a password be set on the VNC server
+# to provide authentication of the client when this is used. The path following
+# this option specifies where the x509 certificates are to be loaded from.
+# See the FIXME @@address@hidden@} section for details on generating 
certificates.
+#
+# This option is now deprecated in favour of using the @option{tls-creds}
+# argument.
+#
+# @item address@hidden/path/to/certificate/dir}
+#
+# Valid if @option{tls} is specified. Require that x509 credentials are used
+# for negotiating the TLS session. The server will send its x509 certificate
+# to the client, and request that the client send its own x509 certificate.
+# The server will validate the client's certificate against the CA certificate,
+# and reject clients when validation fails. If the certificate authority is
+# trusted, this is a sufficient authentication mechanism. You may still wish
+# to set a password on the VNC server as a second authentication layer. The
+# path following this option specifies where the x509 certificates are to
+# be loaded from. See the FIXME @@address@hidden@} section for details on 
generating
+# certificates.
+#
+# This option is now deprecated in favour of using the @option{tls-creds}
+# argument.
+#
+# @item sasl
+#
+# Require that the client use SASL to authenticate with the VNC server.
+# The exact choice of authentication method used is controlled from the
+# system / user's SASL configuration file for the 'qemu' service. This
+# is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
+# unprivileged user, an environment variable SASL_CONF_PATH can be used
+# to make it search alternate locations for the service config.
+# While some SASL auth methods can also provide data encryption (eg GSSAPI),
+# it is recommended that SASL always be combined with the 'tls' and
+# 'x509' settings to enable use of SSL and server certificates. This
+# ensures a data encryption preventing compromise of authentication
+# credentials. See the FIXME @@address@hidden@} section for details on using
+# SASL authentication.
+#
+# @item acl
+#
+# Turn on access control lists for checking of the x509 client certificate
+# and SASL party. For x509 certs, the ACL check is made against the
+# certificate's distinguished name. This is something that looks like
+# @code{C=GB,O=ACME,L=Boston,CN=bob}. For SASL party, the ACL check is
+# made against the username, which depending on the SASL plugin, may
+# include a realm component, eg @code{bob} or @code{bob@@EXAMPLE.COM}.
+# When the @option{acl} flag is set, the initial access list will be
+# empty, with a @code{deny} policy. Thus no one will be allowed to
+# use the VNC server until the ACLs have been loaded. This can be
+# achieved using the @code{acl} monitor command.
+#
+# @item lossy
+#
+# Enable lossy compression methods (gradient, JPEG, ...). If this
+# option is set, VNC client may receive lossy framebuffer updates
+# depending on its encoding settings. Enabling this option can save
+# a lot of bandwidth at the expense of quality.
+#
+# @item non-adaptive
+#
+# Disable adaptive encodings. Adaptive encodings are enabled by default.
+# An adaptive encoding will try to detect frequently updated screen regions,
+# and send updates in these regions using a lossy encoding (like JPEG).
+# This can be really helpful to save bandwidth when playing videos. Disabling
+# adaptive encodings restores the original static behavior of encodings
+# like Tight.
+#
+# @item share=[allow-exclusive|force-shared|ignore]
+#
+# Set display sharing policy.  'allow-exclusive' allows clients to ask
+# for exclusive access.  As suggested by the rfb spec this is
+# implemented by dropping other connections.  Connecting multiple
+# clients in parallel requires all clients asking for a shared session
+# (vncviewer: -shared switch).  This is the default.  'force-shared'
+# disables exclusive client access.  Useful for shared desktop sessions,
+# where you don't want someone forgetting specify -shared disconnect
+# everybody else.  'ignore' completely ignores the shared flag and
+# allows everybody connect unconditionally.  Doesn't conform to the rfb
+# spec but is traditional QEMU behavior.
+#
+# @item key-delay-ms
+#
+# Set keyboard delay, for key down and key up events, in milliseconds.
+# Default is 10.  Keyboards are low-bandwidth devices, so this slowdown
+# can help the device and guest to keep up and not lose events in case
+# events are arriving in bulk.  Possible causes for the latter are flaky
+# network connections, or scripts for automated testing.
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--vnc',
+  'data': 'str',                # FIXME QAPIfy qemu_vnc_opts, vnc_parse()
+  'help': "-vnc <display>  shorthand for -display vnc=<display>" }
+
+##
+# == i386 target only
+# TODO make conditional
+##
+
+##
+# @--win2k-hack:
+# !texinfo
+# address@hidden
+# Use it when installing Windows 2000 to avoid a disk full bug. After
+# Windows 2000 is installed, you no longer need this option (this option
+# slows down the IDE transfers).
+# !end texinfo
+##
+{ 'option': '--win2k-hack',
+  'help': "-win2k-hack     use it when installing Windows 2000 to avoid a disk 
full bug" }
+
+##
+# @--rtc-td-hack:
+##
+# TODO deprecate
+{ 'option': '--rtc-td-hack',
+  'help': null }
+
+##
+# @--no-fd-bootchk:
+# !texinfo
+# address@hidden
+# Disable boot signature checking for floppy disks in BIOS. May
+# be needed to boot from old floppy disks.
+# !end texinfo
+##
+{ 'option': '--no-fd-bootchk',
+  'help': "-no-fd-bootchk  disable boot signature checking for floppy disks" }
+
+##
+# @--no-acpi:
+# !texinfo
+# address@hidden
+# Disable ACPI (Advanced Configuration and Power Interface) support. Use
+# it if your guest OS complains about ACPI problems (PC target machine
+# only).
+# !end texinfo
+##
+{ 'option': '--no-acpi',
+  'help': "-no-acpi        disable ACPI" }
+
+##
+# @--no-hpet:
+# !texinfo
+# address@hidden
+# Disable HPET support.
+# !end texinfo
+##
+{ 'option': '--no-hpet',
+  'help': "-no-hpet        disable HPET" }
+
+##
+# @--acpitable:
+# !texinfo
+# -acpitable 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden:@address@hidden
+# Add ACPI table with specified header fields and context from specified files.
+# For file=, take whole ACPI table from the specified files, including all
+# ACPI headers (possible overridden by other options).
+# For data=, only data
+# portion of the table is used, all header information is specified in the
+# command line.
+# If a SLIC table is supplied to QEMU, then the SLIC's oem_id and oem_table_id
+# fields will override the same in the RSDT and the FADT (a.k.a. FACP), in 
order
+# to ensure the field matches required by the Microsoft SLIC spec and the ACPI
+# spec.
+# !end texinfo
+##
+{ 'option': '--acpitable',
+  'data': 'str',                # FIXME QAPIfy qemu_acpi_opts: AcpiTableOptions
+  'help': [
+"-acpitable 
[sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]",
+"                ACPI table description"] }
+
+##
+# @--smbios:
+# !texinfo
+# -smbios address@hidden@*
+# Load SMBIOS entry from binary file.
+#
+# -smbios 
type=0[,address@hidden,address@hidden,address@hidden,address@hidden,uefi=on|address@hidden
+# Specify SMBIOS type 0 fields
+#
+# -smbios 
type=1[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Specify SMBIOS type 1 fields
+#
+# -smbios 
type=2[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Specify SMBIOS type 2 fields
+#
+# -smbios 
type=3[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Specify SMBIOS type 3 fields
+#
+# -smbios 
type=4[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Specify SMBIOS type 4 fields
+#
+# -smbios 
type=17[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Specify SMBIOS type 17 fields
+# !end texinfo
+##
+{ 'option': '--smbios',
+  'data': 'str',                # FIXME QAPIfy qemu_smbios_opts
+  'help': [
+"-smbios file=binary",
+"                load SMBIOS entry from binary file",
+"-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]",
+"              [,uefi=on|off]",
+"                specify SMBIOS type 0 fields",
+"-smbios type=1[,manufacturer=str][,product=str][,version=str][,serial=str]",
+"              [,uuid=uuid][,sku=str][,family=str]",
+"                specify SMBIOS type 1 fields",
+"-smbios type=2[,manufacturer=str][,product=str][,version=str][,serial=str]",
+"              [,asset=str][,location=str]",
+"                specify SMBIOS type 2 fields",
+"-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str]",
+"              [,sku=str]",
+"                specify SMBIOS type 3 fields",
+"-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]",
+"              [,asset=str][,part=str]",
+"                specify SMBIOS type 4 fields",
+"-smbios type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]",
+"               [,asset=str][,part=str][,speed=%d]",
+"                specify SMBIOS type 17 fields"] }
+
+##
+# == Network options
+##
+
+##
+# @--tftp:
+##
+# TODO deprecate
+{ 'option': '--tftp',
+  'data': 'str',
+  'help': null }
+
+##
+# @--bootp:
+##
+# TODO deprecate
+{ 'option': '--bootp',
+  'data': 'str',
+  'help': null }
+
+##
+# @--redir:
+##
+# TODO deprecate
+{ 'option': '--redir',
+  'data': 'str',                # FIXME QAPIfy slirp_hostfwd()
+  'help': null }
+
+##
+# @--smb:
+##
+# TODO deprecate
+{ 'option': '--smb',
+  'data': 'str',
+  'help': null }
+
+##
+# @--netdev:
+##
+{ 'option': '--netdev',
+  'data': 'str',                # FIXME QAPIfy qemu_netdev_opts
+  'help': [
+#ifdef CONFIG_SLIRP
+"-netdev user,id=str[,ipv4[=on|off]][,net=addr[/mask]][,host=addr]",
+"         [,ipv6[=on|off]][,ipv6-net=addr[/int]][,ipv6-host=addr]",
+"         [,restrict=on|off][,hostname=host][,dhcpstart=addr]",
+"         [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,tftp=dir]",
+"         [,bootfile=f][,hostfwd=rule][,guestfwd=rule]",
+#ifndef _WIN32
+#"         [,smb=dir[,smbserver=addr]]",
+#endif
+"                configure a user mode network backend with ID 'str',",
+"                its DHCP server and optional services",
+#endif
+#ifdef _WIN32
+#"-netdev tap,id=str,ifname=name",
+#"                configure a host TAP network backend with ID 'str'",
+#else
+"-netdev 
tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile]",
+"         
[,br=bridge][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off]",
+"         [,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n]",
+"         [,poll-us=n]",
+"                configure a host TAP network backend with ID 'str'",
+"                connected to a bridge (default=FIXME)",
+"                use network scripts 'file' (default=FIXME)",
+"                to configure it and 'dfile' (default=FIXME)",
+"                to deconfigure it",
+"                use '[down]script=no' to disable script execution",
+"                use network helper 'helper' (default=FIXME) to",
+"                configure it",
+"                use 'fd=h' to connect to an already opened TAP interface",
+"                use 'fds=x:y:...:z' to connect to already opened multiqueue 
capable TAP interfaces",
+"                use 'sndbuf=nbytes' to limit the size of the send buffer 
(the",
+"                default is disabled 'sndbuf=0' to enable flow control set 
'sndbuf=1048576')",
+"                use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag",
+"                use vnet_hdr=on to make the lack of IFF_VNET_HDR support an 
error condition",
+"                use vhost=on to enable experimental in kernel accelerator",
+"                    (only has effect for virtio guests which use MSIX)",
+"                use vhostforce=on to force vhost on for non-MSIX virtio 
guests",
+"                use 'vhostfd=h' to connect to an already opened vhost net 
device",
+"                use 'vhostfds=x:y:...:z to connect to multiple already opened 
vhost net devices",
+"                use 'queues=n' to specify the number of queues to be created 
for multiqueue TAP",
+"                use 'poll-us=n' to speciy the maximum number of microseconds 
that could be",
+"                spent on busy polling for vhost net",
+"-netdev bridge,id=str[,br=bridge][,helper=helper]",
+"                configure a host TAP network backend with ID 'str' that is",
+"                connected to a bridge (default=FIXME)",
+"                using the program 'helper (default=FIXME)",
+#endif
+#ifdef __linux__
+"-netdev 
l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport]",
+"         
[,rxsession=rxsession],txsession=txsession[,ipv6=on/off][,udp=on/off]",
+"         [,cookie64=on/off][,counter][,pincounter][,txcookie=txcookie]",
+"         [,rxcookie=rxcookie][,offset=offset]",
+"                configure a network backend with ID 'str' connected to",
+"                an Ethernet over L2TPv3 pseudowire.",
+"                Linux kernel 3.3+ as well as most routers can talk",
+"                L2TPv3. This transport allows connecting a VM to a VM,",
+"                VM to a router and even VM to Host. It is a nearly-universal",
+"                standard (RFC3391). Note - this implementation uses static",
+"                pre-configured tunnels (same as the Linux kernel).",
+"                use 'src=' to specify source address",
+"                use 'dst=' to specify destination address",
+"                use 'udp=on' to specify udp encapsulation",
+"                use 'srcport=' to specify source udp port",
+"                use 'dstport=' to specify destination udp port",
+"                use 'ipv6=on' to force v6",
+"                L2TPv3 uses cookies to prevent misconfiguration as",
+"                well as a weak security measure",
+"                use 'rxcookie=0x012345678' to specify a rxcookie",
+"                use 'txcookie=0x012345678' to specify a txcookie",
+"                use 'cookie64=on' to set cookie size to 64 bit, otherwise 32",
+"                use 'counter=off' to force a 'cut-down' L2TPv3 with no 
counter",
+"                use 'pincounter=on' to work around broken counter handling in 
peer",
+"                use 'offset=X' to add an extra offset between header and 
data",
+#endif
+"-netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port]",
+"                configure a network backend to connect to another network",
+"                using a socket connection",
+"-netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]]",
+"                configure a network backend to connect to a multicast maddr 
and port",
+"                use 'localaddr=addr' to specify the host address to send 
packets from",
+"-netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port]",
+"                configure a network backend to connect to another network",
+"                using an UDP tunnel",
+#ifdef CONFIG_VDE
+"-netdev 
vde,id=str[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]",
+"                configure a network backend to connect to port 'n' of a vde 
switch",
+"                running on host and listening for incoming connections on 
'socketpath'.",
+"                Use group 'groupname' and mode 'octalmode' to change default",
+"                ownership and permissions for communication port.",
+#endif
+#ifdef CONFIG_NETMAP
+"-netdev netmap,id=str,ifname=name[,devname=nmname]",
+"                attach to the existing netmap-enabled network interface 
'name', or to a",
+"                VALE port (created on the fly) called 'name' ('nmname' is 
name of the ",
+"                netmap device, defaults to '/dev/netmap')",
+#endif
+"-netdev vhost-user,id=str,chardev=dev[,vhostforce=on|off]",
+"                configure a vhost-user network, backed by a chardev 'dev'",
+"-netdev hubport,id=str,hubid=n",
+"                configure a hub port on QEMU VLAN 'n'"] }
+
+##
+# @--net:
+# !texinfo
+# -net nic[,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden@*
+# Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
+# = 0 is the default). The NIC is an e1000 by default on the PC
+# target. Optionally, the MAC address can be changed to @var{mac}, the
+# device address set to @var{addr} (PCI cards only),
+# and a @var{name} can be assigned for use in monitor commands.
+# Optionally, for PCI cards, you can specify the number @var{v} of MSI-X 
vectors
+# that the card should have; this option currently only affects virtio cards; 
set
+# @var{v} = 0 to disable MSI-X. If no @option{-net} option is specified, a 
single
+# NIC is created.  QEMU can emulate several different models of network card.
+# Valid values for @var{type} are
+# @code{virtio}, @code{i82551}, @code{i82557b}, @code{i82559er},
+# @code{ne2k_pci}, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
+# @code{e1000}, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
+# Not all devices are supported on all targets.  Use @code{-net nic,model=help}
+# for a list of available devices for your target.
+#
+# -netdev user,address@hidden,@var{option}][,@var{option}][,address@hidden
+# -net user[,@var{option}][,@var{option}][,address@hidden
+# Use the user mode network stack which requires no administrator
+# privilege to run. Valid options are:
+#
+# @table @option
+# @item address@hidden
+# Connect user mode stack to VLAN @var{n} (@var{n} = 0 is the default).
+#
+# @item address@hidden
+# @itemx address@hidden
+# Assign symbolic name for use in monitor commands.
+#
+# @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must
+# be enabled.  If neither is specified both protocols are enabled.
+#
+# @item address@hidden/@var{mask}]
+# Set IP network address the guest will see. Optionally specify the netmask,
+# either in the form a.b.c.d or as number of valid top-most bits. Default is
+# 10.0.2.0/24.
+#
+# @item address@hidden
+# Specify the guest-visible address of the host. Default is the 2nd IP in the
+# guest network, i.e. x.x.x.2.
+#
+# @item address@hidden/@var{int}]
+# Set IPv6 network address the guest will see (default is fec0::/64). The
+# network prefix is given in the usual hexadecimal IPv6 address
+# notation. The prefix size is optional, and is given as the number of
+# valid top-most bits (default is 64).
+#
+# @item address@hidden
+# Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 
in
+# the guest network, i.e. xxxx::2.
+#
+# @item restrict=on|off
+# If this option is enabled, the guest will be isolated, i.e. it will not be
+# able to contact the host and no guest IP packets will be routed over the host
+# to the outside. This option does not affect any explicitly set forwarding 
rules.
+#
+# @item address@hidden
+# Specifies the client hostname reported by the built-in DHCP server.
+#
+# @item address@hidden
+# Specify the first of the 16 IPs the built-in DHCP server can assign. Default
+# is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
+#
+# @item address@hidden
+# Specify the guest-visible address of the virtual nameserver. The address must
+# be different from the host address. Default is the 3rd IP in the guest 
network,
+# i.e. x.x.x.3.
+#
+# @item address@hidden
+# Specify the guest-visible address of the IPv6 virtual nameserver. The address
+# must be different from the host address. Default is the 3rd IP in the guest
+# network, i.e. xxxx::3.
+#
+# @item address@hidden
+# Provides an entry for the domain-search list sent by the built-in
+# DHCP server. More than one domain suffix can be transmitted by specifying
+# this option multiple times. If supported, this will cause the guest to
+# automatically try to append the given domain suffix(es) in case a domain name
+# can not be resolved.
+#
+# Example:
+# @example
+# qemu -net user,dnssearch=mgmt.example.org,dnssearch=example.org [...]
+# @end example
+#
+# @item address@hidden
+# When using the user mode network stack, activate a built-in TFTP
+# server. The files in @var{dir} will be exposed as the root of a TFTP server.
+# The TFTP client on the guest must be configured in binary mode (use the 
command
+# @code{bin} of the Unix TFTP client).
+#
+# @item address@hidden
+# When using the user mode network stack, broadcast @var{file} as the BOOTP
+# filename. In conjunction with @option{tftp}, this can be used to network boot
+# a guest from a local directory.
+#
+# Example (using pxelinux):
+# @example
+# qemu-system-i386 -hda linux.img -boot n -net 
user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
+# @end example
+#
+# @item address@hidden,address@hidden
+# When using the user mode network stack, activate a built-in SMB
+# server so that Windows OSes can access to the host files in @address@hidden
+# transparently. The IP address of the SMB server can be set to @var{addr}. By
+# default the 4th IP in the guest network is used, i.e. x.x.x.4.
+#
+# In the guest Windows OS, the line:
+# @example
+# 10.0.2.4 smbserver
+# @end example
+# must be added in the file @file{C:\WINDOWS\LMHOSTS} (for windows 9x/Me)
+# or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000).
+#
+# Then @address@hidden can be accessed in @file{\\smbserver\qemu}.
+#
+# Note that a SAMBA server must be installed on the host OS.
+# QEMU was tested successfully with smbd versions from Red Hat 9,
+# Fedora Core 3 and OpenSUSE 11.x.
+#
+# @item hostfwd=[tcp|udp]:address@hidden:@address@hidden:@var{guestport}
+# Redirect incoming TCP or UDP connections to the host port @var{hostport} to
+# the guest IP address @var{guestaddr} on guest port @var{guestport}. If
+# @var{guestaddr} is not specified, its value is x.x.x.15 (default first 
address
+# given by the built-in DHCP server). By specifying @var{hostaddr}, the rule 
can
+# be bound to a specific host interface. If no connection type is set, TCP is
+# used. This option can be given multiple times.
+#
+# For example, to redirect host X11 connection from screen 1 to guest
+# screen 0, use the following:
+#
+# @example
+# # on the host
+# qemu-system-i386 -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
+# # this host xterm should open in the guest X11 server
+# xterm -display :1
+# @end example
+#
+# To redirect telnet connections from host port 5555 to telnet port on
+# the guest, use the following:
+#
+# @example
+# # on the host
+# qemu-system-i386 -net user,hostfwd=tcp::5555-:23 [...]
+# telnet localhost 5555
+# @end example
+#
+# Then when you use on the host @code{telnet localhost 5555}, you
+# connect to the guest telnet server.
+#
+# @item guestfwd=[tcp]:@var{server}:@address@hidden
+# @itemx guestfwd=[tcp]:@var{server}:@address@hidden:command}
+# Forward guest TCP connections to the IP address @var{server} on port 
@var{port}
+# to the character device @var{dev} or to a program executed by 
@var{cmd:command}
+# which gets spawned for each connection. This option can be given multiple 
times.
+#
+# You can either use a chardev directly and have that one used throughout 
QEMU's
+# lifetime, like in the following example:
+#
+# @example
+# # open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
+# # the guest accesses it
+# qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
+# @end example
+#
+# Or you can execute a command on every TCP connection established by the 
guest,
+# so that QEMU behaves similar to an inetd process for that virtual server:
+#
+# @example
+# # call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
+# # and connect the TCP stream to its stdin/stdout
+# qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
+# @end example
+#
+# @end table
+#
+# Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
+# processed and applied to -net user. Mixing them with the new configuration
+# syntax gives undefined results. Their use for new applications is discouraged
+# as they will be removed from future versions.
+#
+# -netdev 
tap,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# -net 
tap[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Connect the host TAP network interface @var{name} to VLAN @var{n}.
+#
+# Use the network script @var{file} to configure it and the network script
+# @var{dfile} to deconfigure it. If @var{name} is not provided, the OS
+# automatically provides one. The default network configure script is
+# @file{/etc/qemu-ifup} and the default network deconfigure script is
+# @file{/etc/qemu-ifdown}. Use @option{script=no} or @option{downscript=no}
+# to disable script execution.
+#
+# If running QEMU as an unprivileged user, use the network helper
+# @var{helper} to configure the TAP interface and attach it to the bridge.
+# The default network helper executable is @file{/path/to/qemu-bridge-helper}
+# and the default bridge device is @file{br0}.
+#
+# @address@hidden can be used to specify the handle of an already
+# opened host TAP interface.
+#
+# Examples:
+#
+# @example
+# #launch a QEMU instance with the default network script
+# qemu-system-i386 linux.img -net nic -net tap
+# @end example
+#
+# @example
+# #launch a QEMU instance with two NICs, each one connected
+# #to a TAP device
+# qemu-system-i386 linux.img \
+#                  -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
+#                  -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
+# @end example
+#
+# @example
+# #launch a QEMU instance with the default network helper to
+# #connect a TAP device to bridge br0
+# qemu-system-i386 linux.img \
+#                  -net nic -net tap,"helper=/path/to/qemu-bridge-helper"
+# @end example
+#
+# -netdev bridge,address@hidden,address@hidden,address@hidden@*
+# -net bridge[,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Connect a host TAP network interface to a host bridge device.
+#
+# Use the network helper @var{helper} to configure the TAP interface and
+# attach it to the bridge. The default network helper executable is
+# @file{/path/to/qemu-bridge-helper} and the default bridge
+# device is @file{br0}.
+#
+# Examples:
+#
+# @example
+# #launch a QEMU instance with the default network helper to
+# #connect a TAP device to bridge br0
+# qemu-system-i386 linux.img -net bridge -net nic,model=virtio
+# @end example
+#
+# @example
+# #launch a QEMU instance with the default network helper to
+# #connect a TAP device to bridge qemubr0
+# qemu-system-i386 linux.img -net bridge,br=qemubr0 -net nic,model=virtio
+# @end example
+#
+# -netdev 
socket,address@hidden,address@hidden,address@hidden:@var{port}][,address@hidden:@address@hidden
+# -net socket[,address@hidden,address@hidden,address@hidden 
[,address@hidden:@var{port}][,address@hidden:@address@hidden
+#
+# Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
+# machine using a TCP socket connection. If @option{listen} is
+# specified, QEMU waits for incoming connections on @var{port}
+# (@var{host} is optional). @option{connect} is used to connect to
+# another QEMU instance using the @option{listen} option. @address@hidden
+# specifies an already opened TCP socket.
+#
+# Example:
+# @example
+# # launch a first QEMU instance
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:56 \
+#                  -net socket,listen=:1234
+# # connect the VLAN 0 of this instance to the VLAN 0
+# # of the first instance
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:57 \
+#                  -net socket,connect=127.0.0.1:1234
+# @end example
+#
+# -netdev 
socket,address@hidden,address@hidden,address@hidden:@var{port}[,address@hidden@*
+# -net 
socket[,address@hidden,address@hidden,address@hidden,address@hidden:@var{port}[,address@hidden@*
+#
+# Create a VLAN @var{n} shared with another QEMU virtual
+# machines using a UDP multicast socket, effectively making a bus for
+# every QEMU with same multicast address @var{maddr} and @var{port}.
+# NOTES:
+# @enumerate
+# @item
+# Several QEMU can be running on different hosts and share same bus (assuming
+# correct multicast setup for these hosts).
+# @item
+# mcast support is compatible with User Mode Linux (argument @address@hidden), 
see
+# @url{http://user-mode-linux.sf.net}.
+# @item
+# Use @option{fd=h} to specify an already opened UDP multicast socket.
+# @end enumerate
+#
+# Example:
+# @example
+# # launch one QEMU instance
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:56 \
+#                  -net socket,mcast=230.0.0.1:1234
+# # launch another QEMU instance on same "bus"
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:57 \
+#                  -net socket,mcast=230.0.0.1:1234
+# # launch yet another QEMU instance on same "bus"
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:58 \
+#                  -net socket,mcast=230.0.0.1:1234
+# @end example
+#
+# Example (User Mode Linux compat.):
+# @example
+# # launch QEMU instance (note mcast address selected
+# # is UML's default)
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:56 \
+#                  -net socket,mcast=239.192.168.1:1102
+# # launch UML
+# /path/to/linux ubd0=/path/to/root_fs eth0=mcast
+# @end example
+#
+# Example (send packets from host's 1.2.3.4):
+# @example
+# qemu-system-i386 linux.img \
+#                  -net nic,macaddr=52:54:00:12:34:56 \
+#                  -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
+# @end example
+#
+# -netdev 
l2tpv3,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,ipv6][,udp][,cookie64][,counter][,pincounter][,address@hidden,address@hidden,address@hidden@*
+# -net 
l2tpv3[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,ipv6][,udp][,cookie64][,counter][,pincounter][,address@hidden,address@hidden,address@hidden@*
+# Connect VLAN @var{n} to L2TPv3 pseudowire. L2TPv3 (RFC3391) is a popular
+# protocol to transport Ethernet (and other Layer 2) data frames between
+# two systems. It is present in routers, firewalls and the Linux kernel
+# (from version 3.3 onwards).
+#
+# This transport allows a VM to communicate to another VM, router or firewall 
directly.
+#
+# @table @option
+# @item address@hidden
+#     source address (mandatory)
+# @item address@hidden
+#     destination address (mandatory)
+# @item udp
+#     select udp encapsulation (default is ip).
+# @item address@hidden
+#     source udp port.
+# @item address@hidden
+#     destination udp port.
+# @item ipv6
+#     force v6, otherwise defaults to v4.
+# @item address@hidden
+# @itemx address@hidden
+#     Cookies are a weak form of security in the l2tpv3 specification.
+# Their function is mostly to prevent misconfiguration. By default they are 32
+# bit.
+# @item cookie64
+#     Set cookie size to 64 bit instead of the default 32
+# @item counter=off
+#     Force a 'cut-down' L2TPv3 with no counter as in
+# draft-mkonstan-l2tpext-keyed-ipv6-tunnel-00
+# @item pincounter=on
+#     Work around broken counter handling in peer. This may also help on
+# networks which have packet reorder.
+# @item address@hidden
+#     Add an extra offset between header and data
+# @end table
+#
+# For example, to attach a VM running on host 4.3.2.1 via L2TPv3 to the bridge 
br-lan
+# on the remote Linux host 1.2.3.4:
+# @example
+# # Setup tunnel on linux host using raw ip as encapsulation
+# # on 1.2.3.4
+# ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 
\
+#     encap udp udp_sport 16384 udp_dport 16384
+# ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \
+#     0xFFFFFFFF peer_session_id 0xFFFFFFFF
+# ifconfig vmtunnel0 mtu 1500
+# ifconfig vmtunnel0 up
+# brctl addif br-lan vmtunnel0
+#
+#
+# # on 4.3.2.1
+# # launch QEMU instance - if your network has reorder or is very lossy add 
,pincounter
+#
+# qemu-system-i386 linux.img -net nic -net 
l2tpv3,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter
+#
+#
+# @end example
+#
+# -netdev 
vde,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden@*
+# -net vde[,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden@*
+# Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
+# listening for incoming connections on @var{socketpath}. Use GROUP 
@var{groupname}
+# and MODE @var{octalmode} to change default ownership and permissions for
+# communication port. This option is only available if QEMU has been compiled
+# with vde support enabled.
+#
+# Example:
+# @example
+# # launch vde switch
+# vde_switch -F -sock /tmp/myswitch
+# # launch QEMU instance
+# qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
+# @end example
+#
+# -netdev hubport,address@hidden,address@hidden@*
+#
+# Create a hub port on QEMU "vlan" @var{hubid}.
+#
+# The hubport netdev lets you connect a NIC to a QEMU "vlan" instead of a 
single
+# netdev.  @code{-net} and @code{-device} with parameter @option{vlan} create 
the
+# required hub automatically.
+#
+# -netdev vhost-user,address@hidden,vhostforce=on|off][,address@hidden
+#
+# Establish a vhost-user netdev, backed by a chardev @var{id}. The chardev 
should
+# be a unix domain socket backed one. The vhost-user uses a specifically 
defined
+# protocol to pass vhost ioctl replacement messages to an application on the 
other
+# end of the socket. On non-MSIX guests, the feature can be forced with
+# @var{vhostforce}. Use 'address@hidden' to specify the number of queues to
+# be created for multiqueue vhost-user.
+#
+# Example:
+# @example
+# qemu -m 512 -object 
memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
+#      -numa node,memdev=mem \
+#      -chardev socket,id=chr0,path=/path/to/socket \
+#      -netdev type=vhost-user,id=net0,chardev=chr0 \
+#      -device virtio-net-pci,netdev=net0
+# @end example
+#
+# -net dump[,address@hidden,address@hidden,address@hidden@*
+# Dump network traffic on VLAN @var{n} to file @var{file} 
(@file{qemu-vlan0.pcap} by default).
+# At most @var{len} bytes (64k by default) per packet are stored. The file 
format is
+# libpcap, so it can be analyzed with tools such as tcpdump or Wireshark.
+# Note: For devices created with '-netdev', use '-object filter-dump,...' 
instead.
+#
+# -net address@hidden
+# Indicate that no network devices should be configured. It is used to
+# override the default configuration (@option{-net nic -net user}) which
+# is activated if no @option{-net} options are provided.
+# !end texinfo
+##
+{ 'option': '--net',
+  'data': 'str',                # FIXME QAPIfy
+  'help': [
+"-net 
nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]",
+"                old way to create a new NIC and connect it to VLAN 'n'",
+"                (use the '-device devtype,netdev=str' option if possible 
instead)",
+"-net dump[,vlan=n][,file=f][,len=n]",
+"                dump traffic on vlan 'n' to file 'f' (max n bytes per 
packet)",
+"-net none       use it alone to have zero network devices. If no -net option",
+"                is provided, the default is '-net nic -net user'",
+"-net [user|tap|bridge|vde|netmap|socket][,vlan=n][,option][,option][,...]",
+# FIXME conditionals ^^^
+"                old way to initialize a host network interface",
+"                (use the -netdev option if possible instead)" ] }
+
+##
+# == Character device options
+##
+
+##
+# @--chardev:
+# !texinfo
+# The general form of a character device option is:
+# -chardev @var{backend} ,address@hidden [,mux=on|off] [,@address@hidden
+# Backend is one of:
+# @option{null},
+# @option{socket},
+# @option{udp},
+# @option{msmouse},
+# @option{vc},
+# @option{ringbuf},
+# @option{file},
+# @option{pipe},
+# @option{console},
+# @option{serial},
+# @option{pty},
+# @option{stdio},
+# @option{braille},
+# @option{tty},
+# @option{parallel},
+# @option{parport},
+# @option{spicevmc}.
+# @option{spiceport}.
+# The specific backend will determine the applicable options.
+#
+# Use @code{-chardev help} to print all available chardev backend types.
+#
+# All devices must have an id, which can be any string up to 127 characters 
long.
+# It is used to uniquely identify this device in other command line directives.
+#
+# A character device may be used in multiplexing mode by multiple front-ends.
+# Specify @option{mux=on} to enable this mode.
+# A multiplexer is a "1:N" device, and here the "1" end is your specified 
chardev
+# backend, and the "N" end is the various parts of QEMU that can talk to a 
chardev.
+# If you create a chardev with @option{id=myid} and @option{mux=on}, QEMU will
+# create a multiplexer with your specified ID, and you can then configure 
multiple
+# front ends to use that chardev ID for their input/output. Up to four 
different
+# front ends can be connected to a single multiplexed chardev. (Without
+# multiplexing enabled, a chardev can only be used by a single front end.)
+# For instance you could use this to allow a single stdio chardev to be used by
+# two serial ports and the QEMU monitor:
+#
+# @example
+# -chardev stdio,mux=on,id=char0 \
+# -mon chardev=char0,mode=readline \
+# -serial chardev:char0 \
+# -serial chardev:char0
+# @end example
+#
+# You can have more than one multiplexer in a system configuration; for 
instance
+# you could have a TCP port multiplexed between UART 0 and UART 1, and stdio
+# multiplexed between the QEMU monitor and a parallel port:
+#
+# @example
+# -chardev stdio,mux=on,id=char0 \
+# -mon chardev=char0,mode=readline \
+# -parallel chardev:char0 \
+# -chardev tcp,...,mux=on,id=char1 \
+# -serial chardev:char1 \
+# -serial chardev:char1
+# @end example
+#
+# When you're using a multiplexed character device, some escape sequences are
+# interpreted in the input. FIXME @@address@hidden, Keys in the character 
backend
+# address@hidden
+#
+# Note that some other command line options may implicitly create multiplexed
+# character backends; for instance @option{-serial mon:stdio} creates a
+# multiplexed stdio backend connected to the serial port and the QEMU monitor,
+# and @option{-nographic} also multiplexes the console and the monitor to
+# stdio.
+#
+# There is currently no support for multiplexing in the other direction
+# (where a single QEMU front end takes input and output from multiple 
chardevs).
+#
+# Every backend supports the @option{logfile} option, which supplies the path
+# to a file to record all data transmitted via the backend. The 
@option{logappend}
+# option controls whether the log file will be truncated or appended to when
+# opened.
+#
+# The available backends are:
+#
+# @table @option
+# @item -chardev null ,address@hidden
+# A void device. This device will not emit any data, and will drop any data it
+# receives. The null backend does not take any options.
+#
+# @item -chardev socket ,address@hidden address@hidden options} or @var{unix 
options}] [,server] [,nowait] [,telnet] [,address@hidden [,address@hidden
+#
+# Create a two-way stream socket, which can be either a TCP or a unix socket. A
+# unix socket will be created if @option{path} is specified. Behaviour is
+# undefined if TCP options are specified for a unix socket.
+#
+# @option{server} specifies that the socket shall be a listening socket.
+#
+# @option{nowait} specifies that QEMU should not block waiting for a client to
+# connect to a listening socket.
+#
+# @option{telnet} specifies that traffic on the socket should interpret telnet
+# escape sequences.
+#
+# @option{reconnect} sets the timeout for reconnecting on non-server sockets 
when
+# the remote end goes away.  qemu will delay this many seconds and then attempt
+# to reconnect.  Zero disables reconnecting, and is the default.
+#
+# @option{tls-creds} requests enablement of the TLS protocol for encryption,
+# and specifies the id of the TLS credentials to use for the handshake. The
+# credentials must be previously created with the @option{-object tls-creds}
+# argument.
+#
+# TCP and unix socket options are given below:
+#
+# @table @option
+#
+# @item TCP options: address@hidden [,address@hidden [,address@hidden [,ipv4] 
[,ipv6] [,nodelay]
+#
+# @option{host} for a listening socket specifies the local address to be bound.
+# For a connecting socket species the remote host to connect to. @option{host} 
is
+# optional for listening sockets. If not specified it defaults to 
@code{0.0.0.0}.
+#
+# @option{port} for a listening socket specifies the local port to be bound. 
For a
+# connecting socket specifies the port on the remote host to connect to.
+# @option{port} can be given as either a port number or a service name.
+# @option{port} is required.
+#
+# @option{to} is only relevant to listening sockets. If it is specified, and
+# @option{port} cannot be bound, QEMU will attempt to bind to subsequent ports 
up
+# to and including @option{to} until it succeeds. @option{to} must be specified
+# as a port number.
+#
+# @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be 
used.
+# If neither is specified the socket may use either protocol.
+#
+# @option{nodelay} disables the Nagle algorithm.
+#
+# @item unix options: address@hidden
+#
+# @option{path} specifies the local path of the unix socket. @option{path} is
+# required.
+#
+# @end table
+#
+# @item -chardev udp ,address@hidden [,address@hidden ,address@hidden 
[,address@hidden [,address@hidden [,ipv4] [,ipv6]
+#
+# Sends all traffic from the guest to a remote host over UDP.
+#
+# @option{host} specifies the remote host to connect to. If not specified it
+# defaults to @code{localhost}.
+#
+# @option{port} specifies the port on the remote host to connect to. 
@option{port}
+# is required.
+#
+# @option{localaddr} specifies the local address to bind to. If not specified 
it
+# defaults to @code{0.0.0.0}.
+#
+# @option{localport} specifies the local port to bind to. If not specified any
+# available local port will be used.
+#
+# @option{ipv4} and @option{ipv6} specify that either IPv4 or IPv6 must be 
used.
+# If neither is specified the device may use either protocol.
+#
+# @item -chardev msmouse ,address@hidden
+#
+# Forward QEMU's emulated msmouse events to the guest. @option{msmouse} does 
not
+# take any options.
+#
+# @item -chardev vc ,address@hidden [[,address@hidden [,address@hidden 
[[,address@hidden [,address@hidden
+#
+# Connect to a QEMU text console. @option{vc} may optionally be given a 
specific
+# size.
+#
+# @option{width} and @option{height} specify the width and height respectively 
of
+# the console, in pixels.
+#
+# @option{cols} and @option{rows} specify that the console be sized to fit a 
text
+# console with the given dimensions.
+#
+# @item -chardev ringbuf ,address@hidden [,address@hidden
+#
+# Create a ring buffer with fixed size @option{size}.
+# @var{size} must be a power of two and defaults to @code{64K}.
+#
+# @item -chardev file ,address@hidden ,address@hidden
+#
+# Log all traffic received from the guest to a file.
+#
+# @option{path} specifies the path of the file to be opened. This file will be
+# created if it does not already exist, and overwritten if it does. 
@option{path}
+# is required.
+#
+# @item -chardev pipe ,address@hidden ,address@hidden
+#
+# Create a two-way connection to the guest. The behaviour differs slightly 
between
+# Windows hosts and other hosts:
+#
+# On Windows, a single duplex pipe will be created at
+# @address@hidden
+#
+# On other hosts, 2 pipes will be created called @address@hidden and
+# @address@hidden Data written to @address@hidden will be
+# received by the guest. Data written by the guest can be read from
+# @address@hidden QEMU will not create these fifos, and requires them to
+# be present.
+#
+# @option{path} forms part of the pipe path as described above. @option{path} 
is
+# required.
+#
+# @item -chardev console ,address@hidden
+#
+# Send traffic from the guest to QEMU's standard output. @option{console} does 
not
+# take any options.
+#
+# @option{console} is only available on Windows hosts.
+#
+# @item -chardev serial ,address@hidden ,address@hidden
+#
+# Send traffic from the guest to a serial device on the host.
+#
+# On Unix hosts serial will actually accept any tty device,
+# not only serial lines.
+#
+# @option{path} specifies the name of the serial device to open.
+#
+# @item -chardev pty ,address@hidden
+#
+# Create a new pseudo-terminal on the host and connect to it. @option{pty} does
+# not take any options.
+#
+# @option{pty} is not available on Windows hosts.
+#
+# @item -chardev stdio ,address@hidden [,signal=on|off]
+# Connect to standard input and standard output of the QEMU process.
+#
+# @option{signal} controls if signals are enabled on the terminal, that 
includes
+# exiting QEMU with the key sequence @key{Control-c}. This option is enabled by
+# default, use @option{signal=off} to disable it.
+#
+# @item -chardev braille ,address@hidden
+#
+# Connect to a local BrlAPI server. @option{braille} does not take any options.
+#
+# @item -chardev tty ,address@hidden ,address@hidden
+#
+# @option{tty} is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
+# DragonFlyBSD hosts.  It is an alias for @option{serial}.
+#
+# @option{path} specifies the path to the tty. @option{path} is required.
+#
+# @item -chardev parallel ,address@hidden ,address@hidden
+# @itemx -chardev parport ,address@hidden ,address@hidden
+#
+# @option{parallel} is only available on Linux, FreeBSD and DragonFlyBSD hosts.
+#
+# Connect to a local parallel port.
+#
+# @option{path} specifies the path to the parallel port device. @option{path} 
is
+# required.
+#
+# @item -chardev spicevmc ,address@hidden ,address@hidden, address@hidden
+#
+# @option{spicevmc} is only available when spice support is built in.
+#
+# @option{debug} debug level for spicevmc
+#
+# @option{name} name of spice channel to connect to
+#
+# Connect to a spice virtual machine channel, such as vdiport.
+#
+# @item -chardev spiceport ,address@hidden ,address@hidden, address@hidden
+#
+# @option{spiceport} is only available when spice support is built in.
+#
+# @option{debug} debug level for spicevmc
+#
+# @option{name} name of spice port to connect to
+#
+# Connect to a spice port, allowing a Spice client to handle the traffic
+# identified by a name (preferably a fqdn).
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--chardev',
+  'data': 'str',                # FIXME QAPIfy qemu_chardev_opts: 
ChardevBackend
+  'help': [
+"-chardev help",
+"-chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev 
socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay][,reconnect=seconds]",
+"         [,server][,nowait][,telnet][,reconnect=seconds][,mux=on|off]",
+"         [,logfile=PATH][,logappend=on|off][,tls-creds=ID] (tcp)",
+"-chardev 
socket,id=id,path=path[,server][,nowait][,telnet][,reconnect=seconds]",
+"         [,mux=on|off][,logfile=PATH][,logappend=on|off] (unix)",
+"-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]",
+"         [,localport=localport][,ipv4][,ipv6][,mux=on|off]",
+"         [,logfile=PATH][,logappend=on|off]",
+"-chardev msmouse,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]",
+"         [,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off]",
+"-chardev file,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#ifdef _WIN32
+#    "-chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#    "-chardev 
serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#else
+"-chardev pty,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev 
stdio,id=id[,mux=on|off][,signal=on|off][,logfile=PATH][,logappend=on|off]",
+#endif
+#ifdef CONFIG_BRLAPI
+"-chardev braille,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#endif
+#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
+#    || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+"-chardev 
serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev tty,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#endif
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
+"-chardev 
parallel,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+"-chardev 
parport,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]",
+#endif
+#if defined(CONFIG_SPICE)
+"-chardev 
spicevmc,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]",
+"-chardev 
spiceport,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]"
+#endif
+] }
+
+##
+# == Bluetooth(R) options
+##
+
+##
+# @--bt:
+# !texinfo
+# -bt address@hidden
+# Defines the function of the corresponding Bluetooth HCI.  -bt options
+# are matched with the HCIs present in the chosen machine type.  For
+# example when emulating a machine with only one HCI built into it, only
+# the first @code{-bt hci[...]} option is valid and defines the HCI's
+# logic.  The Transport Layer is decided by the machine type.  Currently
+# the machines @code{n800} and @code{n810} have one HCI and all other
+# machines have none.
+#
+# @anchor{bt-hcis}
+# The following three types are recognized:
+#
+# @table @option
+# @item -bt hci,address@hidden
+# (default) The corresponding Bluetooth HCI assumes no internal logic
+# and will not respond to any HCI commands or emit events.
+#
+# @item -bt hci,host[:@address@hidden
+# (@code{bluez} only) The corresponding HCI passes commands / events
+# to / from the physical HCI identified by the name @var{id} (default:
+# @code{hci0}) on the computer running QEMU.  Only available on @code{bluez}
+# capable systems like Linux.
+#
+# @item -bt hci[,address@hidden@*
+# Add a virtual, standard HCI that will participate in the Bluetooth
+# scatternet @var{n} (default @code{0}).  Similarly to @option{-net}
+# VLANs, devices inside a bluetooth network @var{n} can only communicate
+# with other devices in the same network (scatternet).
+# @end table
+#
+# -bt vhci[,address@hidden@*
+# (Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
+# to the host bluetooth stack instead of to the emulated target.  This
+# allows the host and target machines to participate in a common scatternet
+# and communicate.  Requires the Linux @code{vhci} driver installed.  Can
+# be used as following:
+#
+# @example
+# qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
+# @end example
+#
+# -bt device:@var{dev}[,address@hidden@*
+# Emulate a bluetooth device @var{dev} and place it in network @var{n}
+# (default @code{0}).  QEMU can only emulate one type of bluetooth devices
+# currently:
+#
+# @table @option
+# @item keyboard
+# Virtual wireless keyboard implementing the HIDP bluetooth profile.
+# @end table
+# !end texinfo
+##
+{ 'option': '--bt',
+  'data': 'str',                # FIXME QAPIfy bt_parse()
+  'help': [
+"-bt hci,null    dumb bluetooth HCI - doesn't respond to commands",
+"-bt hci,host[:id]",
+"                use host's HCI with the given name",
+"-bt hci[,vlan=n]",
+"                emulate a standard HCI in virtual scatternet 'n'",
+"-bt vhci[,vlan=n]",
+"                add host computer to virtual scatternet 'n' using VHCI",
+"-bt device:dev[,vlan=n]",
+"                emulate a bluetooth device 'dev' in scatternet 'n'"] }
+
+##
+# == TPM device options
+##
+
+##
+# @--tpmdev:
+# !texinfo
+# The general form of a TPM device option is:
+# -tpmdev @var{backend} ,address@hidden [,@var{options}]\@
+#
+# The specific backend type will determine the applicable options.
+# The @code{-tpmdev} option creates the TPM backend and requires a
+# @code{-device} option that specifies the TPM frontend interface model.
+#
+# Use @code{-tpmdev help} to print all available TPM backend types.
+#
+# The available backends are:
+#
+# @table @option
+#
+# @item -tpmdev passthrough, address@hidden, address@hidden, address@hidden
+#
+# (Linux-host only) Enable access to the host's TPM using the passthrough
+# driver.
+#
+# @option{path} specifies the path to the host's TPM device, i.e., on
+# a Linux host this would be @code{/dev/tpm0}.
+# @option{path} is optional and by default @code{/dev/tpm0} is used.
+#
+# @option{cancel-path} specifies the path to the host TPM device's sysfs
+# entry allowing for cancellation of an ongoing TPM command.
+# @option{cancel-path} is optional and by default QEMU will search for the
+# sysfs entry to use.
+#
+# Some notes about using the host's TPM with the passthrough driver:
+#
+# The TPM device accessed by the passthrough driver must not be
+# used by any other application on the host.
+#
+# Since the host's firmware (BIOS/UEFI) has already initialized the TPM,
+# the VM's firmware (BIOS/UEFI) will not be able to initialize the
+# TPM again and may therefore not show a TPM-specific menu that would
+# otherwise allow the user to configure the TPM, e.g., allow the user to
+# enable/disable or activate/deactivate the TPM.
+# Further, if TPM ownership is released from within a VM then the host's TPM
+# will get disabled and deactivated. To enable and activate the
+# TPM again afterwards, the host has to be rebooted and the user is
+# required to enter the firmware's menu to enable and activate the TPM.
+# If the TPM is left disabled and/or deactivated most TPM commands will fail.
+#
+# To create a passthrough TPM use the following two options:
+# @example
+# -tpmdev passthrough,id=tpm0 -device tpm-tis,tpmdev=tpm0
+# @end example
+# Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
+# @code{tpmdev=tpm0} in the device option.
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--tpmdev',
+  'data': 'str',                # FIXME QAPIfy qemu_tpmdev_opts, 
tpm_passthrough_handle_device_opts()
+  'help': [
+"-tpmdev passthrough,id=id[,path=path][,cancel-path=path]",
+"                use path to provide path to a character device; default is 
/dev/tpm0",
+"                use cancel-path to provide path to TPM's cancel sysfs entry; 
if",
+"                not provided it will be searched for in 
/sys/class/misc/tpm?/device"] }
+
+##
+# == Linux/Multiboot boot specific
+#
+# When using these options, you can use a given Linux or Multiboot
+# kernel without installing it in the disk image. It can be useful
+# for easier testing of various kernels.
+##
+
+##
+# @--kernel:
+# !texinfo
+# -kernel @address@hidden
+# Use @var{bzImage} as kernel image. The kernel can be either a Linux kernel
+# or in multiboot format.
+# !end texinfo
+##
+{ 'option': '--kernel',
+  'data': 'str',
+  'help': "-kernel bzImage use 'bzImage' as kernel image" }
+
+##
+# @--append:
+# !texinfo
+# -append @address@hidden
+# Use @var{cmdline} as kernel command line
+# !end texinfo
+##
+{ 'option': '--append',
+  'data': 'str',
+  'help': "-append cmdline use 'cmdline' as kernel command line" }
+
+##
+# @--initrd:
+# !texinfo
+# -initrd @address@hidden
+# Use @var{file} as initial ram disk.
+#
+# -initrd "@var{file1} arg=foo,@var{file2}"@*
+#
+# This syntax is only available with multiboot.
+#
+# Use @var{file1} and @var{file2} as modules and pass arg=foo as parameter to 
the
+# first module.
+# !end texinfo
+##
+{ 'option': '--initrd',
+  'data': 'str',
+  'help': "-initrd file    use 'file' as initial ram disk" }
+
+##
+# @--dtb:
+# !texinfo
+# -dtb @address@hidden
+# Use @var{file} as a device tree binary (dtb) image and pass it to the kernel
+# on boot.
+# !end texinfo
+##
+{ 'option': '--dtb',
+  'data': 'str',
+  'help': "-dtb    file    use 'file' as device tree image" }
+
+##
+# == Debug/Expert options
+##
+
+##
+# @--fw_cfg:
+# !texinfo
+#
+# -fw_cfg address@hidden,address@hidden@*
+# Add named fw_cfg entry with contents from file @var{file}.
+#
+# -fw_cfg address@hidden,address@hidden@*
+# Add named fw_cfg entry with contents from string @var{str}.
+#
+# The terminating NUL character of the contents of @var{str} will not be
+# included as part of the fw_cfg item data. To insert contents with
+# embedded NUL characters, you have to use the @var{file} parameter.
+#
+# The fw_cfg entries are passed by QEMU through to the guest.
+#
+# Example:
+# @example
+#     -fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
+# @end example
+# creates an fw_cfg entry named opt/com.mycompany/blob with contents
+# from ./my_blob.bin.
+# !end texinfo
+##
+{ 'option': '--fw_cfg',
+  'data': 'str',                # FIXME QAPIfy qemu_fw_cfg_opts
+  'help': [
+"-fw_cfg [name=]<name>,file=<file>",
+"                add named fw_cfg entry with contents from file",
+"-fw_cfg [name=]<name>,string=<str>",
+"                add named fw_cfg entry with contents from string"] }
+
+##
+# @--serial:
+# !texinfo
+# -serial @address@hidden
+# Redirect the virtual serial port to host character device
+# @var{dev}. The default device is @code{vc} in graphical mode and
+# @code{stdio} in non graphical mode.
+#
+# This option can be used several times to simulate up to 4 serial
+# ports.
+#
+# Use @code{-serial none} to disable all serial ports.
+#
+# Available character devices are:
+# @table @option
+# @item vc[:@address@hidden
+# Virtual console. Optionally, a width and height can be given in pixel with
+# @example
+# vc:800x600
+# @end example
+# It is also possible to specify width or height in characters:
+# @example
+# vc:80Cx24C
+# @end example
+# @item pty
+# [Linux only] Pseudo TTY (a new PTY is automatically allocated)
+# @item none
+# No device is allocated.
+# @item null
+# void device
+# @item chardev:@var{id}
+# Use a named character device defined with the @code{-chardev} option.
+# @item /dev/XXX
+# [Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
+# parameters are set according to the emulated ones.
+# @item /dev/address@hidden
+# [Linux only, parallel port only] Use host parallel port
+# @var{N}. Currently SPP and EPP parallel port features can be used.
+# @item file:@var{filename}
+# Write output to @var{filename}. No character can be read.
+# @item stdio
+# [Unix only] standard input/output
+# @item pipe:@var{filename}
+# name pipe @var{filename}
+# @item address@hidden
+# [Windows only] Use host serial port @var{n}
+# @item udp:address@hidden:@var{remote_port}[@@address@hidden:@var{src_port}]
+# This implements UDP Net Console.
+# When @var{remote_host} or @var{src_ip} are not specified
+# they default to @code{0.0.0.0}.
+# When not using a specified @var{src_port} a random port is automatically 
chosen.
+#
+# If you just want a simple readonly console you can use @code{netcat} or
+# @code{nc}, by starting QEMU with: @code{-serial udp::4555} and nc as:
+# @code{nc -u -l -p 4555}. Any time QEMU writes something to that port it
+# will appear in the netconsole session.
+#
+# If you plan to send characters back via netconsole or you want to stop
+# and start QEMU a lot of times, you should have QEMU use the same
+# source port each time by using something like @code{-serial
+# udp::4555@@:4556} to QEMU. Another approach is to use a patched
+# version of netcat which can listen to a TCP port and send and receive
+# characters via udp.  If you have a patched version of netcat which
+# activates telnet remote echo and single char transfer, then you can
+# use the following options to set up a netcat redirector to allow
+# telnet on port 5555 to access the QEMU port.
+# @table @code
+# @item QEMU Options:
+# -serial udp::4555@@:4556
+# @item netcat options:
+# -u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
+# @item telnet options:
+# localhost 5555
+# @end table
+#
+# @item 
tcp:address@hidden:@var{port}[,@var{server}][,nowait][,nodelay][,address@hidden
+# The TCP Net Console has two modes of operation.  It can send the serial
+# I/O to a location or wait for a connection from a location.  By default
+# the TCP Net Console is sent to @var{host} at the @var{port}.  If you use
+# the @var{server} option QEMU will wait for a client socket application
+# to connect to the port before continuing, unless the @code{nowait}
+# option was specified.  The @code{nodelay} option disables the Nagle buffering
+# algorithm.  The @code{reconnect} option only applies if @var{noserver} is
+# set, if the connection goes down it will attempt to reconnect at the
+# given interval.  If @var{host} is omitted, 0.0.0.0 is assumed. Only
+# one TCP connection at a time is accepted. You can use @code{telnet} to
+# connect to the corresponding character device.
+# @table @code
+# @item Example to send tcp console to 192.168.0.2 port 4444
+# -serial tcp:192.168.0.2:4444
+# @item Example to listen and wait on port 4444 for connection
+# -serial tcp::4444,server
+# @item Example to not wait and listen on ip 192.168.0.100 port 4444
+# -serial tcp:192.168.0.100:4444,server,nowait
+# @end table
+#
+# @item telnet:@var{host}:@var{port}[,server][,nowait][,nodelay]
+# The telnet protocol is used instead of raw tcp sockets.  The options
+# work the same as if you had specified @code{-serial tcp}.  The
+# difference is that the port acts like a telnet server or client using
+# telnet option negotiation.  This will also allow you to send the
+# MAGIC_SYSRQ sequence if you use a telnet that supports sending the break
+# sequence.  Typically in unix telnet you do it with Control-] and then
+# type "send break" followed by pressing the enter key.
+#
+# @item unix:@var{path}[,server][,nowait][,address@hidden
+# A unix domain socket is used instead of a tcp socket.  The option works the
+# same as if you had specified @code{-serial tcp} except the unix domain socket
+# @var{path} is used for connections.
+#
+# @item mon:@var{dev_string}
+# This is a special option to allow the monitor to be multiplexed onto
+# another serial port.  The monitor is accessed with key sequence of
+# @key{Control-a} and then pressing @key{c}.
+# @var{dev_string} should be any one of the serial devices specified
+# above.  An example to multiplex the monitor onto a telnet server
+# listening on port 4444 would be:
+# @table @code
+# @item -serial mon:telnet::4444,server,address@hidden
+# @end table
+# When the monitor is multiplexed to stdio in this way, Ctrl+C will not 
terminate
+# QEMU any more but will be passed to the guest instead.
+#
+# @item braille
+# Braille device.  This will use BrlAPI to display the braille output on a real
+# or fake device.
+#
+# @item msmouse
+# Three button serial mouse. Configure the guest to use Microsoft protocol.
+# @end table
+# !end texinfo
+##
+{ 'option': '--serial',
+  'data': 'str',                # FIXME QAPIfy serial_parse()
+  'help': "-serial dev     redirect the serial port to char device 'dev'" }
+
+##
+# @--parallel:
+# !texinfo
+# -parallel @address@hidden
+# Redirect the virtual parallel port to host device @var{dev} (same
+# devices as the serial port). On Linux hosts, @file{/dev/parportN} can
+# be used to use hardware devices connected on the corresponding host
+# parallel port.
+#
+# This option can be used several times to simulate up to 3 parallel
+# ports.
+#
+# Use @code{-parallel none} to disable all parallel ports.
+# !end texinfo
+##
+{ 'option': '--parallel',
+  'data': 'str',                # FIXME QAPIfy parallel_parse()
+  'help': "-parallel dev   redirect the parallel port to char device 'dev'" }
+
+##
+# @--monitor:
+# !texinfo
+# -monitor @address@hidden
+# Redirect the monitor to host device @var{dev} (same devices as the
+# serial port).
+# The default device is @code{vc} in graphical mode and @code{stdio} in
+# non graphical mode.
+# Use @code{-monitor none} to disable the default monitor.
+# !end texinfo
+##
+{ 'option': '--monitor',
+  'data': 'str',                # FIXME QAPIfy monitor_parse()
+  'help': "-monitor dev    redirect the monitor to char device 'dev'" }
+
+##
+# @--qmp:
+# !texinfo
+# -qmp @address@hidden
+# Like -monitor but opens in 'control' mode.
+# !end texinfo
+##
+{ 'option': '--qmp',
+  'data': 'str',                # FIXME QAPIfy monitor_parse()
+  'help': "-qmp dev        like -monitor but opens in 'control' mode" }
+
+##
+# @--qmp-pretty:
+# !texinfo
+# -qmp-pretty @address@hidden
+# Like -qmp but uses pretty JSON formatting.
+# !end texinfo
+##
+{ 'option': '--qmp-pretty',
+  'data': 'str',                # FIXME
+  'help': "-qmp-pretty dev like -qmp but uses pretty JSON formatting" }
+
+##
+# @--mon:
+# !texinfo
+# -mon [chardev=]name[,mode=readline|address@hidden
+# Setup monitor on chardev @var{name}.
+# !end texinfo
+##
+{ 'option': '--mon',
+  'data': 'str',                # FIXME QAPIfy qemu_mon_opts
+  'help': "-mon [chardev=]name[,mode=readline|control]" }
+
+##
+# @--debugcon:
+# !texinfo
+# -debugcon @address@hidden
+# Redirect the debug console to host device @var{dev} (same devices as the
+# serial port).  The debug console is an I/O port which is typically port
+# 0xe9; writing to that I/O port sends output to this device.
+# The default device is @code{vc} in graphical mode and @code{stdio} in
+# non graphical mode.
+# !end texinfo
+##
+{ 'option': '--debugcon',
+  'data': 'str',                # FIXME QAPIfy debugcon_parse()
+  'help': "-debugcon dev   redirect the debug console to char device 'dev'" }
+
+##
+# @--pidfile:
+# !texinfo
+# -pidfile @address@hidden
+# Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
+# from a script.
+# !end texinfo
+##
+{ 'option': '--pidfile',
+  'data': 'str',
+  'help': "-pidfile file   write PID to 'file'" }
+
+##
+# @--singlestep:
+# !texinfo
+# address@hidden
+# Run the emulation in single step mode.
+# !end texinfo
+##
+{ 'option': '--singlestep',
+  'help': "-singlestep     always run in singlestep mode" }
+
+##
+# @--stopped:
+# !texinfo
+# address@hidden
+# Do not start CPU at startup (you must type 'c' in the monitor).
+# !end texinfo
+##
+{ 'option': '--stopped', 'short': 'S',
+  'help': "-S              freeze CPU at startup (use 'c' to start execution)" 
}
+
+##
+# @--realtime:
+# !texinfo
+# -realtime mlock=on|address@hidden
+# Run qemu with realtime features.
+# mlocking qemu and guest memory can be enabled via @option{mlock=on}
+# (enabled by default).
+# !end texinfo
+##
+{ 'option': '--realtime',
+  'data': 'str',                # FIXME QAPIfy qemu_realtime_opts
+  'help': [
+"-realtime [mlock=on|off]",
+"                run qemu with realtime features",
+"                mlock=on|off controls mlock support (default: on)"] }
+
+##
+# @--gdb:
+# !texinfo
+# -gdb @address@hidden
+# Wait for gdb connection on device @var{dev} (FIXME @@address@hidden@}). 
Typical
+# connections will likely be TCP-based, but also UDP, pseudo TTY, or even
+# stdio are reasonable use case. The latter is allowing to start QEMU from
+# within gdb and establish the connection via a pipe:
+# @example
+# (gdb) target remote | exec qemu-system-i386 -gdb stdio ...
+# @end example
+# !end texinfo
+##
+{ 'option': '--gdb',
+  'data': 'str',                # FIXME QAPIfy gdbserver_start()
+  'help': "-gdb dev        wait for gdb connection on 'dev'" }
+
+##
+# @--gdb-default:
+# !texinfo
+# address@hidden
+# Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
+# (FIXME @@address@hidden@}).
+# !end texinfo
+##
+{ 'option': '--gdb-default', 'short': 's',
+  'help': "-s              shorthand for -gdb tcp::FIXME" }
+
+##
+# @--debug-enable:
+# !texinfo
+# -d @var{item1}[,address@hidden
+# Enable logging of specified items. Use '-d help' for a list of log items.
+# !end texinfo
+##
+{ 'option': '--debug-enable', 'short': 'd',
+  'data': 'str',                # FIXME QAPIfy qemu_str_to_log_mask()
+  'help': "-d item1,...    enable logging of specified items (use '-d help' 
for a list of log items)" }
+
+##
+# @--debug-log:
+# !texinfo
+# -D @address@hidden
+# Output log in @var{logfile} instead of to stderr
+# !end texinfo
+##
+# TODO either document the %d feature, or kill it
+{ 'option': '--debug-log', 'short': 'D',
+  'data': 'str',
+  'help': "-D logfile      output log to logfile (default stderr)" }
+
+##
+# @--dfilter:
+# !texinfo
+# -dfilter @var{range1}[,address@hidden
+# Filter debug output to that relevant to a range of target addresses. The 
filter
+# spec can be either @address@hidden, @address@hidden or
+# @address@hidden where @var{start} @var{end} and @var{size} are the
+# addresses and sizes required. For example:
+# @example
+#     -dfilter 
0x8000..0x8fff,0xffffffc000080000+0x200,0xffffffc000060000-0x1000
+# @end example
+# Will dump output for any code in the 0x1000 sized block starting at 0x8000 
and
+# the 0x200 sized block starting at 0xffffffc000080000 and another 0x1000 sized
+# block starting at 0xffffffc00005f000.
+# !end texinfo
+##
+{ 'option': '--dfilter',
+  'data': 'str',                # FIXME QAPIfy qemu_set_dfilter_ranges()
+  'help': "-dfilter range,..  filter debug output to range of addresses 
(useful for -d cpu,exec,etc..)" }
+
+##
+# @--load-path:
+# !texinfo
+# -L  @address@hidden
+# Set the directory for the BIOS, VGA BIOS and keymaps.
+#
+# To list all the data directories, use @code{-L help}.
+# !end texinfo
+##
+{ 'option': '--load-path', 'short': 'L',
+  'data': 'str',
+  'help': "-L path         set the directory for the BIOS, VGA BIOS and 
keymaps" }
+
+##
+# @--bios:
+# !texinfo
+# -bios @address@hidden
+# Set the filename for the BIOS.
+# !end texinfo
+##
+{ 'option': '--bios',
+  'data': 'str',
+  'help': "-bios file      set the filename for the BIOS" }
+
+##
+# @--enable-kvm:
+# !texinfo
+# address@hidden
+# Enable KVM full virtualization support. This option is only available
+# if KVM support is enabled when compiling.
+# !end texinfo
+##
+{ 'option': '--enable-kvm',
+  'help': "-enable-kvm     enable KVM full virtualization support" }
+
+##
+# @--enable-hax:
+# !texinfo
+# address@hidden
+# Enable HAX (Hardware-based Acceleration eXecution) support. This option
+# is only available if HAX support is enabled when compiling. HAX is only
+# applicable to MAC and Windows platform, and thus does not conflict with
+# KVM.
+# !end texinfo
+##
+{ 'option': '--enable-hax',
+  'help': "-enable-hax     enable HAX virtualization support" }
+
+##
+# @--xen-domid:
+# !texinfo
+# -xen-domid @address@hidden
+# Specify xen guest domain @var{id} (XEN only).
+# !end texinfo
+##
+{ 'option': '--xen-domid',
+  'data': 'str',                # FIXME int32
+  'help': "-xen-domid id   specify xen guest domain id" }
+
+##
+# @--xen-create:
+# !texinfo
+# address@hidden
+# Create domain using xen hypercalls, bypassing xend.
+# Warning: should not be used when xend is in use (XEN only).
+# !end texinfo
+##
+{ 'option': '--xen-create',
+  'help': [
+"-xen-create     create domain using xen hypercalls, bypassing xend",
+"                warning: should not be used when xend is in use"] }
+
+##
+# @--xen-attach:
+# !texinfo
+# address@hidden
+# Attach to existing xen domain.
+# xend will use this when starting QEMU (XEN only).
+# !end texinfo
+##
+{ 'option': '--xen-attach',
+  'help': [
+"-xen-attach     attach to existing xen domain",
+"                xend will use this when starting QEMU"] }
+
+##
+# @--xen-domid-restrict:
+# !texinfo
+# Restrict set of available xen operations to specified domain id (XEN only).
+# !end texinfo
+##
+{ 'option': '--xen-domid-restrict',
+  'help': [
+"-xen-domid-restrict     restrict set of available xen operations",
+"                        to specified domain id. (Does not affect",
+"                        xenpv machine type)."] }
+
+##
+# @--no-reboot:
+# !texinfo
+# address@hidden
+# Exit instead of rebooting.
+# !end texinfo
+##
+{ 'option': '--no-reboot',
+  'help': "-no-reboot      exit instead of rebooting" }
+
+##
+# @--no-shutdown:
+# !texinfo
+# address@hidden
+# Don't exit QEMU on guest shutdown, but instead only stop the emulation.
+# This allows for instance switching to monitor to commit changes to the
+# disk image.
+# !end texinfo
+##
+{ 'option': '--no-shutdown',
+  'help': "-no-shutdown    stop before shutdown" }
+
+##
+# @--loadvm:
+# !texinfo
+# -loadvm @address@hidden
+# Start right away with a saved state (@code{loadvm} in monitor)
+# !end texinfo
+##
+# FIXME @var{file} is bogus
+{ 'option': '--loadvm',
+  'data': 'str',
+  'help': [
+"-loadvm [tag|id]",
+"                start right away with a saved state (loadvm in monitor)"] }
+
+##
+# @--daemonize:
+# !texinfo
+# address@hidden
+# Daemonize the QEMU process after initialization.  QEMU will not detach from
+# standard IO until it is ready to receive connections on any of its devices.
+# This option is a useful way for external programs to launch QEMU without 
having
+# to cope with initialization race conditions.
+# !end texinfo
+##
+{ 'option': '--daemonize',
+  'help': "-daemonize      daemonize QEMU after initializing" }
+
+##
+# @--option-rom:
+# !texinfo
+# -option-rom @address@hidden
+# Load the contents of @var{file} as an option ROM.
+# This option is useful to load things like EtherBoot.
+# !end texinfo
+##
+{ 'option': '--option-rom',
+  'data': 'str',                # FIXME QAPIfy qemu_option_rom_opts
+  'help': "-option-rom rom load a file, rom, into the option ROM space" }
+
+##
+# @--clock:
+##
+# TODO deprecate
+{ 'option': '--clock',
+  'data': 'str',                # FIXME
+  'help': null }
+
+##
+# @--localtime:
+##
+# TODO deprecate
+{ 'option': '--localtime',
+  'help': null }
+
+##
+# @--startdate:
+##
+# TODO deprecate
+{ 'option': '--startdate',
+  'data': 'str',                # FIXME QAPIfy configure_rtc_date_offset()
+  'help': null }
+
+##
+# @--rtc:
+# !texinfo
+#
+# -rtc 
[base=utc|localtime|@var{date}][,clock=host|vm][,driftfix=none|address@hidden
+# Specify @option{base} as @code{utc} or @code{localtime} to let the RTC start 
at the current
+# UTC or local time, respectively. @code{localtime} is required for correct 
date in
+# MS-DOS or Windows. To start at a specific point in time, provide @var{date} 
in the
+# format @code{2006-06-17T16:01:21} or @code{2006-06-17}. The default base is 
UTC.
+#
+# By default the RTC is driven by the host system time. This allows using of 
the
+# RTC as accurate reference clock inside the guest, specifically if the host
+# time is smoothly following an accurate external reference clock, e.g. via 
NTP.
+# If you want to isolate the guest time from the host, you can set 
@option{clock}
+# to @code{rt} instead.  To even prevent it from progressing during suspension,
+# you can set it to @code{vm}.
+#
+# Enable @option{driftfix} (i386 targets only) if you experience time drift 
problems,
+# specifically with Windows' ACPI HAL. This option will try to figure out how
+# many timer interrupts were not processed by the Windows guest and will
+# re-inject them.
+# !end texinfo
+##
+{ 'option': '--rtc',
+  'data': 'str',                # FIXME QAPIfy qemu_rtc_opts
+  'help': [
+"-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]",
+"                set the RTC base and clock, enable drift fix for clock ticks 
(x86 only)"] }
+
+##
+# @--icount:
+# !texinfo
+# -icount 
address@hidden|auto][,rr=record|replay,address@hidden,address@hidden@*
+# Enable virtual instruction counter.  The virtual cpu will execute one
+# instruction every address@hidden ns of virtual time.  If @code{auto} is 
specified
+# then the virtual cpu speed will be automatically adjusted to keep virtual
+# time within a few seconds of real time.
+#
+# When the virtual cpu is sleeping, the virtual time will advance at default
+# speed unless @option{sleep=on|off} is specified.
+# With @option{sleep=on|off}, the virtual time will jump to the next timer 
deadline
+# instantly whenever the virtual cpu goes to sleep mode and will not advance
+# if no timer is enabled. This behavior give deterministic execution times from
+# the guest point of view.
+#
+# Note that while this option can give deterministic behavior, it does not
+# provide cycle accurate emulation.  Modern CPUs contain superscalar out of
+# order cores with complex cache hierarchies.  The number of instructions
+# executed often has little or no correlation with actual performance.
+#
+# @option{align=on} will activate the delay algorithm which will try
+# to synchronise the host clock and the virtual clock. The goal is to
+# have a guest running at the real frequency imposed by the shift option.
+# Whenever the guest clock is behind the host clock and if
+# @option{align=on} is specified then we print a message to the user
+# to inform about the delay.
+# Currently this option does not work when @option{shift} is @code{auto}.
+# Note: The sync algorithm will work for those shift values for which
+# the guest clock runs ahead of the host clock. Typically this happens
+# when the shift value is high (how high depends on the host machine).
+#
+# When @option{rr} option is specified deterministic record/replay is enabled.
+# Replay log is written into @var{filename} file in record mode and
+# read from this file in replay mode.
+#
+# Option rrsnapshot is used to create new vm snapshot named @var{snapshot}
+# at the start of execution recording. In replay mode this option is used
+# to load the initial VM state.
+# !end texinfo
+##
+{ 'option': '--icount',
+  'data': 'str',                # FIXME QAPIfy qemu_icount_opts
+  'help': [
+"-icount 
[shift=N|auto][,align=on|off][,sleep=on|off,rr=record|replay,rrfile=<filename>,rrsnapshot=<snapshot>]",
+"                enable virtual instruction counter with 2^N clock ticks per",
+"                instruction, enable aligning the host and virtual clocks",
+"                or disable real time cpu sleeping"] }
+
+##
+# @--watchdog:
+# !texinfo
+# -watchdog @address@hidden
+# Create a virtual hardware watchdog device.  Once enabled (by a guest
+# action), the watchdog must be periodically polled by an agent inside
+# the guest or else the guest will be restarted. Choose a model for
+# which your guest has drivers.
+#
+# The @var{model} is the model of hardware watchdog to emulate. Use
+# @code{-watchdog help} to list available hardware models. Only one
+# watchdog can be enabled for a guest.
+#
+# The following models may be available:
+# @table @option
+# @item ib700
+# iBASE 700 is a very simple ISA watchdog with a single timer.
+# @item i6300esb
+# Intel 6300ESB I/O controller hub is a much more featureful PCI-based
+# dual-timer watchdog.
+# @item diag288
+# A virtual watchdog for s390x backed by the diagnose 288 hypercall
+# (currently KVM only).
+# @end table
+# !end texinfo
+##
+{ 'option': '--watchdog',
+  'data': 'str',                # FIXME QAPIfy select_watchdog()
+  'help': [
+"-watchdog model",
+"                enable virtual hardware watchdog [default=none]"] }
+
+##
+# @--watchdog-action:
+# !texinfo
+# -watchdog-action @address@hidden
+#
+# The @var{action} controls what QEMU will do when the watchdog timer
+# expires.
+# The default is
+# @code{reset} (forcefully reset the guest).
+# Other possible actions are:
+# @code{shutdown} (attempt to gracefully shutdown the guest),
+# @code{poweroff} (forcefully poweroff the guest),
+# @code{inject-nmi} (inject a NMI into the guest),
+# @code{pause} (pause the guest),
+# @code{debug} (print a debug message and continue), or
+# @code{none} (do nothing).
+#
+# Note that the @code{shutdown} action requires that the guest responds
+# to ACPI signals, which it may not be able to do in the sort of
+# situations where the watchdog would have expired, and thus
+# @code{-watchdog-action shutdown} is not recommended for production use.
+#
+# Examples:
+#
+# @table @code
+# @item -watchdog i6300esb -watchdog-action address@hidden
+# @itemx -watchdog address@hidden
+# @end table
+# !end texinfo
+##
+{ 'option': '--watchdog-action',
+  'data': 'str',                # FIXME enum
+  'help': [
+"-watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none",
+"                action when watchdog fires [default=reset]"] }
+
+##
+# @--echr:
+# !texinfo
+#
+# -echr @address@hidden
+# Change the escape character used for switching to the monitor when using
+# monitor and serial sharing.  The default is @code{0x01} when using the
+# @code{-nographic} option.  @code{0x01} is equal to pressing
+# @code{Control-a}.  You can select a different character from the ascii
+# control keys where 1 through 26 map to Control-a through Control-z.  For
+# instance you could use the either of the following to change the escape
+# character to Control-t.
+# @table @code
+# @item -echr address@hidden
+# @itemx -echr address@hidden
+# @end table
+# !end texinfo
+##
+{ 'option': '--echr',
+  'data': 'str',                # FIXME int
+  'help': "-echr chr       set terminal escape character instead of ctrl-a" }
+
+##
+# @--virtioconsole:
+# !texinfo
+# -virtioconsole @address@hidden
+# Set virtio console.
+#
+# This option is maintained for backward compatibility.
+#
+# Please use @code{-device virtconsole} for the new way of invocation.
+# !end texinfo
+##
+{ 'option': '--virtioconsole',
+  'data': 'str',                # FIXME QAPIfy virtcon_parse()
+  'help': [
+"-virtioconsole c",
+"                set virtio console"] }
+
+##
+# @--show-cursor:
+# !texinfo
+# address@hidden
+# Show cursor.
+# !end texinfo
+##
+{ 'option': '--show-cursor',
+  'help': "-show-cursor    show cursor" }
+
+##
+# @--tb-size:
+# !texinfo
+# -tb-size @address@hidden
+# Set TB size.
+# !end texinfo
+##
+{ 'option': '--tb-size',
+  'data': 'str',                # FIXME size
+  'help': "-tb-size n      set TB size" }
+
+##
+# @--incoming:
+# !texinfo
+# -incoming tcp:address@hidden:@var{port}[,address@hidden,ipv4][,address@hidden
+# -incoming rdma:@var{host}:@var{port}[,ipv4][,address@hidden
+# Prepare for incoming migration, listen on a given tcp port.
+#
+# -incoming unix:@address@hidden
+# Prepare for incoming migration, listen on a given unix socket.
+#
+# -incoming fd:@address@hidden
+# Accept incoming migration from a given filedescriptor.
+#
+# -incoming exec:@address@hidden
+# Accept incoming migration as an output from specified external command.
+#
+# -incoming address@hidden
+# Wait for the URI to be specified via migrate_incoming.  The monitor can
+# be used to change settings (such as migration parameters) prior to issuing
+# the migrate_incoming to allow the migration to begin.
+# !end texinfo
+##
+{ 'option': '--incoming',
+  'data': 'str',                # FIXME QAPIfy qemu_start_incoming_migration()
+  'help': [
+"-incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6]",
+"-incoming rdma:host:port[,ipv4][,ipv6]",
+"-incoming unix:socketpath",
+"                prepare for incoming migration, listen on",
+"                specified protocol and socket address",
+"-incoming fd:fd",
+"-incoming exec:cmdline",
+"                accept incoming migration on given file descriptor",
+"                or from given external command",
+"-incoming defer",
+"                wait for the URI to be specified via migrate_incoming"] }
+
+##
+# @--only-migratable:
+# !texinfo
+# address@hidden
+# Only allow migratable devices. Devices will not be allowed to enter an
+# unmigratable state.
+# !end texinfo
+##
+{ 'option': '--only-migratable',
+  'help': "-only-migratable     allow only migratable devices" }
+
+##
+# @--nodefaults:
+# !texinfo
+# address@hidden
+# Don't create default devices. Normally, QEMU sets the default devices like 
serial
+# port, parallel port, virtual console, monitor device, VGA adapter, floppy and
+# CD-ROM drive and others. The @code{-nodefaults} option will disable all those
+# default devices.
+# !end texinfo
+##
+{ 'option': '--nodefaults',
+  'help': "-nodefaults     don't create default devices" }
+
+##
+# @--chroot:
+# !texinfo
+# -chroot @address@hidden
+# Immediately before starting guest execution, chroot to the specified
+# directory.  Especially useful in combination with -runas.
+# !end texinfo
+##
+{ 'option': '--chroot',
+  'data': 'str',
+  'help': "-chroot dir     chroot to dir just before starting the VM" }
+
+##
+# @--runas:
+# !texinfo
+# -runas @address@hidden
+# Immediately before starting guest execution, drop root privileges, switching
+# to the specified user.
+# !end texinfo
+##
+{ 'option': '--runas',
+  'data': 'str',
+  'help': "-runas user     change to user id user just before starting the VM" 
}
+
+##
+# @--prom-env:
+# !texinfo
+# -prom-env @address@hidden@*
+# Set OpenBIOS nvram @var{variable} to given @var{value} (PPC, SPARC only).
+# !end texinfo
+##
+{ 'option': '--prom-env',
+  'data': 'str',                # fine (we leave parsing it to OpenBIOS)
+  'help': [
+"-prom-env variable=value",
+"                set OpenBIOS nvram variables"] }
+
+##
+# @--semihosting:
+# !texinfo
+# address@hidden
+# Enable semihosting mode (ARM, M68K, Xtensa, MIPS only).
+# !end texinfo
+##
+{ 'option': '--semihosting',
+  'help': "-semihosting    semihosting mode" }
+
+##
+# @--semihosting-config:
+# !texinfo
+# -semihosting-config 
[enable=on|off][,target=native|gdb|auto][,arg=str[,address@hidden
+# Enable and configure semihosting (ARM, M68K, Xtensa, MIPS only).
+# @table @option
+# @item address@hidden|gdb|auto}
+# Defines where the semihosting calls will be addressed, to QEMU 
(@code{native})
+# or to GDB (@code{gdb}). The default is @code{auto}, which means @code{gdb}
+# during debug sessions and @code{native} otherwise.
+# @item address@hidden,address@hidden,...
+# Allows the user to pass input arguments, and can be used multiple times to 
build
+# up a list. The old-style @code{-kernel}/@code{-append} method of passing a
+# command line is still supported for backward compatibility. If both the
+# @code{--semihosting-config arg} and the @code{-kernel}/@code{-append} are
+# specified, the former is passed to semihosting as it always takes precedence.
+# @end table
+# !end texinfo
+##
+{ 'option': '--semihosting-config',
+  'data': 'str',                # FIXME QAPIfy qemu_semihosting_config_opts
+  'help': [
+"-semihosting-config [enable=on|off][,target=native|gdb|auto][,arg=str[,...]]",
+"                semihosting configuration"] }
+
+##
+# @--old-param:
+# !texinfo
+# address@hidden
+# Old param mode (ARM only).
+# !end texinfo
+##
+{ 'option': '--old-param',
+  'help': "-old-param      old param mode" }
+
+##
+# @--sandbox:
+# !texinfo
+# -sandbox 
@var{arg}[,address@hidden,address@hidden,address@hidden,address@hidden@*
+# Enable Seccomp mode 2 system call filter. 'on' will enable syscall filtering 
and 'off' will
+# disable it.  The default is 'off'.
+# @table @option
+# @item address@hidden
+# Enable Obsolete system calls
+# @item address@hidden
+# Disable set*uid|gid system calls
+# @item address@hidden
+# Disable *fork and execve
+# @item address@hidden
+# Disable process affinity and schedular priority
+# @end table
+# !end texinfo
+##
+{ 'option': '--sandbox',
+  'data': 'str',                # FIXME QAPIfy qemu_sandbox_opts
+  'help': [
+"-sandbox on[,obsolete=allow|deny][,elevateprivileges=allow|deny|children]",
+"          [,spawn=allow|deny][,resourcecontrol=allow|deny]",
+"                Enable seccomp mode 2 system call filter (default 'off').",
+"                use 'obsolete' to allow obsolete system calls that are 
provided",
+"                    by the kernel, but typically no longer used by modern",
+"                    C library implementations.",
+"                use 'elevateprivileges' to allow or deny QEMU process to 
elevate",
+"                    its privileges by blacklisting all set*uid|gid system 
calls.",
+"                    The value 'children' will deny set*uid|gid system calls 
for",
+"                    main QEMU process but will allow forks and execves to run 
unprivileged",
+"                use 'spawn' to avoid QEMU to spawn new threads or processes 
by",
+"                     blacklisting *fork and execve",
+"                use 'resourcecontrol' to disable process affinity and 
schedular priority"] }
+
+##
+# @--readconfig:
+# !texinfo
+# -readconfig @address@hidden
+# Read device configuration from @var{file}. This approach is useful when you 
want to spawn
+# QEMU process with many command line options but you don't want to exceed the 
command line
+# character limit.
+# !end texinfo
+##
+{ 'option': '--readconfig',
+  'data': 'str',                # FIXME
+  'help': "-readconfig <file>" }
+
+##
+# @--writeconfig:
+# !texinfo
+# -writeconfig @address@hidden
+# Write device configuration to @var{file}. The @var{file} can be either 
filename to save
+# command line and device configuration into file or dash @code{-}) character 
to print the
+# output to stdout. This can be later used as input file for 
@code{-readconfig} option.
+# !end texinfo
+##
+{ 'option': '--writeconfig',
+  'data': 'str',                # FIXME
+  'help': [
+"-writeconfig <file>",
+"                read/write config file"] }
+
+##
+# @--nodefconfig:
+# !texinfo
+# address@hidden
+# Normally QEMU loads configuration files from @var{sysconfdir} and 
@var{datadir} at startup.
+# The @code{-nodefconfig} option will prevent QEMU from loading any of those 
config files.
+# !end texinfo
+##
+{ 'option': '--nodefconfig',
+  'help': [
+"-nodefconfig",
+"                do not load default config files at startup"] }
+
+##
+# @--no-user-config:
+# !texinfo
+# address@hidden
+# The @code{-no-user-config} option makes QEMU not load any of the 
user-provided
+# config files on @var{sysconfdir}, but won't make it skip the QEMU-provided 
config
+# files from @var{datadir}.
+# !end texinfo
+##
+{ 'option': '--no-user-config',
+  'help': [
+"-no-user-config",
+"                do not load user-provided config files at startup"] }
+
+##
+# @--trace:
+# !texinfo
+# HXCOMM This line is not accurate, as some sub-options are backend-specific 
but
+# HXCOMM HX does not support conditional compilation of text.
+# -trace address@hidden,address@hidden,address@hidden@*
+# @include qemu-option-trace.texi
+# !end texinfo
+##
+{ 'option': '--trace',
+  'data': 'str',                # FIXME QAPIfy trace_opt_parse()
+  'help': [
+"-trace [[enable=]<pattern>][,events=<file>][,file=<file>]",
+"                specify tracing options"] }
+
+##
+# @--qtest:
+##
+{ 'option': '--qtest',
+  'data': 'str',                # FIXME QAPIfy qemu_chr_new()
+  'help': null }
+
+##
+# @--qtest-log:
+##
+{ 'option': '--qtest-log',
+  'data': 'str',
+  'help': null }
+
+##
+# @--enable-fips:
+# !texinfo
+# address@hidden
+# Enable FIPS 140-2 compliance mode.
+# !end texinfo
+##
+{ 'option': '--enable-fips',
+  'help': "-enable-fips    enable FIPS 140-2 compliance" }
+
+##
+# @--no-kvm:
+##
+# TODO deprecate
+{ 'option': '--no-kvm',
+  'help': null }
+
+##
+# @--no-kvm-pit-reinjection:
+##
+# TODO deprecate
+{ 'option': '--no-kvm-pit-reinjection',
+  'help': null }
+
+##
+# @--no-kvm-pit:
+##
+# TODO deprecate
+{ 'option': '--no-kvm-pit',
+  'help': null }
+
+##
+# @--no-kvm-irqchip:
+##
+# TODO deprecate
+{ 'option': '--no-kvm-irqchip',
+  'help': null }
+
+##
+# @--tdf:
+##
+# TODO deprecate
+{ 'option': '--tdf',
+  'help': null }
+
+##
+# @--msg:
+# !texinfo
+# -msg timestamp[=on|address@hidden
+# prepend a timestamp to each log message.(default:on)
+# !end texinfo
+##
+{ 'option': '--msg',
+  'data': 'str',                # FIXME QAPIfy qemu_msg_opts
+  'help': [
+"-msg timestamp[=on|off]",
+"                change the format of messages",
+"                on|off controls leading timestamps (default:on)"] }
+
+##
+# @--dump-vmstate:
+# !texinfo
+# -dump-vmstate @address@hidden
+# Dump json-encoded vmstate information for current machine type to file
+# in @var{file}
+# !end texinfo
+##
+{ 'option': '--dump-vmstate',
+  'data': 'str',
+  'help': [
+"-dump-vmstate <file>",
+"                Output vmstate information in JSON format to file.",
+"                Use the scripts/vmstate-static-checker.py file to",
+"                check for possible regressions in migration code",
+"                by comparing two such vmstate dumps."] }
+
+##
+# == Generic object creation
+##
+
+##
+# @--object:
+# !texinfo
+# -object @var{typename}[,@address@hidden,address@hidden
+# Create a new object of type @var{typename} setting properties
+# in the order they are specified.  Note that the 'id'
+# property must be set.  These objects are placed in the
+# '/objects' path.
+#
+# @table @option
+#
+# @item -object 
memory-backend-file,address@hidden,address@hidden,address@hidden,address@hidden|off},address@hidden|off}
+#
+# Creates a memory file backend object, which can be used to back
+# the guest RAM with huge pages. The @option{id} parameter is a
+# unique ID that will be used to reference this memory region
+# when configuring the @option{-numa} argument. The @option{size}
+# option provides the size of the memory region, and accepts
+# common suffixes, eg @option{500M}. The @option{mem-path} provides
+# the path to either a shared memory or huge page filesystem mount.
+# The @option{share} boolean option determines whether the memory
+# region is marked as private to QEMU, or shared. The latter allows
+# a co-operating external process to access the QEMU memory region.
+# Setting the @option{discard-data} boolean option to @var{on}
+# indicates that file contents can be destroyed when QEMU exits,
+# to avoid unnecessarily flushing data to the backing file.  Note
+# that @option{discard-data} is only an optimization, and QEMU
+# might not discard file contents if it aborts unexpectedly or is
+# terminated using SIGKILL.
+#
+# @item -object rng-random,address@hidden,address@hidden/dev/random}
+#
+# Creates a random number generator backend which obtains entropy from
+# a device on the host. The @option{id} parameter is a unique ID that
+# will be used to reference this entropy backend from the @option{virtio-rng}
+# device. The @option{filename} parameter specifies which file to obtain
+# entropy from and if omitted defaults to @option{/dev/random}.
+#
+# @item -object rng-egd,address@hidden,address@hidden
+#
+# Creates a random number generator backend which obtains entropy from
+# an external daemon running on the host. The @option{id} parameter is
+# a unique ID that will be used to reference this entropy backend from
+# the @option{virtio-rng} device. The @option{chardev} parameter is
+# the unique ID of a character device backend that provides the connection
+# to the RNG daemon.
+#
+# @item -object 
tls-creds-anon,address@hidden,address@hidden,address@hidden/path/to/cred/dir},address@hidden|off}
+#
+# Creates a TLS anonymous credentials object, which can be used to provide
+# TLS support on network backends. The @option{id} parameter is a unique
+# ID which network backends will use to access the credentials. The
+# @option{endpoint} is either @option{server} or @option{client} depending
+# on whether the QEMU network backend that uses the credentials will be
+# acting as a client or as a server. If @option{verify-peer} is enabled
+# (the default) then once the handshake is completed, the peer credentials
+# will be verified, though this is a no-op for anonymous credentials.
+#
+# The @var{dir} parameter tells QEMU where to find the credential
+# files. For server endpoints, this directory may contain a file
+# @var{dh-params.pem} providing diffie-hellman parameters to use
+# for the TLS server. If the file is missing, QEMU will generate
+# a set of DH parameters at startup. This is a computationally
+# expensive operation that consumes random pool entropy, so it is
+# recommended that a persistent set of parameters be generated
+# upfront and saved.
+#
+# @item -object 
tls-creds-x509,address@hidden,address@hidden,address@hidden/path/to/cred/dir},address@hidden|off},address@hidden
+#
+# Creates a TLS anonymous credentials object, which can be used to provide
+# TLS support on network backends. The @option{id} parameter is a unique
+# ID which network backends will use to access the credentials. The
+# @option{endpoint} is either @option{server} or @option{client} depending
+# on whether the QEMU network backend that uses the credentials will be
+# acting as a client or as a server. If @option{verify-peer} is enabled
+# (the default) then once the handshake is completed, the peer credentials
+# will be verified. With x509 certificates, this implies that the clients
+# must be provided with valid client certificates too.
+#
+# The @var{dir} parameter tells QEMU where to find the credential
+# files. For server endpoints, this directory may contain a file
+# @var{dh-params.pem} providing diffie-hellman parameters to use
+# for the TLS server. If the file is missing, QEMU will generate
+# a set of DH parameters at startup. This is a computationally
+# expensive operation that consumes random pool entropy, so it is
+# recommended that a persistent set of parameters be generated
+# upfront and saved.
+#
+# For x509 certificate credentials the directory will contain further files
+# providing the x509 certificates. The certificates must be stored
+# in PEM format, in filenames @var{ca-cert.pem}, @var{ca-crl.pem} (optional),
+# @var{server-cert.pem} (only servers), @var{server-key.pem} (only servers),
+# @var{client-cert.pem} (only clients), and @var{client-key.pem} (only 
clients).
+#
+# For the @var{server-key.pem} and @var{client-key.pem} files which
+# contain sensitive private keys, it is possible to use an encrypted
+# version by providing the @var{passwordid} parameter. This provides
+# the ID of a previously created @code{secret} object containing the
+# password for decryption.
+#
+# @item -object 
filter-buffer,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}][,address@hidden|off}]
+#
+# Interval @var{t} can't be 0, this filter batches the packet delivery: all
+# packets arriving in a given interval on netdev @var{netdevid} are delayed
+# until the end of the interval. Interval is in microseconds.
+# @option{status} is optional that indicate whether the netfilter is
+# on (enabled) or off (disabled), the default status for netfilter will be 
'on'.
+#
+# queue @var{all|rx|tx} is an option that can be applied to any netfilter.
+#
+# @option{all}: the filter is attached both to the receive and the transmit
+#               queue of the netdev (default).
+#
+# @option{rx}: the filter is attached to the receive queue of the netdev,
+#              where it will receive packets sent to the netdev.
+#
+# @option{tx}: the filter is attached to the transmit queue of the netdev,
+#              where it will receive packets sent by the netdev.
+#
+# @item -object 
filter-mirror,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}[,vnet_hdr_support]
+#
+# filter-mirror on netdev @var{netdevid},mirror net packet to address@hidden, 
if it has the vnet_hdr_support flag, filter-mirror will mirror packet with 
vnet_hdr_len.
+#
+# @item -object 
filter-redirector,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}[,vnet_hdr_support]
+#
+# filter-redirector on netdev @var{netdevid},redirect filter's net packet to 
chardev
+# @var{chardevid},and redirect indev's packet to filter.if it has the 
vnet_hdr_support flag,
+# filter-redirector will redirect packet with vnet_hdr_len.
+# Create a filter-redirector we need to differ outdev id from indev id, id can 
not
+# be the same. we can just use indev or outdev, but at least one of indev or 
outdev
+# need to be specified.
+#
+# @item -object 
filter-rewriter,address@hidden,address@hidden,address@hidden|rx|tx},[vnet_hdr_support]
+#
+# Filter-rewriter is a part of COLO project.It will rewrite tcp packet to
+# secondary from primary to keep secondary tcp connection,and rewrite
+# tcp packet to primary from secondary make tcp packet can be handled by
+# client.if it has the vnet_hdr_support flag, we can parse packet with vnet 
header.
+#
+# usage:
+# colo secondary:
+# -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
+# -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
+# -object filter-rewriter,id=rew0,netdev=hn0,queue=all
+#
+# @item -object 
filter-dump,address@hidden,address@hidden,address@hidden,address@hidden
+#
+# Dump the network traffic on netdev @var{dev} to the file specified by
+# @var{filename}. At most @var{len} bytes (64k by default) per packet are 
stored.
+# The file format is libpcap, so it can be analyzed with tools such as tcpdump
+# or Wireshark.
+#
+# @item -object 
colo-compare,address@hidden,address@hidden,address@hidden,address@hidden,vnet_hdr_support]
+#
+# Colo-compare gets packet from address@hidden and address@hidden, than 
compare primary packet with
+# secondary packet. If the packets are same, we will output primary
+# packet to address@hidden, else we will notify colo-frame
+# do checkpoint and send primary packet to address@hidden
+# if it has the vnet_hdr_support flag, colo compare will send/recv packet with 
vnet_hdr_len.
+#
+# we must use it with the help of filter-mirror and filter-redirector.
+#
+# @example
+#
+# primary:
+# -netdev 
tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
+# -device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
+# -chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
+# -chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
+# -chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
+# -chardev socket,id=compare0-0,host=3.3.3.3,port=9001
+# -chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
+# -chardev socket,id=compare_out0,host=3.3.3.3,port=9005
+# -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
+# -object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
+# -object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
+# -object 
colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
+#
+# secondary:
+# -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down 
script=/etc/qemu-ifdown
+# -device e1000,netdev=hn0,mac=52:a4:00:12:78:66
+# -chardev socket,id=red0,host=3.3.3.3,port=9003
+# -chardev socket,id=red1,host=3.3.3.3,port=9004
+# -object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
+# -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
+#
+# @end example
+#
+# If you want to know the detail of above command line, you can read
+# the colo-compare git log.
+#
+# @item -object cryptodev-backend-builtin,address@hidden,address@hidden
+#
+# Creates a cryptodev backend which executes crypto opreation from
+# the QEMU cipher APIS. The @var{id} parameter is
+# a unique ID that will be used to reference this cryptodev backend from
+# the @option{virtio-crypto} device. The @var{queues} parameter is optional,
+# which specify the queue number of cryptodev backend, the default of
+# @var{queues} is 1.
+#
+# @example
+#
+#  # qemu-system-x86_64 \
+#    [...] \
+#        -object cryptodev-backend-builtin,id=cryptodev0 \
+#        -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
+#    [...]
+# @end example
+#
+# @item -object 
secret,address@hidden,address@hidden,address@hidden|base64}[,address@hidden,address@hidden
+# @item -object 
secret,address@hidden,address@hidden,address@hidden|base64}[,address@hidden,address@hidden
+#
+# Defines a secret to store a password, encryption key, or some other sensitive
+# data. The sensitive data can either be passed directly via the @var{data}
+# parameter, or indirectly via the @var{file} parameter. Using the @var{data}
+# parameter is insecure unless the sensitive data is encrypted.
+#
+# The sensitive data can be provided in raw format (the default), or base64.
+# When encoded as JSON, the raw format only supports valid UTF-8 characters,
+# so base64 is recommended for sending binary data. QEMU will convert from
+# which ever format is provided to the format it needs internally. eg, an
+# RBD password can be provided in raw format, even though it will be base64
+# encoded when passed onto the RBD sever.
+#
+# For added protection, it is possible to encrypt the data associated with
+# a secret using the AES-256-CBC cipher. Use of encryption is indicated
+# by providing the @var{keyid} and @var{iv} parameters. The @var{keyid}
+# parameter provides the ID of a previously defined secret that contains
+# the AES-256 decryption key. This key should be 32-bytes long and be
+# base64 encoded. The @var{iv} parameter provides the random initialization
+# vector used for encryption of this particular secret and should be a
+# base64 encrypted string of the 16-byte IV.
+#
+# The simplest (insecure) usage is to provide the secret inline
+#
+# @example
+#
+#  # $QEMU -object secret,id=sec0,data=letmein,format=raw
+#
+# @end example
+#
+# The simplest secure usage is to provide the secret via a file
+#
+#  # printf "letmein" > mypasswd.txt
+#  # $QEMU -object secret,id=sec0,file=mypasswd.txt,format=raw
+#
+# For greater security, AES-256-CBC should be used. To illustrate usage,
+# consider the openssl command line tool which can encrypt the data. Note
+# that when encrypting, the plaintext must be padded to the cipher block
+# size (32 bytes) using the standard PKCS#5/6 compatible padding algorithm.
+#
+# First a master key needs to be created in base64 encoding:
+#
+# @example
+#  # openssl rand -base64 32 > key.b64
+#  # KEY=$(base64 -d key.b64 | hexdump  -v -e '/1 "%02X"')
+# @end example
+#
+# Each secret to be encrypted needs to have a random initialization vector
+# generated. These do not need to be kept secret
+#
+# @example
+#  # openssl rand -base64 16 > iv.b64
+#  # IV=$(base64 -d iv.b64 | hexdump  -v -e '/1 "%02X"')
+# @end example
+#
+# The secret to be defined can now be encrypted, in this case we're
+# telling openssl to base64 encode the result, but it could be left
+# as raw bytes if desired.
+#
+# @example
+#  # SECRET=$(printf "letmein" |
+#             openssl enc -aes-256-cbc -a -K $KEY -iv $IV)
+# @end example
+#
+# When launching QEMU, create a master secret pointing to @code{key.b64}
+# and specify that to be used to decrypt the user password. Pass the
+# contents of @code{iv.b64} to the second secret
+#
+# @example
+#  # $QEMU \
+#      -object secret,id=secmaster0,format=base64,file=key.b64 \
+#      -object secret,id=sec0,keyid=secmaster0,format=base64,\
+#          data=$SECRET,iv=$(<iv.b64)
+# @end example
+#
+# @end table
+# !end texinfo
+##
+{ 'option': '--object',
+  'data': 'str',                # FIXME QAPIfy qemu_object_opts: object_add
+  'help': [
+"-object TYPENAME[,PROP1=VALUE1,...]",
+"                create a new object of type TYPENAME setting properties",
+"                in the order they are specified.  Note that the 'id'",
+"                property must be set.  These objects are placed in the",
+"                '/objects' path."] }
diff --git a/qemu-doc.texi b/qemu-doc.texi
index 848e49966a..57223e2dc3 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -241,7 +241,7 @@ Linux should boot and give you a prompt.
 @var{disk_image} is a raw hard disk image for IDE hard disk 0. Some
 targets do not need a disk image.
 
address@hidden qemu-options.texi
+FIXME include options part of docs/interop/qemu-qmp-qapi.texi
 
 @c man end
 
@@ -968,7 +968,7 @@ useful yet as it was with the legacy @code{-usbdevice} 
option. So to
 configure an USB bluetooth device, you might need to use
 "@code{-usbdevice bt}[:@var{hci-type}]" instead. This configures a
 bluetooth dongle whose type is specified in the same format as with
-the @option{-bt hci} option, @pxref{bt-hcis,,allowed HCI types}.  If
+the @option{-bt hci} option, FIXME @@address@hidden,,allowed HCI 
address@hidden  If
 no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
 This USB device implements the USB Transport Layer of HCI.  Example
 usage:
diff --git a/qemu-options-wrapper.h b/qemu-options-wrapper.h
deleted file mode 100644
index 13bfea0294..0000000000
--- a/qemu-options-wrapper.h
+++ /dev/null
@@ -1,41 +0,0 @@
-
-#if defined(QEMU_OPTIONS_GENERATE_ENUM)
-
-#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)     \
-    opt_enum,
-#define DEFHEADING(text)
-#define ARCHHEADING(text, arch_mask)
-
-#elif defined(QEMU_OPTIONS_GENERATE_HELP)
-
-#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)    \
-    if ((arch_mask) & arch_type)                               \
-        fputs(opt_help, stdout);
-
-#define ARCHHEADING(text, arch_mask) \
-    if ((arch_mask) & arch_type)    \
-        puts(stringify(text));
-
-#define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL)
-
-#elif defined(QEMU_OPTIONS_GENERATE_OPTIONS)
-
-#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)     \
-    { option, opt_arg, opt_enum, arch_mask },
-#define DEFHEADING(text)
-#define ARCHHEADING(text, arch_mask)
-
-#else
-#error "qemu-options-wrapper.h included with no option defined"
-#endif
-
-#include "qemu-options.def"
-
-#undef DEF
-#undef DEFHEADING
-#undef ARCHHEADING
-#undef GEN_DOCS
-
-#undef QEMU_OPTIONS_GENERATE_ENUM
-#undef QEMU_OPTIONS_GENERATE_HELP
-#undef QEMU_OPTIONS_GENERATE_OPTIONS
diff --git a/qemu-options.h b/qemu-options.h
deleted file mode 100644
index b4ee63cd60..0000000000
--- a/qemu-options.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * qemu-options.h
- *
- * Defines needed for command line argument processing.
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- * Copyright (c) 2010 Jes Sorensen <address@hidden>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to 
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef QEMU_OPTIONS_H
-#define QEMU_OPTIONS_H
-
-enum {
-#define QEMU_OPTIONS_GENERATE_ENUM
-#include "qemu-options-wrapper.h"
-};
-
-#endif
diff --git a/qemu-options.hx b/qemu-options.hx
deleted file mode 100644
index 32afc11296..0000000000
--- a/qemu-options.hx
+++ /dev/null
@@ -1,4256 +0,0 @@
-HXCOMM Use DEFHEADING() to define headings in both help text and texi
-HXCOMM Text between STEXI and ETEXI are copied to texi version and
-HXCOMM discarded from C version
-HXCOMM DEF(option, HAS_ARG/0, opt_enum, opt_help, arch_mask) is used to
-HXCOMM construct option structures, enums and help message for specified
-HXCOMM architectures.
-HXCOMM HXCOMM can be used for comments, discarded from both texi and C
-
-DEFHEADING(Standard options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("help", 0, QEMU_OPTION_h,
-    "-h or -help     display this help and exit\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -h
address@hidden -h
-Display help and exit
-ETEXI
-
-DEF("version", 0, QEMU_OPTION_version,
-    "-version        display version information and exit\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -version
address@hidden -version
-Display version information and exit
-ETEXI
-
-DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
-    "-machine [type=]name[,prop[=value][,...]]\n"
-    "                selects emulated machine ('-machine help' for list)\n"
-    "                property accel=accel1[:accel2[:...]] selects 
accelerator\n"
-    "                supported accelerators are kvm, xen, hax or tcg (default: 
tcg)\n"
-    "                kernel_irqchip=on|off|split controls accelerated irqchip 
support (default=off)\n"
-    "                vmport=on|off|auto controls emulation of vmport (default: 
auto)\n"
-    "                kvm_shadow_mem=size of KVM shadow MMU in bytes\n"
-    "                dump-guest-core=on|off include guest memory in a core 
dump (default=on)\n"
-    "                mem-merge=on|off controls memory merge support (default: 
on)\n"
-    "                igd-passthru=on|off controls IGD GFX passthrough support 
(default=off)\n"
-    "                aes-key-wrap=on|off controls support for AES key wrapping 
(default=on)\n"
-    "                dea-key-wrap=on|off controls support for DEA key wrapping 
(default=on)\n"
-    "                suppress-vmdesc=on|off disables self-describing migration 
(default=off)\n"
-    "                nvdimm=on|off controls NVDIMM support (default=off)\n"
-    "                enforce-config-section=on|off enforce configuration 
section migration (default=off)\n"
-    "                s390-squash-mcss=on|off controls support for squashing 
into default css (default=off)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -machine address@hidden,address@hidden,...]]
address@hidden -machine
-Select the emulated machine by @var{name}. Use @code{-machine help} to list
-available machines.
-
-For architectures which aim to support live migration compatibility
-across releases, each release will introduce a new versioned machine
-type. For example, the 2.8.0 release introduced machine types
-``pc-i440fx-2.8'' and ``pc-q35-2.8'' for the x86_64/i686 architectures.
-
-To allow live migration of guests from QEMU version 2.8.0, to QEMU
-version 2.9.0, the 2.9.0 version must support the ``pc-i440fx-2.8''
-and ``pc-q35-2.8'' machines too. To allow users live migrating VMs
-to skip multiple intermediate releases when upgrading, new releases
-of QEMU will support machine types from many previous versions.
-
-Supported machine properties are:
address@hidden @option
address@hidden address@hidden:@var{accels2}[:...]]
-This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
-more than one accelerator specified, the next one is used if the previous one
-fails to initialize.
address@hidden kernel_irqchip=on|off
-Controls in-kernel irqchip support for the chosen accelerator when available.
address@hidden gfx_passthru=on|off
-Enables IGD GFX passthrough support for the chosen machine when available.
address@hidden vmport=on|off|auto
-Enables emulation of VMWare IO port, for vmmouse etc. auto says to select the
-value based on accel. For accel=xen the default is off otherwise the default
-is on.
address@hidden kvm_shadow_mem=size
-Defines the size of the KVM shadow MMU.
address@hidden dump-guest-core=on|off
-Include guest memory in a core dump. The default is on.
address@hidden mem-merge=on|off
-Enables or disables memory merge support. This feature, when supported by
-the host, de-duplicates identical memory pages among VMs instances
-(enabled by default).
address@hidden aes-key-wrap=on|off
-Enables or disables AES key wrapping support on s390-ccw hosts. This feature
-controls whether AES wrapping keys will be created to allow
-execution of AES cryptographic functions.  The default is on.
address@hidden dea-key-wrap=on|off
-Enables or disables DEA key wrapping support on s390-ccw hosts. This feature
-controls whether DEA wrapping keys will be created to allow
-execution of DEA cryptographic functions.  The default is on.
address@hidden nvdimm=on|off
-Enables or disables NVDIMM support. The default is off.
address@hidden s390-squash-mcss=on|off
-Enables or disables squashing subchannels into the default css.
-The default is off.
address@hidden enforce-config-section=on|off
-If @option{enforce-config-section} is set to @var{on}, force migration
-code to send configuration section even if the machine-type sets the
address@hidden property to @var{off}.
-NOTE: this parameter is deprecated. Please use @option{-global}
address@hidden@var{on|off} instead.
address@hidden table
-ETEXI
-
-HXCOMM Deprecated by -machine
-DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL)
-
-DEF("cpu", HAS_ARG, QEMU_OPTION_cpu,
-    "-cpu cpu        select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -cpu @var{model}
address@hidden -cpu
-Select CPU model (@code{-cpu help} for list and additional feature selection)
-ETEXI
-
-DEF("accel", HAS_ARG, QEMU_OPTION_accel,
-    "-accel [accel=]accelerator[,thread=single|multi]\n"
-    "                select accelerator (kvm, xen, hax or tcg; use 'help' for 
a list)\n"
-    "                thread=single|multi (enable multi-threaded TCG)\n", 
QEMU_ARCH_ALL)
-STEXI
address@hidden -accel @var{name}[,address@hidden,...]]
address@hidden -accel
-This is used to enable an accelerator. Depending on the target architecture,
-kvm, xen, hax or tcg can be available. By default, tcg is used. If there is
-more than one accelerator specified, the next one is used if the previous one
-fails to initialize.
address@hidden @option
address@hidden thread=single|multi
-Controls number of TCG threads. When the TCG is multi-threaded there will be 
one
-thread per vCPU therefor taking advantage of additional host cores. The default
-is to enable multi-threading where both the back-end and front-ends support it 
and
-no incompatible TCG features have been enabled (e.g. icount/replay).
address@hidden table
-ETEXI
-
-DEF("smp", HAS_ARG, QEMU_OPTION_smp,
-    "-smp 
[cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]\n"
-    "                set the number of CPUs to 'n' [default=1]\n"
-    "                maxcpus= maximum number of total cpus, including\n"
-    "                offline CPUs for hotplug, etc\n"
-    "                cores= number of CPU cores on one socket\n"
-    "                threads= number of threads on one CPU core\n"
-    "                sockets= number of discrete sockets in the system\n",
-        QEMU_ARCH_ALL)
-STEXI
address@hidden -smp 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
address@hidden -smp
-Simulate an SMP system with @var{n} CPUs. On the PC target, up to 255
-CPUs are supported. On Sparc32 target, Linux limits the number of usable CPUs
-to 4.
-For the PC target, the number of @var{cores} per socket, the number
-of @var{threads} per cores and the total number of @var{sockets} can be
-specified. Missing values will be computed. If any on the three values is
-given, the total number of CPUs @var{n} can be omitted. @var{maxcpus}
-specifies the maximum number of hotpluggable CPUs.
-ETEXI
-
-DEF("numa", HAS_ARG, QEMU_OPTION_numa,
-    "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n"
-    "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n"
-    "-numa dist,src=source,dst=destination,val=distance\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -numa 
node[,address@hidden,address@hidden@var{lastcpu}]][,address@hidden
address@hidden -numa 
node[,address@hidden,address@hidden@var{lastcpu}]][,address@hidden
address@hidden -numa dist,address@hidden,address@hidden,address@hidden
address@hidden -numa 
cpu,address@hidden,address@hidden,address@hidden,address@hidden
address@hidden -numa
-Define a NUMA node and assign RAM and VCPUs to it.
-Set the NUMA distance from a source node to a destination node.
-
-Legacy VCPU assignment uses @samp{cpus} option where
address@hidden and @var{lastcpu} are CPU indexes. Each
address@hidden option represent a contiguous range of CPU indexes
-(or a single VCPU if @var{lastcpu} is omitted). A non-contiguous
-set of VCPUs can be represented by providing multiple @samp{cpus}
-options. If @samp{cpus} is omitted on all nodes, VCPUs are automatically
-split between them.
-
-For example, the following option assigns VCPUs 0, 1, 2 and 5 to
-a NUMA node:
address@hidden
--numa node,cpus=0-2,cpus=5
address@hidden example
-
address@hidden option is a new alternative to @samp{cpus} option
-which uses @samp{socket-id|core-id|thread-id} properties to assign
-CPU objects to a @var{node} using topology layout properties of CPU.
-The set of properties is machine specific, and depends on used
-machine type/@samp{smp} options. It could be queried with
address@hidden monitor command.
address@hidden property specifies @var{node} to which CPU object
-will be assigned, it's required for @var{node} to be declared
-with @samp{node} option before it's used with @samp{cpu} option.
-
-For example:
address@hidden
--M pc \
--smp 1,sockets=2,maxcpus=2 \
--numa node,nodeid=0 -numa node,nodeid=1 \
--numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
address@hidden example
-
address@hidden assigns a given RAM amount to a node. @samp{memdev}
-assigns RAM from a given memory backend device to a node. If
address@hidden and @samp{memdev} are omitted in all nodes, RAM is
-split equally between them.
-
address@hidden and @samp{memdev} are mutually exclusive. Furthermore,
-if one node uses @samp{memdev}, all of them have to use it.
-
address@hidden and @var{destination} are NUMA node IDs.
address@hidden is the NUMA distance from @var{source} to @var{destination}.
-The distance from a node to itself is always 10. If any pair of nodes is
-given a distance, then all pairs must be given distances. Although, when
-distances are only given in one direction for each pair of nodes, then
-the distances in the opposite directions are assumed to be the same. If,
-however, an asymmetrical pair of distances is given for even one node
-pair, then all node pairs must be provided distance values for both
-directions, even when they are symmetrical. When a node is unreachable
-from another node, set the pair's distance to 255.
-
-Note that the address@hidden option doesn't allocate any of the
-specified resources, it just assigns existing resources to NUMA
-nodes. This means that one still has to use the @option{-m},
address@hidden options to allocate RAM and VCPUs respectively.
-
-ETEXI
-
-DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd,
-    "-add-fd fd=fd,set=set[,opaque=opaque]\n"
-    "                Add 'fd' to fd 'set'\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -add-fd address@hidden,address@hidden,address@hidden
address@hidden -add-fd
-
-Add a file descriptor to an fd set.  Valid options are:
-
address@hidden @option
address@hidden address@hidden
-This option defines the file descriptor of which a duplicate is added to fd 
set.
-The file descriptor cannot be stdin, stdout, or stderr.
address@hidden address@hidden
-This option defines the ID of the fd set to add the file descriptor to.
address@hidden address@hidden
-This option defines a free-form string that can be used to describe @var{fd}.
address@hidden table
-
-You can open an image using pre-opened file descriptors from an fd set:
address@hidden
-qemu-system-i386
--add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
--add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
--drive file=/dev/fdset/2,index=0,media=disk
address@hidden example
-ETEXI
-
-DEF("set", HAS_ARG, QEMU_OPTION_set,
-    "-set group.id.arg=value\n"
-    "                set <arg> parameter for item <id> of type <group>\n"
-    "                i.e. -set drive.$id.file=/path/to/image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -set @address@hidden@address@hidden
address@hidden -set
-Set parameter @var{arg} for item @var{id} of type @var{group}
-ETEXI
-
-DEF("global", HAS_ARG, QEMU_OPTION_global,
-    "-global driver.property=value\n"
-    "-global driver=driver,property=property,value=value\n"
-    "                set a global default for a driver property\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -global @address@hidden@var{value}
address@hidden -global address@hidden,address@hidden,address@hidden
address@hidden -global
-Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
-
address@hidden
-qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
address@hidden example
-
-In particular, you can use this to set driver properties for devices which are
-created automatically by the machine model. To create a device which is not
-created automatically and set properties on it, use address@hidden
-
--global @address@hidden@var{value} is shorthand for -global
address@hidden,address@hidden,address@hidden  The
-longhand syntax works even when @var{driver} contains a dot.
-ETEXI
-
-DEF("boot", HAS_ARG, QEMU_OPTION_boot,
-    "-boot [order=drives][,once=drives][,menu=on|off]\n"
-    "      
[,splash=sp_name][,splash-time=sp_time][,reboot-timeout=rb_time][,strict=on|off]\n"
-    "                'drives': floppy (a), hard disk (c), CD-ROM (d), network 
(n)\n"
-    "                'sp_name': the file's name that would be passed to bios 
as logo picture, if menu=on\n"
-    "                'sp_time': the period that splash picture last if 
menu=on, unit is ms\n"
-    "                'rb_timeout': the timeout before guest reboot when boot 
failed, unit is ms\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -boot 
address@hidden,address@hidden,menu=on|off][,address@hidden,address@hidden,address@hidden,strict=on|off]
address@hidden -boot
-Specify boot order @var{drives} as a string of drive letters. Valid
-drive letters depend on the target architecture. The x86 PC uses: a, b
-(floppy 1 and 2), c (first hard disk), d (first CD-ROM), n-p (Etherboot
-from network adapter 1-4), hard disk boot is the default. To apply a
-particular boot order only on the first startup, specify it via
address@hidden Note that the @option{order} or @option{once} parameter
-should not be used together with the @option{bootindex} property of
-devices, since the firmware implementations normally do not support both
-at the same time.
-
-Interactive boot menus/prompts can be enabled via @option{menu=on} as far
-as firmware/BIOS supports them. The default is non-interactive boot.
-
-A splash picture could be passed to bios, enabling user to show it as logo,
-when option address@hidden is given and menu=on, If firmware/BIOS
-supports them. Currently Seabios for X86 system support it.
-limitation: The splash file could be a jpeg file or a BMP file in 24 BPP
-format(true color). The resolution should be supported by the SVGA mode, so
-the recommended is 320x240, 640x480, 800x640.
-
-A timeout could be passed to bios, guest will pause for @var{rb_timeout} ms
-when boot failed, then reboot. If @var{rb_timeout} is '-1', guest will not
-reboot, qemu passes '-1' to bios by default. Currently Seabios for X86
-system support it.
-
-Do strict boot via @option{strict=on} as far as firmware/BIOS
-supports it. This only effects when boot priority is changed by
-bootindex options. The default is non-strict boot.
-
address@hidden
-# try to boot from network first, then from hard disk
-qemu-system-i386 -boot order=nc
-# boot from CD-ROM first, switch back to default order after reboot
-qemu-system-i386 -boot once=d
-# boot with a splash picture for 5 seconds.
-qemu-system-i386 -boot menu=on,splash=/root/boot.bmp,splash-time=5000
address@hidden example
-
-Note: The legacy format '-boot @var{drives}' is still supported but its
-use is discouraged as it may be removed from future versions.
-ETEXI
-
-DEF("m", HAS_ARG, QEMU_OPTION_m,
-    "-m [size=]megs[,slots=n,maxmem=size]\n"
-    "                configure guest RAM\n"
-    "                size: initial amount of guest memory\n"
-    "                slots: number of hotplug slots (default: none)\n"
-    "                maxmem: maximum amount of guest memory (default: none)\n"
-    "NOTE: Some architectures might enforce a specific granularity\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -m address@hidden,slots=n,maxmem=size]
address@hidden -m
-Sets guest startup RAM size to @var{megs} megabytes. Default is 128 MiB.
-Optionally, a suffix of ``M'' or ``G'' can be used to signify a value in
-megabytes or gigabytes respectively. Optional pair @var{slots}, @var{maxmem}
-could be used to set amount of hotpluggable memory slots and maximum amount of
-memory. Note that @var{maxmem} must be aligned to the page size.
-
-For example, the following command-line sets the guest startup RAM size to
-1GB, creates 3 slots to hotplug additional memory and sets the maximum
-memory the guest can reach to 4GB:
-
address@hidden
-qemu-system-x86_64 -m 1G,slots=3,maxmem=4G
address@hidden example
-
-If @var{slots} and @var{maxmem} are not specified, memory hotplug won't
-be enabled and the guest startup RAM will never increase.
-ETEXI
-
-DEF("mem-path", HAS_ARG, QEMU_OPTION_mempath,
-    "-mem-path FILE  provide backing storage for guest RAM\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -mem-path @var{path}
address@hidden -mem-path
-Allocate guest RAM from a temporarily created file in @var{path}.
-ETEXI
-
-DEF("mem-prealloc", 0, QEMU_OPTION_mem_prealloc,
-    "-mem-prealloc   preallocate guest memory (use with -mem-path)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -mem-prealloc
address@hidden -mem-prealloc
-Preallocate memory when using -mem-path.
-ETEXI
-
-DEF("k", HAS_ARG, QEMU_OPTION_k,
-    "-k language     use keyboard layout (for example 'fr' for French)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -k @var{language}
address@hidden -k
-Use keyboard layout @var{language} (for example @code{fr} for
-French). This option is only needed where it is not easy to get raw PC
-keycodes (e.g. on Macs, with some X11 servers or with a VNC or curses
-display). You don't normally need to use it on PC/Linux or PC/Windows
-hosts.
-
-The available layouts are:
address@hidden
-ar  de-ch  es  fo     fr-ca  hu  ja  mk     no  pt-br  sv
-da  en-gb  et  fr     fr-ch  is  lt  nl     pl  ru     th
-de  en-us  fi  fr-be  hr     it  lv  nl-be  pt  sl     tr
address@hidden example
-
-The default is @code{en-us}.
-ETEXI
-
-
-DEF("audio-help", 0, QEMU_OPTION_audio_help,
-    "-audio-help     print list of audio drivers and their options\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -audio-help
address@hidden -audio-help
-Will show the audio subsystem help: list of drivers, tunable
-parameters.
-ETEXI
-
-DEF("soundhw", HAS_ARG, QEMU_OPTION_soundhw,
-    "-soundhw c1,... enable audio support\n"
-    "                and only specified sound cards (comma separated list)\n"
-    "                use '-soundhw help' to get the list of supported cards\n"
-    "                use '-soundhw all' to enable all of them\n", 
QEMU_ARCH_ALL)
-STEXI
address@hidden -soundhw @var{card1}[,@var{card2},...] or -soundhw all
address@hidden -soundhw
-Enable audio and selected sound hardware. Use 'help' to print all
-available sound hardware.
-
address@hidden
-qemu-system-i386 -soundhw sb16,adlib disk.img
-qemu-system-i386 -soundhw es1370 disk.img
-qemu-system-i386 -soundhw ac97 disk.img
-qemu-system-i386 -soundhw hda disk.img
-qemu-system-i386 -soundhw all disk.img
-qemu-system-i386 -soundhw help
address@hidden example
-
-Note that Linux's i810_audio OSS kernel (for AC97) module might
-require manually specifying clocking.
-
address@hidden
-modprobe i810_audio clocking=48000
address@hidden example
-ETEXI
-
-DEF("balloon", HAS_ARG, QEMU_OPTION_balloon,
-    "-balloon none   disable balloon device\n"
-    "-balloon virtio[,addr=str]\n"
-    "                enable virtio balloon device (default)\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -balloon none
address@hidden -balloon
-Disable balloon device.
address@hidden -balloon virtio[,address@hidden
-Enable virtio balloon device (default), optionally with PCI address
address@hidden
-ETEXI
-
-DEF("device", HAS_ARG, QEMU_OPTION_device,
-    "-device driver[,prop[=value][,...]]\n"
-    "                add device (based on driver)\n"
-    "                prop=value,... sets driver properties\n"
-    "                use '-device help' to print all possible drivers\n"
-    "                use '-device driver,help' to print all possible 
properties\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -device @var{driver}[,@address@hidden,...]]
address@hidden -device
-Add device @var{driver}.  @address@hidden sets driver
-properties.  Valid properties depend on the driver.  To get help on
-possible drivers and properties, use @code{-device help} and
address@hidden @var{driver},help}.
-
-Some drivers are:
address@hidden -device 
ipmi-bmc-sim,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-
-Add an IPMI BMC.  This is a simulation of a hardware management
-interface processor that normally sits on a system.  It provides
-a watchdog and the ability to reset and power control the system.
-You need to connect this to an IPMI interface to make it useful
-
-The IPMI slave address to use for the BMC.  The default is 0x20.
-This address is the BMC's address on the I2C network of management
-controllers.  If you don't know what this means, it is safe to ignore
-it.
-
address@hidden @option
address@hidden address@hidden
-The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
address@hidden address@hidden
-Define slave address to use for the BMC.  The default is 0x20.
address@hidden address@hidden
-file containing raw Sensor Data Records (SDR) data. The default is none.
address@hidden address@hidden
-size of a Field Replaceable Unit (FRU) area.  The default is 1024.
address@hidden address@hidden
-file containing raw Field Replaceable Unit (FRU) inventory data. The default 
is none.
address@hidden table
-
address@hidden -device 
ipmi-bmc-extern,address@hidden,address@hidden,address@hidden
-
-Add a connection to an external IPMI BMC simulator.  Instead of
-locally emulating the BMC like the above item, instead connect
-to an external entity that provides the IPMI services.
-
-A connection is made to an external BMC simulator.  If you do this, it
-is strongly recommended that you use the "reconnect=" chardev option
-to reconnect to the simulator if the connection is lost.  Note that if
-this is not used carefully, it can be a security issue, as the
-interface has the ability to send resets, NMIs, and power off the VM.
-It's best if QEMU makes a connection to an external simulator running
-on a secure port on localhost, so neither the simulator nor QEMU is
-exposed to any outside network.
-
-See the "lanserv/README.vm" file in the OpenIPMI library for more
-details on the external interface.
-
address@hidden -device isa-ipmi-kcs,address@hidden,address@hidden,address@hidden
-
-Add a KCS IPMI interafce on the ISA bus.  This also adds a
-corresponding ACPI and SMBIOS entries, if appropriate.
-
address@hidden @option
address@hidden address@hidden
-The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above.
address@hidden address@hidden
-Define the I/O address of the interface.  The default is 0xca0 for KCS.
address@hidden address@hidden
-Define the interrupt to use.  The default is 5.  To disable interrupts,
-set this to 0.
address@hidden table
-
address@hidden -device isa-ipmi-bt,address@hidden,address@hidden,address@hidden
-
-Like the KCS interface, but defines a BT interface.  The default port is
-0xe4 and the default interrupt is 5.
-
-ETEXI
-
-DEF("name", HAS_ARG, QEMU_OPTION_name,
-    "-name string1[,process=string2][,debug-threads=on|off]\n"
-    "                set the name of the guest\n"
-    "                string1 sets the window title and string2 the process 
name (on Linux)\n"
-    "                When debug-threads is enabled, individual threads are 
given a separate name (on Linux)\n"
-    "                NOTE: The thread names are for debugging and not a stable 
API.\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -name @var{name}
address@hidden -name
-Sets the @var{name} of the guest.
-This name will be displayed in the SDL window caption.
-The @var{name} will also be used for the VNC server.
-Also optionally set the top visible process name in Linux.
-Naming of individual threads can also be enabled on Linux to aid debugging.
-ETEXI
-
-DEF("uuid", HAS_ARG, QEMU_OPTION_uuid,
-    "-uuid %08x-%04x-%04x-%04x-%012x\n"
-    "                specify machine UUID\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -uuid @var{uuid}
address@hidden -uuid
-Set system UUID.
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Block device options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("fda", HAS_ARG, QEMU_OPTION_fda,
-    "-fda/-fdb file  use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
-DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
-STEXI
address@hidden -fda @var{file}
address@hidden -fdb @var{file}
address@hidden -fda
address@hidden -fdb
-Use @var{file} as floppy disk 0/1 image (@pxref{disk_images}).
-ETEXI
-
-DEF("hda", HAS_ARG, QEMU_OPTION_hda,
-    "-hda/-hdb file  use 'file' as IDE hard disk 0/1 image\n", QEMU_ARCH_ALL)
-DEF("hdb", HAS_ARG, QEMU_OPTION_hdb, "", QEMU_ARCH_ALL)
-DEF("hdc", HAS_ARG, QEMU_OPTION_hdc,
-    "-hdc/-hdd file  use 'file' as IDE hard disk 2/3 image\n", QEMU_ARCH_ALL)
-DEF("hdd", HAS_ARG, QEMU_OPTION_hdd, "", QEMU_ARCH_ALL)
-STEXI
address@hidden -hda @var{file}
address@hidden -hdb @var{file}
address@hidden -hdc @var{file}
address@hidden -hdd @var{file}
address@hidden -hda
address@hidden -hdb
address@hidden -hdc
address@hidden -hdd
-Use @var{file} as hard disk 0, 1, 2 or 3 image (@pxref{disk_images}).
-ETEXI
-
-DEF("cdrom", HAS_ARG, QEMU_OPTION_cdrom,
-    "-cdrom file     use 'file' as IDE cdrom image (cdrom is ide1 master)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -cdrom @var{file}
address@hidden -cdrom
-Use @var{file} as CD-ROM image (you cannot use @option{-hdc} and
address@hidden at the same time). You can use the host CD-ROM by
-using @file{/dev/cdrom} as filename (@pxref{host_drives}).
-ETEXI
-
-DEF("blockdev", HAS_ARG, QEMU_OPTION_blockdev,
-    "-blockdev [driver=]driver[,node-name=N][,discard=ignore|unmap]\n"
-    "          [,cache.direct=on|off][,cache.no-flush=on|off]\n"
-    "          [,read-only=on|off][,detect-zeroes=on|off|unmap]\n"
-    "          [,driver specific parameters...]\n"
-    "                configure a block backend\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -blockdev @var{option}[,@var{option}[,@var{option}[,...]]]
address@hidden -blockdev
-
-Define a new block driver node. Some of the options apply to all block drivers,
-other options are only accepted for a specific block driver. See below for a
-list of generic options and options for the most common block drivers.
-
-Options that expect a reference to another node (e.g. @code{file}) can be
-given in two ways. Either you specify the node name of an already existing node
-(address@hidden), or you define a new node inline, adding options
-for the referenced node after a dot (address@hidden,file.aio=native).
-
-A block driver node created with @option{-blockdev} can be used for a guest
-device by specifying its node name for the @code{drive} property in a
address@hidden argument that defines a block device.
-
address@hidden @option
address@hidden Valid options for any block driver node:
-
address@hidden @code
address@hidden driver
-Specifies the block driver to use for the given node.
address@hidden node-name
-This defines the name of the block driver node by which it will be referenced
-later. The name must be unique, i.e. it must not match the name of a different
-block driver node, or (if you use @option{-drive} as well) the ID of a drive.
-
-If no node name is specified, it is automatically generated. The generated node
-name is not intended to be predictable and changes between QEMU invocations.
-For the top level, an explicit node name must be specified.
address@hidden read-only
-Open the node read-only. Guest write attempts will fail.
address@hidden cache.direct
-The host page cache can be avoided with @option{cache.direct=on}. This will
-attempt to do disk IO directly to the guest's memory. QEMU may still perform an
-internal copy of the data.
address@hidden cache.no-flush
-In case you don't care about data integrity over host failures, you can use
address@hidden This option tells QEMU that it never needs to write
-any data to the disk but can instead keep things in cache. If anything goes
-wrong, like your host losing power, the disk storage getting disconnected
-accidentally, etc. your image will most probably be rendered unusable.
address@hidden address@hidden
address@hidden is one of "ignore" (or "off") or "unmap" (or "on") and controls
-whether @code{discard} (also known as @code{trim} or @code{unmap}) requests are
-ignored or passed to the filesystem. Some machine types may not support
-discard requests.
address@hidden address@hidden
address@hidden is "off", "on" or "unmap" and enables the automatic
-conversion of plain zero writes by the OS to driver specific optimized
-zero write commands. You may even choose "unmap" if @var{discard} is set
-to "unmap" to allow a zero write to be converted to an @code{unmap} operation.
address@hidden table
-
address@hidden Driver-specific options for @code{file}
-
-This is the protocol-level block driver for accessing regular files.
-
address@hidden @code
address@hidden filename
-The path to the image file in the local filesystem
address@hidden aio
-Specifies the AIO backend (threads/native, default: threads)
address@hidden table
-Example:
address@hidden
--blockdev driver=file,node-name=disk,filename=disk.img
address@hidden example
-
address@hidden Driver-specific options for @code{raw}
-
-This is the image format block driver for raw images. It is usually
-stacked on top of a protocol level block driver such as @code{file}.
-
address@hidden @code
address@hidden file
-Reference to or definition of the data source block driver node
-(e.g. a @code{file} driver node)
address@hidden table
-Example 1:
address@hidden
--blockdev driver=file,node-name=disk_file,filename=disk.img
--blockdev driver=raw,node-name=disk,file=disk_file
address@hidden example
-Example 2:
address@hidden
--blockdev driver=raw,node-name=disk,file.driver=file,file.filename=disk.img
address@hidden example
-
address@hidden Driver-specific options for @code{qcow2}
-
-This is the image format block driver for qcow2 images. It is usually
-stacked on top of a protocol level block driver such as @code{file}.
-
address@hidden @code
address@hidden file
-Reference to or definition of the data source block driver node
-(e.g. a @code{file} driver node)
-
address@hidden backing
-Reference to or definition of the backing file block device (default is taken
-from the image file). It is allowed to pass an empty string here in order to
-disable the default backing file.
-
address@hidden lazy-refcounts
-Whether to enable the lazy refcounts feature (on/off; default is taken from the
-image file)
-
address@hidden cache-size
-The maximum total size of the L2 table and refcount block caches in bytes
-(default: 1048576 bytes or 8 clusters, whichever is larger)
-
address@hidden l2-cache-size
-The maximum size of the L2 table cache in bytes
-(default: 4/5 of the total cache size)
-
address@hidden refcount-cache-size
-The maximum size of the refcount block cache in bytes
-(default: 1/5 of the total cache size)
-
address@hidden cache-clean-interval
-Clean unused entries in the L2 and refcount caches. The interval is in seconds.
-The default value is 0 and it disables this feature.
-
address@hidden pass-discard-request
-Whether discard requests to the qcow2 device should be forwarded to the data
-source (on/off; default: on if discard=unmap is specified, off otherwise)
-
address@hidden pass-discard-snapshot
-Whether discard requests for the data source should be issued when a snapshot
-operation (e.g. deleting a snapshot) frees clusters in the qcow2 file (on/off;
-default: on)
-
address@hidden pass-discard-other
-Whether discard requests for the data source should be issued on other
-occasions where a cluster gets freed (on/off; default: off)
-
address@hidden overlap-check
-Which overlap checks to perform for writes to the image
-(none/constant/cached/all; default: cached). For details or finer
-granularity control refer to the QAPI documentation of @code{blockdev-add}.
address@hidden table
-
-Example 1:
address@hidden
--blockdev driver=file,node-name=my_file,filename=/tmp/disk.qcow2
--blockdev 
driver=qcow2,node-name=hda,file=my_file,overlap-check=none,cache-size=16777216
address@hidden example
-Example 2:
address@hidden
--blockdev 
driver=qcow2,node-name=disk,file.driver=http,file.filename=http://example.com/image.qcow2
address@hidden example
-
address@hidden Driver-specific options for other drivers
-Please refer to the QAPI documentation of the @code{blockdev-add} QMP command.
-
address@hidden table
-
-ETEXI
-
-DEF("drive", HAS_ARG, QEMU_OPTION_drive,
-    "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
-    "       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
-    "       
[,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
-    "       [,serial=s][,addr=A][,rerror=ignore|stop|report]\n"
-    "       
[,werror=ignore|stop|report|enospc][,id=name][,aio=threads|native]\n"
-    "       [,readonly=on|off][,copy-on-read=on|off]\n"
-    "       [,discard=ignore|unmap][,detect-zeroes=on|off|unmap]\n"
-    "       [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]]\n"
-    "       [[,iops=i]|[[,iops_rd=r][,iops_wr=w]]]\n"
-    "       [[,bps_max=bm]|[[,bps_rd_max=rm][,bps_wr_max=wm]]]\n"
-    "       [[,iops_max=im]|[[,iops_rd_max=irm][,iops_wr_max=iwm]]]\n"
-    "       [[,iops_size=is]]\n"
-    "       [[,group=g]]\n"
-    "                use 'file' as a drive image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -drive @var{option}[,@var{option}[,@var{option}[,...]]]
address@hidden -drive
-
-Define a new drive. This includes creating a block driver node (the backend) as
-well as a guest device, and is mostly a shortcut for defining the corresponding
address@hidden and @option{-device} options.
-
address@hidden accepts all options that are accepted by @option{-blockdev}. In
-addition, it knows the following options:
-
address@hidden @option
address@hidden address@hidden
-This option defines which disk image (@pxref{disk_images}) to use with
-this drive. If the filename contains comma, you must double it
-(for instance, "file=my,,file" to use file "my,file").
-
-Special files such as iSCSI devices can be specified using protocol
-specific URLs. See the section for "Device URL Syntax" for more information.
address@hidden address@hidden
-This option defines on which type on interface the drive is connected.
-Available types are: ide, scsi, sd, mtd, floppy, pflash, virtio, none.
address@hidden address@hidden,address@hidden
-These options define where is connected the drive by defining the bus number 
and
-the unit id.
address@hidden address@hidden
-This option defines where is connected the drive by using an index in the list
-of available connectors of a given interface type.
address@hidden address@hidden
-This option defines the type of the media: disk or cdrom.
address@hidden address@hidden,address@hidden,address@hidden,address@hidden
-These options have the same definition as they have in @option{-hdachs}.
-These parameters are deprecated, use the corresponding parameters
-of @code{-device} instead.
address@hidden address@hidden
address@hidden is "on" or "off" and controls snapshot mode for the given drive
-(see @option{-snapshot}).
address@hidden address@hidden
address@hidden is "none", "writeback", "unsafe", "directsync" or "writethrough"
-and controls how the host cache is used to access block data. This is a
-shortcut that sets the @option{cache.direct} and @option{cache.no-flush}
-options (as in @option{-blockdev}), and additionally @option{cache.writeback},
-which provides a default for the @option{write-cache} option of block guest
-devices (as in @option{-device}). The modes correspond to the following
-settings:
-
address@hidden Our texi2pod.pl script doesn't support @multitable, so fall back 
to using
address@hidden plain ASCII art (well, UTF-8 art really). This looks okay both 
in the manpage
address@hidden and the HTML output.
address@hidden
-@             │ cache.writeback   cache.direct   cache.no-flush
-─────────────┼─────────────────────────────────────────────────
-writeback    │ on                off            off
-none         │ on                on             off
-writethrough │ off               off            off
-directsync   │ off               on             off
-unsafe       │ on                off            on
address@hidden example
-
-The default mode is @option{cache=writeback}.
-
address@hidden address@hidden
address@hidden is "threads", or "native" and selects between pthread based disk 
I/O and native Linux AIO.
address@hidden address@hidden
-Specify which disk @var{format} will be used rather than detecting
-the format.  Can be used to specify format=raw to avoid interpreting
-an untrusted format header.
address@hidden address@hidden
-This option specifies the serial number to assign to the device. This
-parameter is deprecated, use the corresponding parameter of @code{-device}
-instead.
address@hidden address@hidden
-Specify the controller's PCI address (if=virtio only). This parameter is
-deprecated, use the corresponding parameter of @code{-device} instead.
address@hidden address@hidden,address@hidden
-Specify which @var{action} to take on write and read errors. Valid actions are:
-"ignore" (ignore the error and try to continue), "stop" (pause QEMU),
-"report" (report the error to the guest), "enospc" (pause QEMU only if the
-host disk is full; report the error to the guest otherwise).
-The default setting is @option{werror=enospc} and @option{rerror=report}.
address@hidden address@hidden
address@hidden is "on" or "off" and enables whether to copy read backing
-file sectors into the image file.
address@hidden address@hidden,address@hidden,address@hidden
-Specify bandwidth throttling limits in bytes per second, either for all request
-types or for reads or writes only.  Small values can lead to timeouts or hangs
-inside the guest.  A safe minimum for disks is 2 MB/s.
address@hidden address@hidden,address@hidden,address@hidden
-Specify bursts in bytes per second, either for all request types or for reads
-or writes only.  Bursts allow the guest I/O to spike above the limit
-temporarily.
address@hidden address@hidden,address@hidden,address@hidden
-Specify request rate limits in requests per second, either for all request
-types or for reads or writes only.
address@hidden address@hidden,address@hidden,address@hidden
-Specify bursts in requests per second, either for all request types or for 
reads
-or writes only.  Bursts allow the guest I/O to spike above the limit
-temporarily.
address@hidden address@hidden
-Let every @var{is} bytes of a request count as a new request for iops
-throttling purposes.  Use this option to prevent guests from circumventing iops
-limits by sending fewer but larger requests.
address@hidden address@hidden
-Join a throttling quota group with given name @var{g}.  All drives that are
-members of the same group are accounted for together.  Use this option to
-prevent guests from circumventing throttling limits by using many small disks
-instead of a single larger disk.
address@hidden table
-
-By default, the @option{cache.writeback=on} mode is used. It will report data
-writes as completed as soon as the data is present in the host page cache.
-This is safe as long as your guest OS makes sure to correctly flush disk caches
-where needed. If your guest OS does not handle volatile disk write caches
-correctly and your host crashes or loses power, then the guest may experience
-data corruption.
-
-For such guests, you should consider using @option{cache.writeback=off}. This
-means that the host page cache will be used to read and write data, but write
-notification will be sent to the guest only after QEMU has made sure to flush
-each write to the disk. Be aware that this has a major impact on performance.
-
-When using the @option{-snapshot} option, unsafe caching is always used.
-
-Copy-on-read avoids accessing the same backing file sectors repeatedly and is
-useful when the backing file is over a slow network.  By default copy-on-read
-is off.
-
-Instead of @option{-cdrom} you can use:
address@hidden
-qemu-system-i386 -drive file=file,index=2,media=cdrom
address@hidden example
-
-Instead of @option{-hda}, @option{-hdb}, @option{-hdc}, @option{-hdd}, you can
-use:
address@hidden
-qemu-system-i386 -drive file=file,index=0,media=disk
-qemu-system-i386 -drive file=file,index=1,media=disk
-qemu-system-i386 -drive file=file,index=2,media=disk
-qemu-system-i386 -drive file=file,index=3,media=disk
address@hidden example
-
-You can open an image using pre-opened file descriptors from an fd set:
address@hidden
-qemu-system-i386
--add-fd fd=3,set=2,opaque="rdwr:/path/to/file"
--add-fd fd=4,set=2,opaque="rdonly:/path/to/file"
--drive file=/dev/fdset/2,index=0,media=disk
address@hidden example
-
-You can connect a CDROM to the slave of ide0:
address@hidden
-qemu-system-i386 -drive file=file,if=ide,index=1,media=cdrom
address@hidden example
-
-If you don't specify the "file=" argument, you define an empty drive:
address@hidden
-qemu-system-i386 -drive if=ide,index=1,media=cdrom
address@hidden example
-
-Instead of @option{-fda}, @option{-fdb}, you can use:
address@hidden
-qemu-system-i386 -drive file=file,index=0,if=floppy
-qemu-system-i386 -drive file=file,index=1,if=floppy
address@hidden example
-
-By default, @var{interface} is "ide" and @var{index} is automatically
-incremented:
address@hidden
-qemu-system-i386 -drive file=a -drive file=b"
address@hidden example
-is interpreted like:
address@hidden
-qemu-system-i386 -hda a -hdb b
address@hidden example
-ETEXI
-
-DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
-    "-mtdblock file  use 'file' as on-board Flash memory image\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -mtdblock @var{file}
address@hidden -mtdblock
-Use @var{file} as on-board Flash memory image.
-ETEXI
-
-DEF("sd", HAS_ARG, QEMU_OPTION_sd,
-    "-sd file        use 'file' as SecureDigital card image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -sd @var{file}
address@hidden -sd
-Use @var{file} as SecureDigital card image.
-ETEXI
-
-DEF("pflash", HAS_ARG, QEMU_OPTION_pflash,
-    "-pflash file    use 'file' as a parallel flash image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -pflash @var{file}
address@hidden -pflash
-Use @var{file} as a parallel flash image.
-ETEXI
-
-DEF("snapshot", 0, QEMU_OPTION_snapshot,
-    "-snapshot       write to temporary files instead of disk image files\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -snapshot
address@hidden -snapshot
-Write to temporary files instead of disk image files. In this case,
-the raw disk image you use is not written back. You can however force
-the write back by pressing @key{C-a s} (@pxref{disk_images}).
-ETEXI
-
-DEF("hdachs", HAS_ARG, QEMU_OPTION_hdachs, \
-    "-hdachs c,h,s[,t]\n" \
-    "                force hard disk 0 physical geometry and the optional 
BIOS\n" \
-    "                translation (t=none or lba) (usually QEMU can guess 
them)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -hdachs @var{c},@var{h},@var{s},[,@var{t}]
address@hidden -hdachs
-Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
address@hidden <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
-translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
-all those parameters. This option is deprecated, please use
address@hidden ide-hd,cyls=c,heads=h,secs=s,...} instead.
-ETEXI
-
-DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
-    "-fsdev 
fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n"
-    " 
[,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]\n"
-    " 
[[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n"
-    " 
[[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n"
-    " 
[[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
-    " 
[[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n"
-    " [[,throttling.iops-size=is]]\n",
-    QEMU_ARCH_ALL)
-
-STEXI
-
address@hidden -fsdev 
@var{fsdriver},address@hidden,address@hidden,address@hidden,address@hidden,readonly][,address@hidden|address@hidden,address@hidden,address@hidden
address@hidden -fsdev
-Define a new file system device. Valid options are:
address@hidden @option
address@hidden @var{fsdriver}
-This option specifies the fs driver backend to use.
-Currently "local", "handle" and "proxy" file system drivers are supported.
address@hidden address@hidden
-Specifies identifier for this device
address@hidden address@hidden
-Specifies the export path for the file system device. Files under
-this path will be available to the 9p client on the guest.
address@hidden address@hidden
-Specifies the security model to be used for this export path.
-Supported security models are "passthrough", "mapped-xattr", "mapped-file" and 
"none".
-In "passthrough" security model, files are stored using the same
-credentials as they are created on the guest. This requires QEMU
-to run as root. In "mapped-xattr" security model, some of the file
-attributes like uid, gid, mode bits and link target are stored as
-file attributes. For "mapped-file" these attributes are stored in the
-hidden .virtfs_metadata directory. Directories exported by this security model 
cannot
-interact with other unix tools. "none" security model is same as
-passthrough except the sever won't report failures if it fails to
-set file attributes like ownership. Security model is mandatory
-only for local fsdriver. Other fsdrivers (like handle, proxy) don't take
-security model as a parameter.
address@hidden address@hidden
-This is an optional argument. The only supported value is "immediate".
-This means that host page cache will be used to read and write data but
-write notification will be sent to the guest only when the data has been
-reported as written by the storage subsystem.
address@hidden readonly
-Enables exporting 9p share as a readonly mount for guests. By default
-read-write access is given.
address@hidden address@hidden
-Enables proxy filesystem driver to use passed socket file for communicating
-with virtfs-proxy-helper
address@hidden address@hidden
-Enables proxy filesystem driver to use passed socket descriptor for
-communicating with virtfs-proxy-helper. Usually a helper like libvirt
-will create socketpair and pass one of the fds as sock_fd
address@hidden address@hidden
-Specifies the default mode for newly created files on the host. Works only
-with security models "mapped-xattr" and "mapped-file".
address@hidden address@hidden
-Specifies the default mode for newly created directories on the host. Works
-only with security models "mapped-xattr" and "mapped-file".
address@hidden table
-
--fsdev option is used along with -device driver "virtio-9p-pci".
address@hidden -device virtio-9p-pci,address@hidden,address@hidden
-Options for virtio-9p-pci driver are:
address@hidden @option
address@hidden address@hidden
-Specifies the id value specified along with -fsdev option
address@hidden address@hidden
-Specifies the tag name to be used by the guest to mount this export point
address@hidden table
-
-ETEXI
-
-DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
-    "-virtfs 
local,path=path,mount_tag=tag,security_model=[mapped-xattr|mapped-file|passthrough|none]\n"
-    "        
[,id=id][,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]\n",
-    QEMU_ARCH_ALL)
-
-STEXI
-
address@hidden -virtfs 
@var{fsdriver}[,address@hidden,address@hidden,address@hidden,address@hidden,readonly][,address@hidden|address@hidden,address@hidden,address@hidden
address@hidden -virtfs
-
-The general form of a Virtual File system pass-through options are:
address@hidden @option
address@hidden @var{fsdriver}
-This option specifies the fs driver backend to use.
-Currently "local", "handle" and "proxy" file system drivers are supported.
address@hidden address@hidden
-Specifies identifier for this device
address@hidden address@hidden
-Specifies the export path for the file system device. Files under
-this path will be available to the 9p client on the guest.
address@hidden address@hidden
-Specifies the security model to be used for this export path.
-Supported security models are "passthrough", "mapped-xattr", "mapped-file" and 
"none".
-In "passthrough" security model, files are stored using the same
-credentials as they are created on the guest. This requires QEMU
-to run as root. In "mapped-xattr" security model, some of the file
-attributes like uid, gid, mode bits and link target are stored as
-file attributes. For "mapped-file" these attributes are stored in the
-hidden .virtfs_metadata directory. Directories exported by this security model 
cannot
-interact with other unix tools. "none" security model is same as
-passthrough except the sever won't report failures if it fails to
-set file attributes like ownership. Security model is mandatory only
-for local fsdriver. Other fsdrivers (like handle, proxy) don't take security
-model as a parameter.
address@hidden address@hidden
-This is an optional argument. The only supported value is "immediate".
-This means that host page cache will be used to read and write data but
-write notification will be sent to the guest only when the data has been
-reported as written by the storage subsystem.
address@hidden readonly
-Enables exporting 9p share as a readonly mount for guests. By default
-read-write access is given.
address@hidden address@hidden
-Enables proxy filesystem driver to use passed socket file for
-communicating with virtfs-proxy-helper. Usually a helper like libvirt
-will create socketpair and pass one of the fds as sock_fd
address@hidden sock_fd
-Enables proxy filesystem driver to use passed 'sock_fd' as the socket
-descriptor for interfacing with virtfs-proxy-helper
address@hidden address@hidden
-Specifies the default mode for newly created files on the host. Works only
-with security models "mapped-xattr" and "mapped-file".
address@hidden address@hidden
-Specifies the default mode for newly created directories on the host. Works
-only with security models "mapped-xattr" and "mapped-file".
address@hidden table
-ETEXI
-
-DEF("virtfs_synth", 0, QEMU_OPTION_virtfs_synth,
-    "-virtfs_synth Create synthetic file system image\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -virtfs_synth
address@hidden -virtfs_synth
-Create synthetic file system image
-ETEXI
-
-DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi,
-    "-iscsi [user=user][,password=password]\n"
-    "       [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE\n"
-    "       [,initiator-name=initiator-iqn][,id=target-iqn]\n"
-    "       [,timeout=timeout]\n"
-    "                iSCSI session parameters\n", QEMU_ARCH_ALL)
-
-STEXI
address@hidden -iscsi
address@hidden -iscsi
-Configure iSCSI session parameters.
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(USB options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("usb", 0, QEMU_OPTION_usb,
-    "-usb            enable the USB driver (if it is not used by default 
yet)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -usb
address@hidden -usb
-Enable the USB driver (if it is not used by default yet).
-ETEXI
-
-DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
-    "-usbdevice name add the host or guest USB device 'name'\n",
-    QEMU_ARCH_ALL)
-STEXI
-
address@hidden -usbdevice @var{devname}
address@hidden -usbdevice
-Add the USB device @var{devname}. Note that this option is deprecated,
-please use @code{-device usb-...} instead. @xref{usb_devices}.
-
address@hidden @option
-
address@hidden mouse
-Virtual Mouse. This will override the PS/2 mouse emulation when activated.
-
address@hidden tablet
-Pointer device that uses absolute coordinates (like a touchscreen). This
-means QEMU is able to report the mouse position without having to grab the
-mouse. Also overrides the PS/2 mouse emulation when activated.
-
address@hidden disk:address@hidden:@var{file}
-Mass storage device based on file. The optional @var{format} argument
-will be used rather than detecting the format. Can be used to specify
address@hidden to avoid interpreting an untrusted format header.
-
address@hidden host:@address@hidden
-Pass through the host device identified by @address@hidden (Linux only).
-
address@hidden host:@var{vendor_id}:@var{product_id}
-Pass through the host device identified by @var{vendor_id}:@var{product_id}
-(Linux only).
-
address@hidden serial:address@hidden,address@hidden:@var{dev}
-Serial converter to host character device @var{dev}, see @code{-serial} for the
-available devices.
-
address@hidden braille
-Braille device.  This will use BrlAPI to display the braille output on a real
-or fake device.
-
address@hidden net:@var{options}
-Network adapter that supports CDC ethernet and RNDIS protocols.
-
address@hidden table
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Display options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("display", HAS_ARG, QEMU_OPTION_display,
-    "-display sdl[,frame=on|off][,alt_grab=on|off][,ctrl_grab=on|off]\n"
-    "            [,window_close=on|off][,gl=on|off]\n"
-    "-display gtk[,grab_on_hover=on|off][,gl=on|off]|\n"
-    "-display vnc=<display>[,<optargs>]\n"
-    "-display curses\n"
-    "-display none"
-    "                select display type\n"
-    "The default display is equivalent to\n"
-#if defined(CONFIG_GTK)
-            "\t\"-display gtk\"\n"
-#elif defined(CONFIG_SDL)
-            "\t\"-display sdl\"\n"
-#elif defined(CONFIG_COCOA)
-            "\t\"-display cocoa\"\n"
-#elif defined(CONFIG_VNC)
-            "\t\"-vnc localhost:0,to=99,id=default\"\n"
-#else
-            "\t\"-display none\"\n"
-#endif
-    , QEMU_ARCH_ALL)
-STEXI
address@hidden -display @var{type}
address@hidden -display
-Select type of display to use. This option is a replacement for the
-old style -sdl/-curses/... options. Valid values for @var{type} are
address@hidden @option
address@hidden sdl
-Display video output via SDL (usually in a separate graphics
-window; see the SDL documentation for other possibilities).
address@hidden curses
-Display video output via curses. For graphics device models which
-support a text mode, QEMU can display this output using a
-curses/ncurses interface. Nothing is displayed when the graphics
-device is in graphical mode or if the graphics device does not support
-a text mode. Generally only the VGA device models support text mode.
address@hidden none
-Do not display video output. The guest will still see an emulated
-graphics card, but its output will not be displayed to the QEMU
-user. This option differs from the -nographic option in that it
-only affects what is done with video output; -nographic also changes
-the destination of the serial and parallel port data.
address@hidden gtk
-Display video output in a GTK window. This interface provides drop-down
-menus and other UI elements to configure and control the VM during
-runtime.
address@hidden vnc
-Start a VNC server on display <arg>
address@hidden table
-ETEXI
-
-DEF("nographic", 0, QEMU_OPTION_nographic,
-    "-nographic      disable graphical output and redirect serial I/Os to 
console\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -nographic
address@hidden -nographic
-Normally, if QEMU is compiled with graphical window support, it displays
-output such as guest graphics, guest console, and the QEMU monitor in a
-window. With this option, you can totally disable graphical output so
-that QEMU is a simple command line application. The emulated serial port
-is redirected on the console and muxed with the monitor (unless
-redirected elsewhere explicitly). Therefore, you can still use QEMU to
-debug a Linux kernel with a serial console. Use @key{C-a h} for help on
-switching between the console and monitor.
-ETEXI
-
-DEF("curses", 0, QEMU_OPTION_curses,
-    "-curses         shorthand for -display curses\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -curses
address@hidden -curses
-Normally, if QEMU is compiled with graphical window support, it displays
-output such as guest graphics, guest console, and the QEMU monitor in a
-window. With this option, QEMU can display the VGA output when in text
-mode using a curses/ncurses interface. Nothing is displayed in graphical
-mode.
-ETEXI
-
-DEF("no-frame", 0, QEMU_OPTION_no_frame,
-    "-no-frame       open SDL window without a frame and window decorations\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -no-frame
address@hidden -no-frame
-Do not use decorations for SDL windows and start them using the whole
-available screen space. This makes the using QEMU in a dedicated desktop
-workspace more convenient.
-ETEXI
-
-DEF("alt-grab", 0, QEMU_OPTION_alt_grab,
-    "-alt-grab       use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -alt-grab
address@hidden -alt-grab
-Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also
-affects the special keys (for fullscreen, monitor-mode switching, etc).
-ETEXI
-
-DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab,
-    "-ctrl-grab      use Right-Ctrl to grab mouse (instead of Ctrl-Alt)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -ctrl-grab
address@hidden -ctrl-grab
-Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also
-affects the special keys (for fullscreen, monitor-mode switching, etc).
-ETEXI
-
-DEF("no-quit", 0, QEMU_OPTION_no_quit,
-    "-no-quit        disable SDL window close capability\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -no-quit
address@hidden -no-quit
-Disable SDL window close capability.
-ETEXI
-
-DEF("sdl", 0, QEMU_OPTION_sdl,
-    "-sdl            shorthand for -display sdl\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -sdl
address@hidden -sdl
-Enable SDL.
-ETEXI
-
-DEF("spice", HAS_ARG, QEMU_OPTION_spice,
-    "-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
-    "       [,x509-key-file=<file>][,x509-key-password=<file>]\n"
-    "       [,x509-cert-file=<file>][,x509-cacert-file=<file>]\n"
-    "       [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6|unix]\n"
-    "       [,tls-ciphers=<list>]\n"
-    "       [,tls-channel=[main|display|cursor|inputs|record|playback]]\n"
-    "       
[,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n"
-    "       [,sasl][,password=<secret>][,disable-ticketing]\n"
-    "       [,image-compression=[auto_glz|auto_lz|quic|glz|lz|off]]\n"
-    "       [,jpeg-wan-compression=[auto|never|always]]\n"
-    "       [,zlib-glz-wan-compression=[auto|never|always]]\n"
-    "       [,streaming-video=[off|all|filter]][,disable-copy-paste]\n"
-    "       [,disable-agent-file-xfer][,agent-mouse=[on|off]]\n"
-    "       [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n"
-    "       [,gl=[on|off]][,rendernode=<file>]\n"
-    "   enable spice\n"
-    "   at least one of {port, tls-port} is mandatory\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -spice @var{option}[,@var{option}[,...]]
address@hidden -spice
-Enable the spice remote desktop protocol. Valid options are
-
address@hidden @option
-
address@hidden port=<nr>
-Set the TCP port spice is listening on for plaintext channels.
-
address@hidden addr=<addr>
-Set the IP address spice is listening on.  Default is any address.
-
address@hidden ipv4
address@hidden ipv6
address@hidden unix
-Force using the specified IP version.
-
address@hidden password=<secret>
-Set the password you need to authenticate.
-
address@hidden sasl
-Require that the client use SASL to authenticate with the spice.
-The exact choice of authentication method used is controlled from the
-system / user's SASL configuration file for the 'qemu' service. This
-is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
-unprivileged user, an environment variable SASL_CONF_PATH can be used
-to make it search alternate locations for the service config.
-While some SASL auth methods can also provide data encryption (eg GSSAPI),
-it is recommended that SASL always be combined with the 'tls' and
-'x509' settings to enable use of SSL and server certificates. This
-ensures a data encryption preventing compromise of authentication
-credentials.
-
address@hidden disable-ticketing
-Allow client connects without authentication.
-
address@hidden disable-copy-paste
-Disable copy paste between the client and the guest.
-
address@hidden disable-agent-file-xfer
-Disable spice-vdagent based file-xfer between the client and the guest.
-
address@hidden tls-port=<nr>
-Set the TCP port spice is listening on for encrypted channels.
-
address@hidden x509-dir=<dir>
-Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir
-
address@hidden x509-key-file=<file>
address@hidden x509-key-password=<file>
address@hidden x509-cert-file=<file>
address@hidden x509-cacert-file=<file>
address@hidden x509-dh-key-file=<file>
-The x509 file names can also be configured individually.
-
address@hidden tls-ciphers=<list>
-Specify which ciphers to use.
-
address@hidden tls-channel=[main|display|cursor|inputs|record|playback]
address@hidden plaintext-channel=[main|display|cursor|inputs|record|playback]
-Force specific channel to be used with or without TLS encryption.  The
-options can be specified multiple times to configure multiple
-channels.  The special name "default" can be used to set the default
-mode.  For channels which are not explicitly forced into one mode the
-spice client is allowed to pick tls/plaintext as he pleases.
-
address@hidden image-compression=[auto_glz|auto_lz|quic|glz|lz|off]
-Configure image compression (lossless).
-Default is auto_glz.
-
address@hidden jpeg-wan-compression=[auto|never|always]
address@hidden zlib-glz-wan-compression=[auto|never|always]
-Configure wan image compression (lossy for slow links).
-Default is auto.
-
address@hidden streaming-video=[off|all|filter]
-Configure video stream detection.  Default is off.
-
address@hidden agent-mouse=[on|off]
-Enable/disable passing mouse events via vdagent.  Default is on.
-
address@hidden playback-compression=[on|off]
-Enable/disable audio stream compression (using celt 0.5.1).  Default is on.
-
address@hidden seamless-migration=[on|off]
-Enable/disable spice seamless migration. Default is off.
-
address@hidden gl=[on|off]
-Enable/disable OpenGL context. Default is off.
-
address@hidden rendernode=<file>
-DRM render node for OpenGL rendering. If not specified, it will pick
-the first available. (Since 2.9)
-
address@hidden table
-ETEXI
-
-DEF("portrait", 0, QEMU_OPTION_portrait,
-    "-portrait       rotate graphical output 90 deg left (only PXA LCD)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -portrait
address@hidden -portrait
-Rotate graphical output 90 deg left (only PXA LCD).
-ETEXI
-
-DEF("rotate", HAS_ARG, QEMU_OPTION_rotate,
-    "-rotate <deg>   rotate graphical output some deg left (only PXA LCD)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -rotate @var{deg}
address@hidden -rotate
-Rotate graphical output some deg left (only PXA LCD).
-ETEXI
-
-DEF("vga", HAS_ARG, QEMU_OPTION_vga,
-    "-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]\n"
-    "                select video card type\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -vga @var{type}
address@hidden -vga
-Select type of VGA card to emulate. Valid values for @var{type} are
address@hidden @option
address@hidden cirrus
-Cirrus Logic GD5446 Video card. All Windows versions starting from
-Windows 95 should recognize and use this graphic card. For optimal
-performances, use 16 bit color depth in the guest and the host OS.
-(This card was the default before QEMU 2.2)
address@hidden std
-Standard VGA card with Bochs VBE extensions.  If your guest OS
-supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want
-to use high resolution modes (>= 1280x1024x16) then you should use
-this option. (This card is the default since QEMU 2.2)
address@hidden vmware
-VMWare SVGA-II compatible adapter. Use it if you have sufficiently
-recent XFree86/XOrg server or Windows guest with a driver for this
-card.
address@hidden qxl
-QXL paravirtual graphic card.  It is VGA compatible (including VESA
-2.0 VBE support).  Works best with qxl guest drivers installed though.
-Recommended choice when using the spice protocol.
address@hidden tcx
-(sun4m only) Sun TCX framebuffer. This is the default framebuffer for
-sun4m machines and offers both 8-bit and 24-bit colour depths at a
-fixed resolution of 1024x768.
address@hidden cg3
-(sun4m only) Sun cgthree framebuffer. This is a simple 8-bit framebuffer
-for sun4m machines available in both 1024x768 (OpenBIOS) and 1152x900 (OBP)
-resolutions aimed at people wishing to run older Solaris versions.
address@hidden virtio
-Virtio VGA card.
address@hidden none
-Disable VGA card.
address@hidden table
-ETEXI
-
-DEF("full-screen", 0, QEMU_OPTION_full_screen,
-    "-full-screen    start in full screen\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -full-screen
address@hidden -full-screen
-Start in full screen.
-ETEXI
-
-DEF("g", 1, QEMU_OPTION_g ,
-    "-g WxH[xDEPTH]  Set the initial graphical resolution and depth\n",
-    QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
-STEXI
address@hidden -g @address@hidden@var{depth}]
address@hidden -g
-Set the initial graphical resolution and depth (PPC, SPARC only).
-ETEXI
-
-DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
-    "-vnc <display>  shorthand for -display vnc=<display>\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -vnc @var{display}[,@var{option}[,@var{option}[,...]]]
address@hidden -vnc
-Normally, if QEMU is compiled with graphical window support, it displays
-output such as guest graphics, guest console, and the QEMU monitor in a
-window. With this option, you can have QEMU listen on VNC display
address@hidden and redirect the VGA display over the VNC session. It is
-very useful to enable the usb tablet device when using this option
-(option @option{-device usb-tablet}). When using the VNC display, you
-must use the @option{-k} parameter to set the keyboard layout if you are
-not using en-us. Valid syntax for the @var{display} is
-
address@hidden @option
-
address@hidden address@hidden
-
-With this option, QEMU will try next available VNC @var{display}s, until the
-number @var{L}, if the origianlly defined "-vnc @var{display}" is not
-available, e.g. port address@hidden is already used by another
-application. By default, to=0.
-
address@hidden @var{host}:@var{d}
-
-TCP connections will only be allowed from @var{host} on display @var{d}.
-By convention the TCP port is address@hidden Optionally, @var{host} can
-be omitted in which case the server will accept connections from any host.
-
address@hidden unix:@var{path}
-
-Connections will be allowed over UNIX domain sockets where @var{path} is the
-location of a unix socket to listen for connections on.
-
address@hidden none
-
-VNC is initialized but not started. The monitor @code{change} command
-can be used to later start the VNC server.
-
address@hidden table
-
-Following the @var{display} value there may be one or more @var{option} flags
-separated by commas. Valid options are
-
address@hidden @option
-
address@hidden reverse
-
-Connect to a listening VNC client via a ``reverse'' connection. The
-client is specified by the @var{display}. For reverse network
-connections (@var{host}:@var{d},@code{reverse}), the @var{d} argument
-is a TCP port number, not a display number.
-
address@hidden websocket
-
-Opens an additional TCP listening port dedicated to VNC Websocket connections.
-If a bare @var{websocket} option is given, the Websocket port is
address@hidden An alternative port can be specified with the
-syntax @address@hidden
-
-If @var{host} is specified connections will only be allowed from this host.
-It is possible to control the websocket listen address independently, using
-the syntax @address@hidden:@var{port}.
-
-If no TLS credentials are provided, the websocket connection runs in
-unencrypted mode. If TLS credentials are provided, the websocket connection
-requires encrypted client connections.
-
address@hidden password
-
-Require that password based authentication is used for client connections.
-
-The password must be set separately using the @code{set_password} command in
-the @ref{pcsys_monitor}. The syntax to change your password is:
address@hidden <protocol> <password>} where <protocol> could be either
-"vnc" or "spice".
-
-If you would like to change <protocol> password expiration, you should use
address@hidden <protocol> <expiration-time>} where expiration time could
-be one of the following options: now, never, +seconds or UNIX time of
-expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800
-to make password expire on "Mon Apr 23 12:00:00 EDT 2012" (UNIX time for this
-date and time).
-
-You can also use keywords "now" or "never" for the expiration time to
-allow <protocol> password to expire immediately or never expire.
-
address@hidden address@hidden
-
-Provides the ID of a set of TLS credentials to use to secure the
-VNC server. They will apply to both the normal VNC server socket
-and the websocket socket (if enabled). Setting TLS credentials
-will cause the VNC server socket to enable the VeNCrypt auth
-mechanism.  The credentials should have been previously created
-using the @option{-object tls-creds} argument.
-
-The @option{tls-creds} parameter obsoletes the @option{tls},
address@hidden, and @option{x509verify} options, and as such
-it is not permitted to set both new and old type options at
-the same time.
-
address@hidden tls
-
-Require that client use TLS when communicating with the VNC server. This
-uses anonymous TLS credentials so is susceptible to a man-in-the-middle
-attack. It is recommended that this option be combined with either the
address@hidden or @option{x509verify} options.
-
-This option is now deprecated in favor of using the @option{tls-creds}
-argument.
-
address@hidden address@hidden/path/to/certificate/dir}
-
-Valid if @option{tls} is specified. Require that x509 credentials are used
-for negotiating the TLS session. The server will send its x509 certificate
-to the client. It is recommended that a password be set on the VNC server
-to provide authentication of the client when this is used. The path following
-this option specifies where the x509 certificates are to be loaded from.
-See the @ref{vnc_security} section for details on generating certificates.
-
-This option is now deprecated in favour of using the @option{tls-creds}
-argument.
-
address@hidden address@hidden/path/to/certificate/dir}
-
-Valid if @option{tls} is specified. Require that x509 credentials are used
-for negotiating the TLS session. The server will send its x509 certificate
-to the client, and request that the client send its own x509 certificate.
-The server will validate the client's certificate against the CA certificate,
-and reject clients when validation fails. If the certificate authority is
-trusted, this is a sufficient authentication mechanism. You may still wish
-to set a password on the VNC server as a second authentication layer. The
-path following this option specifies where the x509 certificates are to
-be loaded from. See the @ref{vnc_security} section for details on generating
-certificates.
-
-This option is now deprecated in favour of using the @option{tls-creds}
-argument.
-
address@hidden sasl
-
-Require that the client use SASL to authenticate with the VNC server.
-The exact choice of authentication method used is controlled from the
-system / user's SASL configuration file for the 'qemu' service. This
-is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
-unprivileged user, an environment variable SASL_CONF_PATH can be used
-to make it search alternate locations for the service config.
-While some SASL auth methods can also provide data encryption (eg GSSAPI),
-it is recommended that SASL always be combined with the 'tls' and
-'x509' settings to enable use of SSL and server certificates. This
-ensures a data encryption preventing compromise of authentication
-credentials. See the @ref{vnc_security} section for details on using
-SASL authentication.
-
address@hidden acl
-
-Turn on access control lists for checking of the x509 client certificate
-and SASL party. For x509 certs, the ACL check is made against the
-certificate's distinguished name. This is something that looks like
address@hidden,O=ACME,L=Boston,CN=bob}. For SASL party, the ACL check is
-made against the username, which depending on the SASL plugin, may
-include a realm component, eg @code{bob} or @code{bob@@EXAMPLE.COM}.
-When the @option{acl} flag is set, the initial access list will be
-empty, with a @code{deny} policy. Thus no one will be allowed to
-use the VNC server until the ACLs have been loaded. This can be
-achieved using the @code{acl} monitor command.
-
address@hidden lossy
-
-Enable lossy compression methods (gradient, JPEG, ...). If this
-option is set, VNC client may receive lossy framebuffer updates
-depending on its encoding settings. Enabling this option can save
-a lot of bandwidth at the expense of quality.
-
address@hidden non-adaptive
-
-Disable adaptive encodings. Adaptive encodings are enabled by default.
-An adaptive encoding will try to detect frequently updated screen regions,
-and send updates in these regions using a lossy encoding (like JPEG).
-This can be really helpful to save bandwidth when playing videos. Disabling
-adaptive encodings restores the original static behavior of encodings
-like Tight.
-
address@hidden share=[allow-exclusive|force-shared|ignore]
-
-Set display sharing policy.  'allow-exclusive' allows clients to ask
-for exclusive access.  As suggested by the rfb spec this is
-implemented by dropping other connections.  Connecting multiple
-clients in parallel requires all clients asking for a shared session
-(vncviewer: -shared switch).  This is the default.  'force-shared'
-disables exclusive client access.  Useful for shared desktop sessions,
-where you don't want someone forgetting specify -shared disconnect
-everybody else.  'ignore' completely ignores the shared flag and
-allows everybody connect unconditionally.  Doesn't conform to the rfb
-spec but is traditional QEMU behavior.
-
address@hidden key-delay-ms
-
-Set keyboard delay, for key down and key up events, in milliseconds.
-Default is 10.  Keyboards are low-bandwidth devices, so this slowdown
-can help the device and guest to keep up and not lose events in case
-events are arriving in bulk.  Possible causes for the latter are flaky
-network connections, or scripts for automated testing.
-
address@hidden table
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-ARCHHEADING(, QEMU_ARCH_I386)
-
-ARCHHEADING(i386 target only:, QEMU_ARCH_I386)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("win2k-hack", 0, QEMU_OPTION_win2k_hack,
-    "-win2k-hack     use it when installing Windows 2000 to avoid a disk full 
bug\n",
-    QEMU_ARCH_I386)
-STEXI
address@hidden -win2k-hack
address@hidden -win2k-hack
-Use it when installing Windows 2000 to avoid a disk full bug. After
-Windows 2000 is installed, you no longer need this option (this option
-slows down the IDE transfers).
-ETEXI
-
-HXCOMM Deprecated by -rtc
-DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386)
-
-DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
-    "-no-fd-bootchk  disable boot signature checking for floppy disks\n",
-    QEMU_ARCH_I386)
-STEXI
address@hidden -no-fd-bootchk
address@hidden -no-fd-bootchk
-Disable boot signature checking for floppy disks in BIOS. May
-be needed to boot from old floppy disks.
-ETEXI
-
-DEF("no-acpi", 0, QEMU_OPTION_no_acpi,
-           "-no-acpi        disable ACPI\n", QEMU_ARCH_I386 | QEMU_ARCH_ARM)
-STEXI
address@hidden -no-acpi
address@hidden -no-acpi
-Disable ACPI (Advanced Configuration and Power Interface) support. Use
-it if your guest OS complains about ACPI problems (PC target machine
-only).
-ETEXI
-
-DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
-    "-no-hpet        disable HPET\n", QEMU_ARCH_I386)
-STEXI
address@hidden -no-hpet
address@hidden -no-hpet
-Disable HPET support.
-ETEXI
-
-DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
-    "-acpitable 
[sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
-    "                ACPI table description\n", QEMU_ARCH_I386)
-STEXI
address@hidden -acpitable 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden:@var{file2}]...]
address@hidden -acpitable
-Add ACPI table with specified header fields and context from specified files.
-For file=, take whole ACPI table from the specified files, including all
-ACPI headers (possible overridden by other options).
-For data=, only data
-portion of the table is used, all header information is specified in the
-command line.
-If a SLIC table is supplied to QEMU, then the SLIC's oem_id and oem_table_id
-fields will override the same in the RSDT and the FADT (a.k.a. FACP), in order
-to ensure the field matches required by the Microsoft SLIC spec and the ACPI
-spec.
-ETEXI
-
-DEF("smbios", HAS_ARG, QEMU_OPTION_smbios,
-    "-smbios file=binary\n"
-    "                load SMBIOS entry from binary file\n"
-    "-smbios type=0[,vendor=str][,version=str][,date=str][,release=%d.%d]\n"
-    "              [,uefi=on|off]\n"
-    "                specify SMBIOS type 0 fields\n"
-    "-smbios 
type=1[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
-    "              [,uuid=uuid][,sku=str][,family=str]\n"
-    "                specify SMBIOS type 1 fields\n"
-    "-smbios 
type=2[,manufacturer=str][,product=str][,version=str][,serial=str]\n"
-    "              [,asset=str][,location=str]\n"
-    "                specify SMBIOS type 2 fields\n"
-    "-smbios 
type=3[,manufacturer=str][,version=str][,serial=str][,asset=str]\n"
-    "              [,sku=str]\n"
-    "                specify SMBIOS type 3 fields\n"
-    "-smbios 
type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n"
-    "              [,asset=str][,part=str]\n"
-    "                specify SMBIOS type 4 fields\n"
-    "-smbios 
type=17[,loc_pfx=str][,bank=str][,manufacturer=str][,serial=str]\n"
-    "               [,asset=str][,part=str][,speed=%d]\n"
-    "                specify SMBIOS type 17 fields\n",
-    QEMU_ARCH_I386 | QEMU_ARCH_ARM)
-STEXI
address@hidden -smbios address@hidden
address@hidden -smbios
-Load SMBIOS entry from binary file.
-
address@hidden -smbios 
type=0[,address@hidden,address@hidden,address@hidden,address@hidden,uefi=on|off]
-Specify SMBIOS type 0 fields
-
address@hidden -smbios 
type=1[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Specify SMBIOS type 1 fields
-
address@hidden -smbios 
type=2[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Specify SMBIOS type 2 fields
-
address@hidden -smbios 
type=3[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Specify SMBIOS type 3 fields
-
address@hidden -smbios 
type=4[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Specify SMBIOS type 4 fields
-
address@hidden -smbios 
type=17[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Specify SMBIOS type 17 fields
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Network options:)
-STEXI
address@hidden @option
-ETEXI
-
-HXCOMM Legacy slirp options (now moved to -net user):
-#ifdef CONFIG_SLIRP
-DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL)
-DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL)
-DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL)
-#ifndef _WIN32
-DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL)
-#endif
-#endif
-
-DEF("netdev", HAS_ARG, QEMU_OPTION_netdev,
-#ifdef CONFIG_SLIRP
-    "-netdev user,id=str[,ipv4[=on|off]][,net=addr[/mask]][,host=addr]\n"
-    "         [,ipv6[=on|off]][,ipv6-net=addr[/int]][,ipv6-host=addr]\n"
-    "         [,restrict=on|off][,hostname=host][,dhcpstart=addr]\n"
-    "         [,dns=addr][,ipv6-dns=addr][,dnssearch=domain][,tftp=dir]\n"
-    "         [,bootfile=f][,hostfwd=rule][,guestfwd=rule]"
-#ifndef _WIN32
-                                             "[,smb=dir[,smbserver=addr]]\n"
-#endif
-    "                configure a user mode network backend with ID 'str',\n"
-    "                its DHCP server and optional services\n"
-#endif
-#ifdef _WIN32
-    "-netdev tap,id=str,ifname=name\n"
-    "                configure a host TAP network backend with ID 'str'\n"
-#else
-    "-netdev 
tap,id=str[,fd=h][,fds=x:y:...:z][,ifname=name][,script=file][,downscript=dfile]\n"
-    "         
[,br=bridge][,helper=helper][,sndbuf=nbytes][,vnet_hdr=on|off][,vhost=on|off]\n"
-    "         
[,vhostfd=h][,vhostfds=x:y:...:z][,vhostforce=on|off][,queues=n]\n"
-    "         [,poll-us=n]\n"
-    "                configure a host TAP network backend with ID 'str'\n"
-    "                connected to a bridge (default=" DEFAULT_BRIDGE_INTERFACE 
")\n"
-    "                use network scripts 'file' (default=" 
DEFAULT_NETWORK_SCRIPT ")\n"
-    "                to configure it and 'dfile' (default=" 
DEFAULT_NETWORK_DOWN_SCRIPT ")\n"
-    "                to deconfigure it\n"
-    "                use '[down]script=no' to disable script execution\n"
-    "                use network helper 'helper' (default=" 
DEFAULT_BRIDGE_HELPER ") to\n"
-    "                configure it\n"
-    "                use 'fd=h' to connect to an already opened TAP 
interface\n"
-    "                use 'fds=x:y:...:z' to connect to already opened 
multiqueue capable TAP interfaces\n"
-    "                use 'sndbuf=nbytes' to limit the size of the send buffer 
(the\n"
-    "                default is disabled 'sndbuf=0' to enable flow control set 
'sndbuf=1048576')\n"
-    "                use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap 
flag\n"
-    "                use vnet_hdr=on to make the lack of IFF_VNET_HDR support 
an error condition\n"
-    "                use vhost=on to enable experimental in kernel 
accelerator\n"
-    "                    (only has effect for virtio guests which use MSIX)\n"
-    "                use vhostforce=on to force vhost on for non-MSIX virtio 
guests\n"
-    "                use 'vhostfd=h' to connect to an already opened vhost net 
device\n"
-    "                use 'vhostfds=x:y:...:z to connect to multiple already 
opened vhost net devices\n"
-    "                use 'queues=n' to specify the number of queues to be 
created for multiqueue TAP\n"
-    "                use 'poll-us=n' to speciy the maximum number of 
microseconds that could be\n"
-    "                spent on busy polling for vhost net\n"
-    "-netdev bridge,id=str[,br=bridge][,helper=helper]\n"
-    "                configure a host TAP network backend with ID 'str' that 
is\n"
-    "                connected to a bridge (default=" DEFAULT_BRIDGE_INTERFACE 
")\n"
-    "                using the program 'helper (default=" 
DEFAULT_BRIDGE_HELPER ")\n"
-#endif
-#ifdef __linux__
-    "-netdev 
l2tpv3,id=str,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport]\n"
-    "         
[,rxsession=rxsession],txsession=txsession[,ipv6=on/off][,udp=on/off]\n"
-    "         [,cookie64=on/off][,counter][,pincounter][,txcookie=txcookie]\n"
-    "         [,rxcookie=rxcookie][,offset=offset]\n"
-    "                configure a network backend with ID 'str' connected to\n"
-    "                an Ethernet over L2TPv3 pseudowire.\n"
-    "                Linux kernel 3.3+ as well as most routers can talk\n"
-    "                L2TPv3. This transport allows connecting a VM to a VM,\n"
-    "                VM to a router and even VM to Host. It is a 
nearly-universal\n"
-    "                standard (RFC3391). Note - this implementation uses 
static\n"
-    "                pre-configured tunnels (same as the Linux kernel).\n"
-    "                use 'src=' to specify source address\n"
-    "                use 'dst=' to specify destination address\n"
-    "                use 'udp=on' to specify udp encapsulation\n"
-    "                use 'srcport=' to specify source udp port\n"
-    "                use 'dstport=' to specify destination udp port\n"
-    "                use 'ipv6=on' to force v6\n"
-    "                L2TPv3 uses cookies to prevent misconfiguration as\n"
-    "                well as a weak security measure\n"
-    "                use 'rxcookie=0x012345678' to specify a rxcookie\n"
-    "                use 'txcookie=0x012345678' to specify a txcookie\n"
-    "                use 'cookie64=on' to set cookie size to 64 bit, otherwise 
32\n"
-    "                use 'counter=off' to force a 'cut-down' L2TPv3 with no 
counter\n"
-    "                use 'pincounter=on' to work around broken counter 
handling in peer\n"
-    "                use 'offset=X' to add an extra offset between header and 
data\n"
-#endif
-    "-netdev socket,id=str[,fd=h][,listen=[host]:port][,connect=host:port]\n"
-    "                configure a network backend to connect to another 
network\n"
-    "                using a socket connection\n"
-    "-netdev socket,id=str[,fd=h][,mcast=maddr:port[,localaddr=addr]]\n"
-    "                configure a network backend to connect to a multicast 
maddr and port\n"
-    "                use 'localaddr=addr' to specify the host address to send 
packets from\n"
-    "-netdev socket,id=str[,fd=h][,udp=host:port][,localaddr=host:port]\n"
-    "                configure a network backend to connect to another 
network\n"
-    "                using an UDP tunnel\n"
-#ifdef CONFIG_VDE
-    "-netdev 
vde,id=str[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]\n"
-    "                configure a network backend to connect to port 'n' of a 
vde switch\n"
-    "                running on host and listening for incoming connections on 
'socketpath'.\n"
-    "                Use group 'groupname' and mode 'octalmode' to change 
default\n"
-    "                ownership and permissions for communication port.\n"
-#endif
-#ifdef CONFIG_NETMAP
-    "-netdev netmap,id=str,ifname=name[,devname=nmname]\n"
-    "                attach to the existing netmap-enabled network interface 
'name', or to a\n"
-    "                VALE port (created on the fly) called 'name' ('nmname' is 
name of the \n"
-    "                netmap device, defaults to '/dev/netmap')\n"
-#endif
-    "-netdev vhost-user,id=str,chardev=dev[,vhostforce=on|off]\n"
-    "                configure a vhost-user network, backed by a chardev 
'dev'\n"
-    "-netdev hubport,id=str,hubid=n\n"
-    "                configure a hub port on QEMU VLAN 'n'\n", QEMU_ARCH_ALL)
-DEF("net", HAS_ARG, QEMU_OPTION_net,
-    "-net 
nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\n"
-    "                old way to create a new NIC and connect it to VLAN 'n'\n"
-    "                (use the '-device devtype,netdev=str' option if possible 
instead)\n"
-    "-net dump[,vlan=n][,file=f][,len=n]\n"
-    "                dump traffic on vlan 'n' to file 'f' (max n bytes per 
packet)\n"
-    "-net none       use it alone to have zero network devices. If no -net 
option\n"
-    "                is provided, the default is '-net nic -net user'\n"
-    "-net ["
-#ifdef CONFIG_SLIRP
-    "user|"
-#endif
-    "tap|"
-    "bridge|"
-#ifdef CONFIG_VDE
-    "vde|"
-#endif
-#ifdef CONFIG_NETMAP
-    "netmap|"
-#endif
-    "socket][,vlan=n][,option][,option][,...]\n"
-    "                old way to initialize a host network interface\n"
-    "                (use the -netdev option if possible instead)\n", 
QEMU_ARCH_ALL)
-STEXI
address@hidden -net nic[,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden
address@hidden -net
-Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n}
-= 0 is the default). The NIC is an e1000 by default on the PC
-target. Optionally, the MAC address can be changed to @var{mac}, the
-device address set to @var{addr} (PCI cards only),
-and a @var{name} can be assigned for use in monitor commands.
-Optionally, for PCI cards, you can specify the number @var{v} of MSI-X vectors
-that the card should have; this option currently only affects virtio cards; set
address@hidden = 0 to disable MSI-X. If no @option{-net} option is specified, a 
single
-NIC is created.  QEMU can emulate several different models of network card.
-Valid values for @var{type} are
address@hidden, @code{i82551}, @code{i82557b}, @code{i82559er},
address@hidden, @code{ne2k_isa}, @code{pcnet}, @code{rtl8139},
address@hidden, @code{smc91c111}, @code{lance} and @code{mcf_fec}.
-Not all devices are supported on all targets.  Use @code{-net nic,model=help}
-for a list of available devices for your target.
-
address@hidden -netdev user,address@hidden,@var{option}][,@var{option}][,...]
address@hidden -netdev
address@hidden -net user[,@var{option}][,@var{option}][,...]
-Use the user mode network stack which requires no administrator
-privilege to run. Valid options are:
-
address@hidden @option
address@hidden address@hidden
-Connect user mode stack to VLAN @var{n} (@var{n} = 0 is the default).
-
address@hidden address@hidden
address@hidden address@hidden
-Assign symbolic name for use in monitor commands.
-
address@hidden and @option{ipv6} specify that either IPv4 or IPv6 must
-be enabled.  If neither is specified both protocols are enabled.
-
address@hidden address@hidden/@var{mask}]
-Set IP network address the guest will see. Optionally specify the netmask,
-either in the form a.b.c.d or as number of valid top-most bits. Default is
-10.0.2.0/24.
-
address@hidden address@hidden
-Specify the guest-visible address of the host. Default is the 2nd IP in the
-guest network, i.e. x.x.x.2.
-
address@hidden address@hidden/@var{int}]
-Set IPv6 network address the guest will see (default is fec0::/64). The
-network prefix is given in the usual hexadecimal IPv6 address
-notation. The prefix size is optional, and is given as the number of
-valid top-most bits (default is 64).
-
address@hidden address@hidden
-Specify the guest-visible IPv6 address of the host. Default is the 2nd IPv6 in
-the guest network, i.e. xxxx::2.
-
address@hidden restrict=on|off
-If this option is enabled, the guest will be isolated, i.e. it will not be
-able to contact the host and no guest IP packets will be routed over the host
-to the outside. This option does not affect any explicitly set forwarding 
rules.
-
address@hidden address@hidden
-Specifies the client hostname reported by the built-in DHCP server.
-
address@hidden address@hidden
-Specify the first of the 16 IPs the built-in DHCP server can assign. Default
-is the 15th to 31st IP in the guest network, i.e. x.x.x.15 to x.x.x.31.
-
address@hidden address@hidden
-Specify the guest-visible address of the virtual nameserver. The address must
-be different from the host address. Default is the 3rd IP in the guest network,
-i.e. x.x.x.3.
-
address@hidden address@hidden
-Specify the guest-visible address of the IPv6 virtual nameserver. The address
-must be different from the host address. Default is the 3rd IP in the guest
-network, i.e. xxxx::3.
-
address@hidden address@hidden
-Provides an entry for the domain-search list sent by the built-in
-DHCP server. More than one domain suffix can be transmitted by specifying
-this option multiple times. If supported, this will cause the guest to
-automatically try to append the given domain suffix(es) in case a domain name
-can not be resolved.
-
-Example:
address@hidden
-qemu -net user,dnssearch=mgmt.example.org,dnssearch=example.org [...]
address@hidden example
-
address@hidden address@hidden
-When using the user mode network stack, activate a built-in TFTP
-server. The files in @var{dir} will be exposed as the root of a TFTP server.
-The TFTP client on the guest must be configured in binary mode (use the command
address@hidden of the Unix TFTP client).
-
address@hidden address@hidden
-When using the user mode network stack, broadcast @var{file} as the BOOTP
-filename. In conjunction with @option{tftp}, this can be used to network boot
-a guest from a local directory.
-
-Example (using pxelinux):
address@hidden
-qemu-system-i386 -hda linux.img -boot n -net 
user,tftp=/path/to/tftp/files,bootfile=/pxelinux.0
address@hidden example
-
address@hidden address@hidden,address@hidden
-When using the user mode network stack, activate a built-in SMB
-server so that Windows OSes can access to the host files in @address@hidden
-transparently. The IP address of the SMB server can be set to @var{addr}. By
-default the 4th IP in the guest network is used, i.e. x.x.x.4.
-
-In the guest Windows OS, the line:
address@hidden
-10.0.2.4 smbserver
address@hidden example
-must be added in the file @file{C:\WINDOWS\LMHOSTS} (for windows 9x/Me)
-or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000).
-
-Then @address@hidden can be accessed in @file{\\smbserver\qemu}.
-
-Note that a SAMBA server must be installed on the host OS.
-QEMU was tested successfully with smbd versions from Red Hat 9,
-Fedora Core 3 and OpenSUSE 11.x.
-
address@hidden hostfwd=[tcp|udp]:address@hidden:@address@hidden:@var{guestport}
-Redirect incoming TCP or UDP connections to the host port @var{hostport} to
-the guest IP address @var{guestaddr} on guest port @var{guestport}. If
address@hidden is not specified, its value is x.x.x.15 (default first address
-given by the built-in DHCP server). By specifying @var{hostaddr}, the rule can
-be bound to a specific host interface. If no connection type is set, TCP is
-used. This option can be given multiple times.
-
-For example, to redirect host X11 connection from screen 1 to guest
-screen 0, use the following:
-
address@hidden
-# on the host
-qemu-system-i386 -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
-# this host xterm should open in the guest X11 server
-xterm -display :1
address@hidden example
-
-To redirect telnet connections from host port 5555 to telnet port on
-the guest, use the following:
-
address@hidden
-# on the host
-qemu-system-i386 -net user,hostfwd=tcp::5555-:23 [...]
-telnet localhost 5555
address@hidden example
-
-Then when you use on the host @code{telnet localhost 5555}, you
-connect to the guest telnet server.
-
address@hidden guestfwd=[tcp]:@var{server}:@address@hidden
address@hidden guestfwd=[tcp]:@var{server}:@address@hidden:command}
-Forward guest TCP connections to the IP address @var{server} on port @var{port}
-to the character device @var{dev} or to a program executed by @var{cmd:command}
-which gets spawned for each connection. This option can be given multiple 
times.
-
-You can either use a chardev directly and have that one used throughout QEMU's
-lifetime, like in the following example:
-
address@hidden
-# open 10.10.1.1:4321 on bootup, connect 10.0.2.100:1234 to it whenever
-# the guest accesses it
-qemu -net user,guestfwd=tcp:10.0.2.100:1234-tcp:10.10.1.1:4321 [...]
address@hidden example
-
-Or you can execute a command on every TCP connection established by the guest,
-so that QEMU behaves similar to an inetd process for that virtual server:
-
address@hidden
-# call "netcat 10.10.1.1 4321" on every TCP connection to 10.0.2.100:1234
-# and connect the TCP stream to its stdin/stdout
-qemu -net 'user,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10.1.1 4321'
address@hidden example
-
address@hidden table
-
-Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still
-processed and applied to -net user. Mixing them with the new configuration
-syntax gives undefined results. Their use for new applications is discouraged
-as they will be removed from future versions.
-
address@hidden -netdev 
tap,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
address@hidden -net 
tap[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
-Connect the host TAP network interface @var{name} to VLAN @var{n}.
-
-Use the network script @var{file} to configure it and the network script
address@hidden to deconfigure it. If @var{name} is not provided, the OS
-automatically provides one. The default network configure script is
address@hidden/etc/qemu-ifup} and the default network deconfigure script is
address@hidden/etc/qemu-ifdown}. Use @option{script=no} or 
@option{downscript=no}
-to disable script execution.
-
-If running QEMU as an unprivileged user, use the network helper
address@hidden to configure the TAP interface and attach it to the bridge.
-The default network helper executable is @file{/path/to/qemu-bridge-helper}
-and the default bridge device is @file{br0}.
-
address@hidden@var{h} can be used to specify the handle of an already
-opened host TAP interface.
-
-Examples:
-
address@hidden
-#launch a QEMU instance with the default network script
-qemu-system-i386 linux.img -net nic -net tap
address@hidden example
-
address@hidden
-#launch a QEMU instance with two NICs, each one connected
-#to a TAP device
-qemu-system-i386 linux.img \
-                 -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 \
-                 -net nic,vlan=1 -net tap,vlan=1,ifname=tap1
address@hidden example
-
address@hidden
-#launch a QEMU instance with the default network helper to
-#connect a TAP device to bridge br0
-qemu-system-i386 linux.img \
-                 -net nic -net tap,"helper=/path/to/qemu-bridge-helper"
address@hidden example
-
address@hidden -netdev bridge,address@hidden,address@hidden,address@hidden
address@hidden -net 
bridge[,address@hidden,address@hidden,address@hidden,address@hidden
-Connect a host TAP network interface to a host bridge device.
-
-Use the network helper @var{helper} to configure the TAP interface and
-attach it to the bridge. The default network helper executable is
address@hidden/path/to/qemu-bridge-helper} and the default bridge
-device is @file{br0}.
-
-Examples:
-
address@hidden
-#launch a QEMU instance with the default network helper to
-#connect a TAP device to bridge br0
-qemu-system-i386 linux.img -net bridge -net nic,model=virtio
address@hidden example
-
address@hidden
-#launch a QEMU instance with the default network helper to
-#connect a TAP device to bridge qemubr0
-qemu-system-i386 linux.img -net bridge,br=qemubr0 -net nic,model=virtio
address@hidden example
-
address@hidden -netdev 
socket,address@hidden,address@hidden,address@hidden:@var{port}][,address@hidden:@var{port}]
address@hidden -net socket[,address@hidden,address@hidden,address@hidden 
[,address@hidden:@var{port}][,address@hidden:@var{port}]
-
-Connect the VLAN @var{n} to a remote VLAN in another QEMU virtual
-machine using a TCP socket connection. If @option{listen} is
-specified, QEMU waits for incoming connections on @var{port}
-(@var{host} is optional). @option{connect} is used to connect to
-another QEMU instance using the @option{listen} option. @address@hidden
-specifies an already opened TCP socket.
-
-Example:
address@hidden
-# launch a first QEMU instance
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:56 \
-                 -net socket,listen=:1234
-# connect the VLAN 0 of this instance to the VLAN 0
-# of the first instance
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:57 \
-                 -net socket,connect=127.0.0.1:1234
address@hidden example
-
address@hidden -netdev 
socket,address@hidden,address@hidden,address@hidden:@var{port}[,address@hidden
address@hidden -net 
socket[,address@hidden,address@hidden,address@hidden,address@hidden:@var{port}[,address@hidden
-
-Create a VLAN @var{n} shared with another QEMU virtual
-machines using a UDP multicast socket, effectively making a bus for
-every QEMU with same multicast address @var{maddr} and @var{port}.
-NOTES:
address@hidden
address@hidden
-Several QEMU can be running on different hosts and share same bus (assuming
-correct multicast setup for these hosts).
address@hidden
-mcast support is compatible with User Mode Linux (argument @address@hidden), 
see
address@hidden://user-mode-linux.sf.net}.
address@hidden
-Use @option{fd=h} to specify an already opened UDP multicast socket.
address@hidden enumerate
-
-Example:
address@hidden
-# launch one QEMU instance
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:56 \
-                 -net socket,mcast=230.0.0.1:1234
-# launch another QEMU instance on same "bus"
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:57 \
-                 -net socket,mcast=230.0.0.1:1234
-# launch yet another QEMU instance on same "bus"
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:58 \
-                 -net socket,mcast=230.0.0.1:1234
address@hidden example
-
-Example (User Mode Linux compat.):
address@hidden
-# launch QEMU instance (note mcast address selected
-# is UML's default)
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:56 \
-                 -net socket,mcast=239.192.168.1:1102
-# launch UML
-/path/to/linux ubd0=/path/to/root_fs eth0=mcast
address@hidden example
-
-Example (send packets from host's 1.2.3.4):
address@hidden
-qemu-system-i386 linux.img \
-                 -net nic,macaddr=52:54:00:12:34:56 \
-                 -net socket,mcast=239.192.168.1:1102,localaddr=1.2.3.4
address@hidden example
-
address@hidden -netdev 
l2tpv3,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,ipv6][,udp][,cookie64][,counter][,pincounter][,address@hidden,address@hidden,address@hidden
address@hidden -net 
l2tpv3[,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,ipv6][,udp][,cookie64][,counter][,pincounter][,address@hidden,address@hidden,address@hidden
-Connect VLAN @var{n} to L2TPv3 pseudowire. L2TPv3 (RFC3391) is a popular
-protocol to transport Ethernet (and other Layer 2) data frames between
-two systems. It is present in routers, firewalls and the Linux kernel
-(from version 3.3 onwards).
-
-This transport allows a VM to communicate to another VM, router or firewall 
directly.
-
address@hidden @option
address@hidden address@hidden
-    source address (mandatory)
address@hidden address@hidden
-    destination address (mandatory)
address@hidden udp
-    select udp encapsulation (default is ip).
address@hidden address@hidden
-    source udp port.
address@hidden address@hidden
-    destination udp port.
address@hidden ipv6
-    force v6, otherwise defaults to v4.
address@hidden address@hidden
address@hidden address@hidden
-    Cookies are a weak form of security in the l2tpv3 specification.
-Their function is mostly to prevent misconfiguration. By default they are 32
-bit.
address@hidden cookie64
-    Set cookie size to 64 bit instead of the default 32
address@hidden counter=off
-    Force a 'cut-down' L2TPv3 with no counter as in
-draft-mkonstan-l2tpext-keyed-ipv6-tunnel-00
address@hidden pincounter=on
-    Work around broken counter handling in peer. This may also help on
-networks which have packet reorder.
address@hidden address@hidden
-    Add an extra offset between header and data
address@hidden table
-
-For example, to attach a VM running on host 4.3.2.1 via L2TPv3 to the bridge 
br-lan
-on the remote Linux host 1.2.3.4:
address@hidden
-# Setup tunnel on linux host using raw ip as encapsulation
-# on 1.2.3.4
-ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 \
-    encap udp udp_sport 16384 udp_dport 16384
-ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \
-    0xFFFFFFFF peer_session_id 0xFFFFFFFF
-ifconfig vmtunnel0 mtu 1500
-ifconfig vmtunnel0 up
-brctl addif br-lan vmtunnel0
-
-
-# on 4.3.2.1
-# launch QEMU instance - if your network has reorder or is very lossy add 
,pincounter
-
-qemu-system-i386 linux.img -net nic -net 
l2tpv3,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter
-
-
address@hidden example
-
address@hidden -netdev 
vde,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden
address@hidden -net vde[,address@hidden,address@hidden,address@hidden 
[,address@hidden,address@hidden,address@hidden
-Connect VLAN @var{n} to PORT @var{n} of a vde switch running on host and
-listening for incoming connections on @var{socketpath}. Use GROUP 
@var{groupname}
-and MODE @var{octalmode} to change default ownership and permissions for
-communication port. This option is only available if QEMU has been compiled
-with vde support enabled.
-
-Example:
address@hidden
-# launch vde switch
-vde_switch -F -sock /tmp/myswitch
-# launch QEMU instance
-qemu-system-i386 linux.img -net nic -net vde,sock=/tmp/myswitch
address@hidden example
-
address@hidden -netdev hubport,address@hidden,address@hidden
-
-Create a hub port on QEMU "vlan" @var{hubid}.
-
-The hubport netdev lets you connect a NIC to a QEMU "vlan" instead of a single
-netdev.  @code{-net} and @code{-device} with parameter @option{vlan} create the
-required hub automatically.
-
address@hidden -netdev vhost-user,address@hidden,vhostforce=on|off][,queues=n]
-
-Establish a vhost-user netdev, backed by a chardev @var{id}. The chardev should
-be a unix domain socket backed one. The vhost-user uses a specifically defined
-protocol to pass vhost ioctl replacement messages to an application on the 
other
-end of the socket. On non-MSIX guests, the feature can be forced with
address@hidden Use 'address@hidden' to specify the number of queues to
-be created for multiqueue vhost-user.
-
-Example:
address@hidden
-qemu -m 512 -object 
memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
-     -numa node,memdev=mem \
-     -chardev socket,id=chr0,path=/path/to/socket \
-     -netdev type=vhost-user,id=net0,chardev=chr0 \
-     -device virtio-net-pci,netdev=net0
address@hidden example
-
address@hidden -net dump[,address@hidden,address@hidden,address@hidden
-Dump network traffic on VLAN @var{n} to file @var{file} 
(@file{qemu-vlan0.pcap} by default).
-At most @var{len} bytes (64k by default) per packet are stored. The file 
format is
-libpcap, so it can be analyzed with tools such as tcpdump or Wireshark.
-Note: For devices created with '-netdev', use '-object filter-dump,...' 
instead.
-
address@hidden -net none
-Indicate that no network devices should be configured. It is used to
-override the default configuration (@option{-net nic -net user}) which
-is activated if no @option{-net} options are provided.
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Character device options:)
-
-DEF("chardev", HAS_ARG, QEMU_OPTION_chardev,
-    "-chardev help\n"
-    "-chardev null,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
socket,id=id[,host=host],port=port[,to=to][,ipv4][,ipv6][,nodelay][,reconnect=seconds]\n"
-    "         [,server][,nowait][,telnet][,reconnect=seconds][,mux=on|off]\n"
-    "         [,logfile=PATH][,logappend=on|off][,tls-creds=ID] (tcp)\n"
-    "-chardev 
socket,id=id,path=path[,server][,nowait][,telnet][,reconnect=seconds]\n"
-    "         [,mux=on|off][,logfile=PATH][,logappend=on|off] (unix)\n"
-    "-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n"
-    "         [,localport=localport][,ipv4][,ipv6][,mux=on|off]\n"
-    "         [,logfile=PATH][,logappend=on|off]\n"
-    "-chardev msmouse,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n"
-    "         [,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev ringbuf,id=id[,size=size][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
file,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
pipe,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-#ifdef _WIN32
-    "-chardev console,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-#else
-    "-chardev pty,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
stdio,id=id[,mux=on|off][,signal=on|off][,logfile=PATH][,logappend=on|off]\n"
-#endif
-#ifdef CONFIG_BRLAPI
-    "-chardev braille,id=id[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-#endif
-#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
-        || defined(__NetBSD__) || defined(__OpenBSD__) || 
defined(__DragonFly__)
-    "-chardev 
serial,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
tty,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-#endif
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
-    "-chardev 
parallel,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
parport,id=id,path=path[,mux=on|off][,logfile=PATH][,logappend=on|off]\n"
-#endif
-#if defined(CONFIG_SPICE)
-    "-chardev 
spicevmc,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]\n"
-    "-chardev 
spiceport,id=id,name=name[,debug=debug][,logfile=PATH][,logappend=on|off]\n"
-#endif
-    , QEMU_ARCH_ALL
-)
-
-STEXI
-
-The general form of a character device option is:
address@hidden @option
address@hidden -chardev @var{backend} ,address@hidden [,mux=on|off] 
[,@var{options}]
address@hidden -chardev
-Backend is one of:
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden
address@hidden
-The specific backend will determine the applicable options.
-
-Use @code{-chardev help} to print all available chardev backend types.
-
-All devices must have an id, which can be any string up to 127 characters long.
-It is used to uniquely identify this device in other command line directives.
-
-A character device may be used in multiplexing mode by multiple front-ends.
-Specify @option{mux=on} to enable this mode.
-A multiplexer is a "1:N" device, and here the "1" end is your specified chardev
-backend, and the "N" end is the various parts of QEMU that can talk to a 
chardev.
-If you create a chardev with @option{id=myid} and @option{mux=on}, QEMU will
-create a multiplexer with your specified ID, and you can then configure 
multiple
-front ends to use that chardev ID for their input/output. Up to four different
-front ends can be connected to a single multiplexed chardev. (Without
-multiplexing enabled, a chardev can only be used by a single front end.)
-For instance you could use this to allow a single stdio chardev to be used by
-two serial ports and the QEMU monitor:
-
address@hidden
--chardev stdio,mux=on,id=char0 \
--mon chardev=char0,mode=readline \
--serial chardev:char0 \
--serial chardev:char0
address@hidden example
-
-You can have more than one multiplexer in a system configuration; for instance
-you could have a TCP port multiplexed between UART 0 and UART 1, and stdio
-multiplexed between the QEMU monitor and a parallel port:
-
address@hidden
--chardev stdio,mux=on,id=char0 \
--mon chardev=char0,mode=readline \
--parallel chardev:char0 \
--chardev tcp,...,mux=on,id=char1 \
--serial chardev:char1 \
--serial chardev:char1
address@hidden example
-
-When you're using a multiplexed character device, some escape sequences are
-interpreted in the input. @xref{mux_keys, Keys in the character backend
-multiplexer}.
-
-Note that some other command line options may implicitly create multiplexed
-character backends; for instance @option{-serial mon:stdio} creates a
-multiplexed stdio backend connected to the serial port and the QEMU monitor,
-and @option{-nographic} also multiplexes the console and the monitor to
-stdio.
-
-There is currently no support for multiplexing in the other direction
-(where a single QEMU front end takes input and output from multiple chardevs).
-
-Every backend supports the @option{logfile} option, which supplies the path
-to a file to record all data transmitted via the backend. The 
@option{logappend}
-option controls whether the log file will be truncated or appended to when
-opened.
-
address@hidden table
-
-The available backends are:
-
address@hidden @option
address@hidden -chardev null ,address@hidden
-A void device. This device will not emit any data, and will drop any data it
-receives. The null backend does not take any options.
-
address@hidden -chardev socket ,address@hidden address@hidden options} or 
@var{unix options}] [,server] [,nowait] [,telnet] [,address@hidden 
[,address@hidden
-
-Create a two-way stream socket, which can be either a TCP or a unix socket. A
-unix socket will be created if @option{path} is specified. Behaviour is
-undefined if TCP options are specified for a unix socket.
-
address@hidden specifies that the socket shall be a listening socket.
-
address@hidden specifies that QEMU should not block waiting for a client to
-connect to a listening socket.
-
address@hidden specifies that traffic on the socket should interpret telnet
-escape sequences.
-
address@hidden sets the timeout for reconnecting on non-server sockets when
-the remote end goes away.  qemu will delay this many seconds and then attempt
-to reconnect.  Zero disables reconnecting, and is the default.
-
address@hidden requests enablement of the TLS protocol for encryption,
-and specifies the id of the TLS credentials to use for the handshake. The
-credentials must be previously created with the @option{-object tls-creds}
-argument.
-
-TCP and unix socket options are given below:
-
address@hidden @option
-
address@hidden TCP options: address@hidden [,address@hidden [,address@hidden 
[,ipv4] [,ipv6] [,nodelay]
-
address@hidden for a listening socket specifies the local address to be bound.
-For a connecting socket species the remote host to connect to. @option{host} is
-optional for listening sockets. If not specified it defaults to @code{0.0.0.0}.
-
address@hidden for a listening socket specifies the local port to be bound. For 
a
-connecting socket specifies the port on the remote host to connect to.
address@hidden can be given as either a port number or a service name.
address@hidden is required.
-
address@hidden is only relevant to listening sockets. If it is specified, and
address@hidden cannot be bound, QEMU will attempt to bind to subsequent ports up
-to and including @option{to} until it succeeds. @option{to} must be specified
-as a port number.
-
address@hidden and @option{ipv6} specify that either IPv4 or IPv6 must be used.
-If neither is specified the socket may use either protocol.
-
address@hidden disables the Nagle algorithm.
-
address@hidden unix options: address@hidden
-
address@hidden specifies the local path of the unix socket. @option{path} is
-required.
-
address@hidden table
-
address@hidden -chardev udp ,address@hidden [,address@hidden ,address@hidden 
[,address@hidden [,address@hidden [,ipv4] [,ipv6]
-
-Sends all traffic from the guest to a remote host over UDP.
-
address@hidden specifies the remote host to connect to. If not specified it
-defaults to @code{localhost}.
-
address@hidden specifies the port on the remote host to connect to. 
@option{port}
-is required.
-
address@hidden specifies the local address to bind to. If not specified it
-defaults to @code{0.0.0.0}.
-
address@hidden specifies the local port to bind to. If not specified any
-available local port will be used.
-
address@hidden and @option{ipv6} specify that either IPv4 or IPv6 must be used.
-If neither is specified the device may use either protocol.
-
address@hidden -chardev msmouse ,address@hidden
-
-Forward QEMU's emulated msmouse events to the guest. @option{msmouse} does not
-take any options.
-
address@hidden -chardev vc ,address@hidden [[,address@hidden [,address@hidden 
[[,address@hidden [,address@hidden
-
-Connect to a QEMU text console. @option{vc} may optionally be given a specific
-size.
-
address@hidden and @option{height} specify the width and height respectively of
-the console, in pixels.
-
address@hidden and @option{rows} specify that the console be sized to fit a text
-console with the given dimensions.
-
address@hidden -chardev ringbuf ,address@hidden [,address@hidden
-
-Create a ring buffer with fixed size @option{size}.
address@hidden must be a power of two and defaults to @code{64K}.
-
address@hidden -chardev file ,address@hidden ,address@hidden
-
-Log all traffic received from the guest to a file.
-
address@hidden specifies the path of the file to be opened. This file will be
-created if it does not already exist, and overwritten if it does. @option{path}
-is required.
-
address@hidden -chardev pipe ,address@hidden ,address@hidden
-
-Create a two-way connection to the guest. The behaviour differs slightly 
between
-Windows hosts and other hosts:
-
-On Windows, a single duplex pipe will be created at
address@hidden@option{path}}.
-
-On other hosts, 2 pipes will be created called @address@hidden and
address@hidden@option{path}.out}. Data written to @address@hidden will be
-received by the guest. Data written by the guest can be read from
address@hidden@option{path}.out}. QEMU will not create these fifos, and 
requires them to
-be present.
-
address@hidden forms part of the pipe path as described above. @option{path} is
-required.
-
address@hidden -chardev console ,address@hidden
-
-Send traffic from the guest to QEMU's standard output. @option{console} does 
not
-take any options.
-
address@hidden is only available on Windows hosts.
-
address@hidden -chardev serial ,address@hidden ,address@hidden
-
-Send traffic from the guest to a serial device on the host.
-
-On Unix hosts serial will actually accept any tty device,
-not only serial lines.
-
address@hidden specifies the name of the serial device to open.
-
address@hidden -chardev pty ,address@hidden
-
-Create a new pseudo-terminal on the host and connect to it. @option{pty} does
-not take any options.
-
address@hidden is not available on Windows hosts.
-
address@hidden -chardev stdio ,address@hidden [,signal=on|off]
-Connect to standard input and standard output of the QEMU process.
-
address@hidden controls if signals are enabled on the terminal, that includes
-exiting QEMU with the key sequence @key{Control-c}. This option is enabled by
-default, use @option{signal=off} to disable it.
-
address@hidden -chardev braille ,address@hidden
-
-Connect to a local BrlAPI server. @option{braille} does not take any options.
-
address@hidden -chardev tty ,address@hidden ,address@hidden
-
address@hidden is only available on Linux, Sun, FreeBSD, NetBSD, OpenBSD and
-DragonFlyBSD hosts.  It is an alias for @option{serial}.
-
address@hidden specifies the path to the tty. @option{path} is required.
-
address@hidden -chardev parallel ,address@hidden ,address@hidden
address@hidden -chardev parport ,address@hidden ,address@hidden
-
address@hidden is only available on Linux, FreeBSD and DragonFlyBSD hosts.
-
-Connect to a local parallel port.
-
address@hidden specifies the path to the parallel port device. @option{path} is
-required.
-
address@hidden -chardev spicevmc ,address@hidden ,address@hidden, address@hidden
-
address@hidden is only available when spice support is built in.
-
address@hidden debug level for spicevmc
-
address@hidden name of spice channel to connect to
-
-Connect to a spice virtual machine channel, such as vdiport.
-
address@hidden -chardev spiceport ,address@hidden ,address@hidden, 
address@hidden
-
address@hidden is only available when spice support is built in.
-
address@hidden debug level for spicevmc
-
address@hidden name of spice port to connect to
-
-Connect to a spice port, allowing a Spice client to handle the traffic
-identified by a name (preferably a fqdn).
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Bluetooth(R) options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("bt", HAS_ARG, QEMU_OPTION_bt, \
-    "-bt hci,null    dumb bluetooth HCI - doesn't respond to commands\n" \
-    "-bt hci,host[:id]\n" \
-    "                use host's HCI with the given name\n" \
-    "-bt hci[,vlan=n]\n" \
-    "                emulate a standard HCI in virtual scatternet 'n'\n" \
-    "-bt vhci[,vlan=n]\n" \
-    "                add host computer to virtual scatternet 'n' using VHCI\n" 
\
-    "-bt device:dev[,vlan=n]\n" \
-    "                emulate a bluetooth device 'dev' in scatternet 'n'\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -bt hci[...]
address@hidden -bt
-Defines the function of the corresponding Bluetooth HCI.  -bt options
-are matched with the HCIs present in the chosen machine type.  For
-example when emulating a machine with only one HCI built into it, only
-the first @code{-bt hci[...]} option is valid and defines the HCI's
-logic.  The Transport Layer is decided by the machine type.  Currently
-the machines @code{n800} and @code{n810} have one HCI and all other
-machines have none.
-
address@hidden
-The following three types are recognized:
-
address@hidden @option
address@hidden -bt hci,null
-(default) The corresponding Bluetooth HCI assumes no internal logic
-and will not respond to any HCI commands or emit events.
-
address@hidden -bt hci,host[:@var{id}]
-(@code{bluez} only) The corresponding HCI passes commands / events
-to / from the physical HCI identified by the name @var{id} (default:
address@hidden) on the computer running QEMU.  Only available on @code{bluez}
-capable systems like Linux.
-
address@hidden -bt hci[,address@hidden
-Add a virtual, standard HCI that will participate in the Bluetooth
-scatternet @var{n} (default @code{0}).  Similarly to @option{-net}
-VLANs, devices inside a bluetooth network @var{n} can only communicate
-with other devices in the same network (scatternet).
address@hidden table
-
address@hidden -bt vhci[,address@hidden
-(Linux-host only) Create a HCI in scatternet @var{n} (default 0) attached
-to the host bluetooth stack instead of to the emulated target.  This
-allows the host and target machines to participate in a common scatternet
-and communicate.  Requires the Linux @code{vhci} driver installed.  Can
-be used as following:
-
address@hidden
-qemu-system-i386 [...OPTIONS...] -bt hci,vlan=5 -bt vhci,vlan=5
address@hidden example
-
address@hidden -bt device:@var{dev}[,address@hidden
-Emulate a bluetooth device @var{dev} and place it in network @var{n}
-(default @code{0}).  QEMU can only emulate one type of bluetooth devices
-currently:
-
address@hidden @option
address@hidden keyboard
-Virtual wireless keyboard implementing the HIDP bluetooth profile.
address@hidden table
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-#ifdef CONFIG_TPM
-DEFHEADING(TPM device options:)
-
-DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
-    "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
-    "                use path to provide path to a character device; default 
is /dev/tpm0\n"
-    "                use cancel-path to provide path to TPM's cancel sysfs 
entry; if\n"
-    "                not provided it will be searched for in 
/sys/class/misc/tpm?/device\n",
-    QEMU_ARCH_ALL)
-STEXI
-
-The general form of a TPM device option is:
address@hidden @option
-
address@hidden -tpmdev @var{backend} ,address@hidden [,@var{options}]
address@hidden -tpmdev
-
-The specific backend type will determine the applicable options.
-The @code{-tpmdev} option creates the TPM backend and requires a
address@hidden option that specifies the TPM frontend interface model.
-
-Use @code{-tpmdev help} to print all available TPM backend types.
-
address@hidden table
-
-The available backends are:
-
address@hidden @option
-
address@hidden -tpmdev passthrough, address@hidden, address@hidden, 
address@hidden
-
-(Linux-host only) Enable access to the host's TPM using the passthrough
-driver.
-
address@hidden specifies the path to the host's TPM device, i.e., on
-a Linux host this would be @code{/dev/tpm0}.
address@hidden is optional and by default @code{/dev/tpm0} is used.
-
address@hidden specifies the path to the host TPM device's sysfs
-entry allowing for cancellation of an ongoing TPM command.
address@hidden is optional and by default QEMU will search for the
-sysfs entry to use.
-
-Some notes about using the host's TPM with the passthrough driver:
-
-The TPM device accessed by the passthrough driver must not be
-used by any other application on the host.
-
-Since the host's firmware (BIOS/UEFI) has already initialized the TPM,
-the VM's firmware (BIOS/UEFI) will not be able to initialize the
-TPM again and may therefore not show a TPM-specific menu that would
-otherwise allow the user to configure the TPM, e.g., allow the user to
-enable/disable or activate/deactivate the TPM.
-Further, if TPM ownership is released from within a VM then the host's TPM
-will get disabled and deactivated. To enable and activate the
-TPM again afterwards, the host has to be rebooted and the user is
-required to enter the firmware's menu to enable and activate the TPM.
-If the TPM is left disabled and/or deactivated most TPM commands will fail.
-
-To create a passthrough TPM use the following two options:
address@hidden
--tpmdev passthrough,id=tpm0 -device tpm-tis,tpmdev=tpm0
address@hidden example
-Note that the @code{-tpmdev} id is @code{tpm0} and is referenced by
address@hidden in the device option.
-
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-#endif
-
-DEFHEADING(Linux/Multiboot boot specific:)
-STEXI
-
-When using these options, you can use a given Linux or Multiboot
-kernel without installing it in the disk image. It can be useful
-for easier testing of various kernels.
-
address@hidden @option
-ETEXI
-
-DEF("kernel", HAS_ARG, QEMU_OPTION_kernel, \
-    "-kernel bzImage use 'bzImage' as kernel image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -kernel @var{bzImage}
address@hidden -kernel
-Use @var{bzImage} as kernel image. The kernel can be either a Linux kernel
-or in multiboot format.
-ETEXI
-
-DEF("append", HAS_ARG, QEMU_OPTION_append, \
-    "-append cmdline use 'cmdline' as kernel command line\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -append @var{cmdline}
address@hidden -append
-Use @var{cmdline} as kernel command line
-ETEXI
-
-DEF("initrd", HAS_ARG, QEMU_OPTION_initrd, \
-           "-initrd file    use 'file' as initial ram disk\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -initrd @var{file}
address@hidden -initrd
-Use @var{file} as initial ram disk.
-
address@hidden -initrd "@var{file1} arg=foo,@var{file2}"
-
-This syntax is only available with multiboot.
-
-Use @var{file1} and @var{file2} as modules and pass arg=foo as parameter to the
-first module.
-ETEXI
-
-DEF("dtb", HAS_ARG, QEMU_OPTION_dtb, \
-    "-dtb    file    use 'file' as device tree image\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -dtb @var{file}
address@hidden -dtb
-Use @var{file} as a device tree binary (dtb) image and pass it to the kernel
-on boot.
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Debug/Expert options:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("fw_cfg", HAS_ARG, QEMU_OPTION_fwcfg,
-    "-fw_cfg [name=]<name>,file=<file>\n"
-    "                add named fw_cfg entry with contents from file\n"
-    "-fw_cfg [name=]<name>,string=<str>\n"
-    "                add named fw_cfg entry with contents from string\n",
-    QEMU_ARCH_ALL)
-STEXI
-
address@hidden -fw_cfg address@hidden,address@hidden
address@hidden -fw_cfg
-Add named fw_cfg entry with contents from file @var{file}.
-
address@hidden -fw_cfg address@hidden,address@hidden
-Add named fw_cfg entry with contents from string @var{str}.
-
-The terminating NUL character of the contents of @var{str} will not be
-included as part of the fw_cfg item data. To insert contents with
-embedded NUL characters, you have to use the @var{file} parameter.
-
-The fw_cfg entries are passed by QEMU through to the guest.
-
-Example:
address@hidden
-    -fw_cfg name=opt/com.mycompany/blob,file=./my_blob.bin
address@hidden example
-creates an fw_cfg entry named opt/com.mycompany/blob with contents
-from ./my_blob.bin.
-
-ETEXI
-
-DEF("serial", HAS_ARG, QEMU_OPTION_serial, \
-    "-serial dev     redirect the serial port to char device 'dev'\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -serial @var{dev}
address@hidden -serial
-Redirect the virtual serial port to host character device
address@hidden The default device is @code{vc} in graphical mode and
address@hidden in non graphical mode.
-
-This option can be used several times to simulate up to 4 serial
-ports.
-
-Use @code{-serial none} to disable all serial ports.
-
-Available character devices are:
address@hidden @option
address@hidden vc[:@address@hidden
-Virtual console. Optionally, a width and height can be given in pixel with
address@hidden
-vc:800x600
address@hidden example
-It is also possible to specify width or height in characters:
address@hidden
-vc:80Cx24C
address@hidden example
address@hidden pty
-[Linux only] Pseudo TTY (a new PTY is automatically allocated)
address@hidden none
-No device is allocated.
address@hidden null
-void device
address@hidden chardev:@var{id}
-Use a named character device defined with the @code{-chardev} option.
address@hidden /dev/XXX
-[Linux only] Use host tty, e.g. @file{/dev/ttyS0}. The host serial port
-parameters are set according to the emulated ones.
address@hidden /dev/address@hidden
-[Linux only, parallel port only] Use host parallel port
address@hidden Currently SPP and EPP parallel port features can be used.
address@hidden file:@var{filename}
-Write output to @var{filename}. No character can be read.
address@hidden stdio
-[Unix only] standard input/output
address@hidden pipe:@var{filename}
-name pipe @var{filename}
address@hidden address@hidden
-[Windows only] Use host serial port @var{n}
address@hidden 
udp:address@hidden:@var{remote_port}[@@address@hidden:@var{src_port}]
-This implements UDP Net Console.
-When @var{remote_host} or @var{src_ip} are not specified
-they default to @code{0.0.0.0}.
-When not using a specified @var{src_port} a random port is automatically 
chosen.
-
-If you just want a simple readonly console you can use @code{netcat} or
address@hidden, by starting QEMU with: @code{-serial udp::4555} and nc as:
address@hidden -u -l -p 4555}. Any time QEMU writes something to that port it
-will appear in the netconsole session.
-
-If you plan to send characters back via netconsole or you want to stop
-and start QEMU a lot of times, you should have QEMU use the same
-source port each time by using something like @code{-serial
-udp::4555@@:4556} to QEMU. Another approach is to use a patched
-version of netcat which can listen to a TCP port and send and receive
-characters via udp.  If you have a patched version of netcat which
-activates telnet remote echo and single char transfer, then you can
-use the following options to set up a netcat redirector to allow
-telnet on port 5555 to access the QEMU port.
address@hidden @code
address@hidden QEMU Options:
--serial udp::4555@@:4556
address@hidden netcat options:
--u -P 4555 -L 0.0.0.0:4556 -t -p 5555 -I -T
address@hidden telnet options:
-localhost 5555
address@hidden table
-
address@hidden 
tcp:address@hidden:@var{port}[,@var{server}][,nowait][,nodelay][,address@hidden
-The TCP Net Console has two modes of operation.  It can send the serial
-I/O to a location or wait for a connection from a location.  By default
-the TCP Net Console is sent to @var{host} at the @var{port}.  If you use
-the @var{server} option QEMU will wait for a client socket application
-to connect to the port before continuing, unless the @code{nowait}
-option was specified.  The @code{nodelay} option disables the Nagle buffering
-algorithm.  The @code{reconnect} option only applies if @var{noserver} is
-set, if the connection goes down it will attempt to reconnect at the
-given interval.  If @var{host} is omitted, 0.0.0.0 is assumed. Only
-one TCP connection at a time is accepted. You can use @code{telnet} to
-connect to the corresponding character device.
address@hidden @code
address@hidden Example to send tcp console to 192.168.0.2 port 4444
--serial tcp:192.168.0.2:4444
address@hidden Example to listen and wait on port 4444 for connection
--serial tcp::4444,server
address@hidden Example to not wait and listen on ip 192.168.0.100 port 4444
--serial tcp:192.168.0.100:4444,server,nowait
address@hidden table
-
address@hidden telnet:@var{host}:@var{port}[,server][,nowait][,nodelay]
-The telnet protocol is used instead of raw tcp sockets.  The options
-work the same as if you had specified @code{-serial tcp}.  The
-difference is that the port acts like a telnet server or client using
-telnet option negotiation.  This will also allow you to send the
-MAGIC_SYSRQ sequence if you use a telnet that supports sending the break
-sequence.  Typically in unix telnet you do it with Control-] and then
-type "send break" followed by pressing the enter key.
-
address@hidden unix:@var{path}[,server][,nowait][,address@hidden
-A unix domain socket is used instead of a tcp socket.  The option works the
-same as if you had specified @code{-serial tcp} except the unix domain socket
address@hidden is used for connections.
-
address@hidden mon:@var{dev_string}
-This is a special option to allow the monitor to be multiplexed onto
-another serial port.  The monitor is accessed with key sequence of
address@hidden and then pressing @key{c}.
address@hidden should be any one of the serial devices specified
-above.  An example to multiplex the monitor onto a telnet server
-listening on port 4444 would be:
address@hidden @code
address@hidden -serial mon:telnet::4444,server,nowait
address@hidden table
-When the monitor is multiplexed to stdio in this way, Ctrl+C will not terminate
-QEMU any more but will be passed to the guest instead.
-
address@hidden braille
-Braille device.  This will use BrlAPI to display the braille output on a real
-or fake device.
-
address@hidden msmouse
-Three button serial mouse. Configure the guest to use Microsoft protocol.
address@hidden table
-ETEXI
-
-DEF("parallel", HAS_ARG, QEMU_OPTION_parallel, \
-    "-parallel dev   redirect the parallel port to char device 'dev'\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -parallel @var{dev}
address@hidden -parallel
-Redirect the virtual parallel port to host device @var{dev} (same
-devices as the serial port). On Linux hosts, @file{/dev/parportN} can
-be used to use hardware devices connected on the corresponding host
-parallel port.
-
-This option can be used several times to simulate up to 3 parallel
-ports.
-
-Use @code{-parallel none} to disable all parallel ports.
-ETEXI
-
-DEF("monitor", HAS_ARG, QEMU_OPTION_monitor, \
-    "-monitor dev    redirect the monitor to char device 'dev'\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -monitor @var{dev}
address@hidden -monitor
-Redirect the monitor to host device @var{dev} (same devices as the
-serial port).
-The default device is @code{vc} in graphical mode and @code{stdio} in
-non graphical mode.
-Use @code{-monitor none} to disable the default monitor.
-ETEXI
-DEF("qmp", HAS_ARG, QEMU_OPTION_qmp, \
-    "-qmp dev        like -monitor but opens in 'control' mode\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -qmp @var{dev}
address@hidden -qmp
-Like -monitor but opens in 'control' mode.
-ETEXI
-DEF("qmp-pretty", HAS_ARG, QEMU_OPTION_qmp_pretty, \
-    "-qmp-pretty dev like -qmp but uses pretty JSON formatting\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -qmp-pretty @var{dev}
address@hidden -qmp-pretty
-Like -qmp but uses pretty JSON formatting.
-ETEXI
-
-DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
-    "-mon [chardev=]name[,mode=readline|control]\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -mon [chardev=]name[,mode=readline|control]
address@hidden -mon
-Setup monitor on chardev @var{name}.
-ETEXI
-
-DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
-    "-debugcon dev   redirect the debug console to char device 'dev'\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -debugcon @var{dev}
address@hidden -debugcon
-Redirect the debug console to host device @var{dev} (same devices as the
-serial port).  The debug console is an I/O port which is typically port
-0xe9; writing to that I/O port sends output to this device.
-The default device is @code{vc} in graphical mode and @code{stdio} in
-non graphical mode.
-ETEXI
-
-DEF("pidfile", HAS_ARG, QEMU_OPTION_pidfile, \
-    "-pidfile file   write PID to 'file'\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -pidfile @var{file}
address@hidden -pidfile
-Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
-from a script.
-ETEXI
-
-DEF("singlestep", 0, QEMU_OPTION_singlestep, \
-    "-singlestep     always run in singlestep mode\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -singlestep
address@hidden -singlestep
-Run the emulation in single step mode.
-ETEXI
-
-DEF("S", 0, QEMU_OPTION_S, \
-    "-S              freeze CPU at startup (use 'c' to start execution)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -S
address@hidden -S
-Do not start CPU at startup (you must type 'c' in the monitor).
-ETEXI
-
-DEF("realtime", HAS_ARG, QEMU_OPTION_realtime,
-    "-realtime [mlock=on|off]\n"
-    "                run qemu with realtime features\n"
-    "                mlock=on|off controls mlock support (default: on)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -realtime mlock=on|off
address@hidden -realtime
-Run qemu with realtime features.
-mlocking qemu and guest memory can be enabled via @option{mlock=on}
-(enabled by default).
-ETEXI
-
-DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \
-    "-gdb dev        wait for gdb connection on 'dev'\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -gdb @var{dev}
address@hidden -gdb
-Wait for gdb connection on device @var{dev} (@pxref{gdb_usage}). Typical
-connections will likely be TCP-based, but also UDP, pseudo TTY, or even
-stdio are reasonable use case. The latter is allowing to start QEMU from
-within gdb and establish the connection via a pipe:
address@hidden
-(gdb) target remote | exec qemu-system-i386 -gdb stdio ...
address@hidden example
-ETEXI
-
-DEF("s", 0, QEMU_OPTION_s, \
-    "-s              shorthand for -gdb tcp::" DEFAULT_GDBSTUB_PORT "\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -s
address@hidden -s
-Shorthand for -gdb tcp::1234, i.e. open a gdbserver on TCP port 1234
-(@pxref{gdb_usage}).
-ETEXI
-
-DEF("d", HAS_ARG, QEMU_OPTION_d, \
-    "-d item1,...    enable logging of specified items (use '-d help' for a 
list of log items)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -d @var{item1}[,...]
address@hidden -d
-Enable logging of specified items. Use '-d help' for a list of log items.
-ETEXI
-
-DEF("D", HAS_ARG, QEMU_OPTION_D, \
-    "-D logfile      output log to logfile (default stderr)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -D @var{logfile}
address@hidden -D
-Output log in @var{logfile} instead of to stderr
-ETEXI
-
-DEF("dfilter", HAS_ARG, QEMU_OPTION_DFILTER, \
-    "-dfilter range,..  filter debug output to range of addresses (useful for 
-d cpu,exec,etc..)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -dfilter @var{range1}[,...]
address@hidden -dfilter
-Filter debug output to that relevant to a range of target addresses. The filter
-spec can be either @address@hidden, @address@hidden or
address@hidden@var{end} where @var{start} @var{end} and @var{size} are the
-addresses and sizes required. For example:
address@hidden
-    -dfilter 0x8000..0x8fff,0xffffffc000080000+0x200,0xffffffc000060000-0x1000
address@hidden example
-Will dump output for any code in the 0x1000 sized block starting at 0x8000 and
-the 0x200 sized block starting at 0xffffffc000080000 and another 0x1000 sized
-block starting at 0xffffffc00005f000.
-ETEXI
-
-DEF("L", HAS_ARG, QEMU_OPTION_L, \
-    "-L path         set the directory for the BIOS, VGA BIOS and keymaps\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -L  @var{path}
address@hidden -L
-Set the directory for the BIOS, VGA BIOS and keymaps.
-
-To list all the data directories, use @code{-L help}.
-ETEXI
-
-DEF("bios", HAS_ARG, QEMU_OPTION_bios, \
-    "-bios file      set the filename for the BIOS\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -bios @var{file}
address@hidden -bios
-Set the filename for the BIOS.
-ETEXI
-
-DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \
-    "-enable-kvm     enable KVM full virtualization support\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -enable-kvm
address@hidden -enable-kvm
-Enable KVM full virtualization support. This option is only available
-if KVM support is enabled when compiling.
-ETEXI
-
-DEF("enable-hax", 0, QEMU_OPTION_enable_hax, \
-    "-enable-hax     enable HAX virtualization support\n", QEMU_ARCH_I386)
-STEXI
address@hidden -enable-hax
address@hidden -enable-hax
-Enable HAX (Hardware-based Acceleration eXecution) support. This option
-is only available if HAX support is enabled when compiling. HAX is only
-applicable to MAC and Windows platform, and thus does not conflict with
-KVM.
-ETEXI
-
-DEF("xen-domid", HAS_ARG, QEMU_OPTION_xen_domid,
-    "-xen-domid id   specify xen guest domain id\n", QEMU_ARCH_ALL)
-DEF("xen-create", 0, QEMU_OPTION_xen_create,
-    "-xen-create     create domain using xen hypercalls, bypassing xend\n"
-    "                warning: should not be used when xend is in use\n",
-    QEMU_ARCH_ALL)
-DEF("xen-attach", 0, QEMU_OPTION_xen_attach,
-    "-xen-attach     attach to existing xen domain\n"
-    "                xend will use this when starting QEMU\n",
-    QEMU_ARCH_ALL)
-DEF("xen-domid-restrict", 0, QEMU_OPTION_xen_domid_restrict,
-    "-xen-domid-restrict     restrict set of available xen operations\n"
-    "                        to specified domain id. (Does not affect\n"
-    "                        xenpv machine type).\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -xen-domid @var{id}
address@hidden -xen-domid
-Specify xen guest domain @var{id} (XEN only).
address@hidden -xen-create
address@hidden -xen-create
-Create domain using xen hypercalls, bypassing xend.
-Warning: should not be used when xend is in use (XEN only).
address@hidden -xen-attach
address@hidden -xen-attach
-Attach to existing xen domain.
-xend will use this when starting QEMU (XEN only).
address@hidden -xen-domid-restrict
-Restrict set of available xen operations to specified domain id (XEN only).
-ETEXI
-
-DEF("no-reboot", 0, QEMU_OPTION_no_reboot, \
-    "-no-reboot      exit instead of rebooting\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -no-reboot
address@hidden -no-reboot
-Exit instead of rebooting.
-ETEXI
-
-DEF("no-shutdown", 0, QEMU_OPTION_no_shutdown, \
-    "-no-shutdown    stop before shutdown\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -no-shutdown
address@hidden -no-shutdown
-Don't exit QEMU on guest shutdown, but instead only stop the emulation.
-This allows for instance switching to monitor to commit changes to the
-disk image.
-ETEXI
-
-DEF("loadvm", HAS_ARG, QEMU_OPTION_loadvm, \
-    "-loadvm [tag|id]\n" \
-    "                start right away with a saved state (loadvm in 
monitor)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -loadvm @var{file}
address@hidden -loadvm
-Start right away with a saved state (@code{loadvm} in monitor)
-ETEXI
-
-#ifndef _WIN32
-DEF("daemonize", 0, QEMU_OPTION_daemonize, \
-    "-daemonize      daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
-#endif
-STEXI
address@hidden -daemonize
address@hidden -daemonize
-Daemonize the QEMU process after initialization.  QEMU will not detach from
-standard IO until it is ready to receive connections on any of its devices.
-This option is a useful way for external programs to launch QEMU without having
-to cope with initialization race conditions.
-ETEXI
-
-DEF("option-rom", HAS_ARG, QEMU_OPTION_option_rom, \
-    "-option-rom rom load a file, rom, into the option ROM space\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -option-rom @var{file}
address@hidden -option-rom
-Load the contents of @var{file} as an option ROM.
-This option is useful to load things like EtherBoot.
-ETEXI
-
-HXCOMM Silently ignored for compatibility
-DEF("clock", HAS_ARG, QEMU_OPTION_clock, "", QEMU_ARCH_ALL)
-
-HXCOMM Options deprecated by -rtc
-DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL)
-DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)
-
-DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
-    "-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]\n" 
\
-    "                set the RTC base and clock, enable drift fix for clock 
ticks (x86 only)\n",
-    QEMU_ARCH_ALL)
-
-STEXI
-
address@hidden -rtc 
[base=utc|localtime|@var{date}][,clock=host|vm][,driftfix=none|slew]
address@hidden -rtc
-Specify @option{base} as @code{utc} or @code{localtime} to let the RTC start 
at the current
-UTC or local time, respectively. @code{localtime} is required for correct date 
in
-MS-DOS or Windows. To start at a specific point in time, provide @var{date} in 
the
-format @code{2006-06-17T16:01:21} or @code{2006-06-17}. The default base is 
UTC.
-
-By default the RTC is driven by the host system time. This allows using of the
-RTC as accurate reference clock inside the guest, specifically if the host
-time is smoothly following an accurate external reference clock, e.g. via NTP.
-If you want to isolate the guest time from the host, you can set @option{clock}
-to @code{rt} instead.  To even prevent it from progressing during suspension,
-you can set it to @code{vm}.
-
-Enable @option{driftfix} (i386 targets only) if you experience time drift 
problems,
-specifically with Windows' ACPI HAL. This option will try to figure out how
-many timer interrupts were not processed by the Windows guest and will
-re-inject them.
-ETEXI
-
-DEF("icount", HAS_ARG, QEMU_OPTION_icount, \
-    "-icount 
[shift=N|auto][,align=on|off][,sleep=on|off,rr=record|replay,rrfile=<filename>,rrsnapshot=<snapshot>]\n"
 \
-    "                enable virtual instruction counter with 2^N clock ticks 
per\n" \
-    "                instruction, enable aligning the host and virtual 
clocks\n" \
-    "                or disable real time cpu sleeping\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -icount 
address@hidden|auto][,rr=record|replay,address@hidden,address@hidden
address@hidden -icount
-Enable virtual instruction counter.  The virtual cpu will execute one
-instruction every address@hidden ns of virtual time.  If @code{auto} is 
specified
-then the virtual cpu speed will be automatically adjusted to keep virtual
-time within a few seconds of real time.
-
-When the virtual cpu is sleeping, the virtual time will advance at default
-speed unless @option{sleep=on|off} is specified.
-With @option{sleep=on|off}, the virtual time will jump to the next timer 
deadline
-instantly whenever the virtual cpu goes to sleep mode and will not advance
-if no timer is enabled. This behavior give deterministic execution times from
-the guest point of view.
-
-Note that while this option can give deterministic behavior, it does not
-provide cycle accurate emulation.  Modern CPUs contain superscalar out of
-order cores with complex cache hierarchies.  The number of instructions
-executed often has little or no correlation with actual performance.
-
address@hidden will activate the delay algorithm which will try
-to synchronise the host clock and the virtual clock. The goal is to
-have a guest running at the real frequency imposed by the shift option.
-Whenever the guest clock is behind the host clock and if
address@hidden is specified then we print a message to the user
-to inform about the delay.
-Currently this option does not work when @option{shift} is @code{auto}.
-Note: The sync algorithm will work for those shift values for which
-the guest clock runs ahead of the host clock. Typically this happens
-when the shift value is high (how high depends on the host machine).
-
-When @option{rr} option is specified deterministic record/replay is enabled.
-Replay log is written into @var{filename} file in record mode and
-read from this file in replay mode.
-
-Option rrsnapshot is used to create new vm snapshot named @var{snapshot}
-at the start of execution recording. In replay mode this option is used
-to load the initial VM state.
-ETEXI
-
-DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \
-    "-watchdog model\n" \
-    "                enable virtual hardware watchdog [default=none]\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -watchdog @var{model}
address@hidden -watchdog
-Create a virtual hardware watchdog device.  Once enabled (by a guest
-action), the watchdog must be periodically polled by an agent inside
-the guest or else the guest will be restarted. Choose a model for
-which your guest has drivers.
-
-The @var{model} is the model of hardware watchdog to emulate. Use
address@hidden help} to list available hardware models. Only one
-watchdog can be enabled for a guest.
-
-The following models may be available:
address@hidden @option
address@hidden ib700
-iBASE 700 is a very simple ISA watchdog with a single timer.
address@hidden i6300esb
-Intel 6300ESB I/O controller hub is a much more featureful PCI-based
-dual-timer watchdog.
address@hidden diag288
-A virtual watchdog for s390x backed by the diagnose 288 hypercall
-(currently KVM only).
address@hidden table
-ETEXI
-
-DEF("watchdog-action", HAS_ARG, QEMU_OPTION_watchdog_action, \
-    "-watchdog-action reset|shutdown|poweroff|inject-nmi|pause|debug|none\n" \
-    "                action when watchdog fires [default=reset]\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -watchdog-action @var{action}
address@hidden -watchdog-action
-
-The @var{action} controls what QEMU will do when the watchdog timer
-expires.
-The default is
address@hidden (forcefully reset the guest).
-Other possible actions are:
address@hidden (attempt to gracefully shutdown the guest),
address@hidden (forcefully poweroff the guest),
address@hidden (inject a NMI into the guest),
address@hidden (pause the guest),
address@hidden (print a debug message and continue), or
address@hidden (do nothing).
-
-Note that the @code{shutdown} action requires that the guest responds
-to ACPI signals, which it may not be able to do in the sort of
-situations where the watchdog would have expired, and thus
address@hidden shutdown} is not recommended for production use.
-
-Examples:
-
address@hidden @code
address@hidden -watchdog i6300esb -watchdog-action pause
address@hidden -watchdog ib700
address@hidden table
-ETEXI
-
-DEF("echr", HAS_ARG, QEMU_OPTION_echr, \
-    "-echr chr       set terminal escape character instead of ctrl-a\n",
-    QEMU_ARCH_ALL)
-STEXI
-
address@hidden -echr @var{numeric_ascii_value}
address@hidden -echr
-Change the escape character used for switching to the monitor when using
-monitor and serial sharing.  The default is @code{0x01} when using the
address@hidden option.  @code{0x01} is equal to pressing
address@hidden  You can select a different character from the ascii
-control keys where 1 through 26 map to Control-a through Control-z.  For
-instance you could use the either of the following to change the escape
-character to Control-t.
address@hidden @code
address@hidden -echr 0x14
address@hidden -echr 20
address@hidden table
-ETEXI
-
-DEF("virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon, \
-    "-virtioconsole c\n" \
-    "                set virtio console\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -virtioconsole @var{c}
address@hidden -virtioconsole
-Set virtio console.
-
-This option is maintained for backward compatibility.
-
-Please use @code{-device virtconsole} for the new way of invocation.
-ETEXI
-
-DEF("show-cursor", 0, QEMU_OPTION_show_cursor, \
-    "-show-cursor    show cursor\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -show-cursor
address@hidden -show-cursor
-Show cursor.
-ETEXI
-
-DEF("tb-size", HAS_ARG, QEMU_OPTION_tb_size, \
-    "-tb-size n      set TB size\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -tb-size @var{n}
address@hidden -tb-size
-Set TB size.
-ETEXI
-
-DEF("incoming", HAS_ARG, QEMU_OPTION_incoming, \
-    "-incoming tcp:[host]:port[,to=maxport][,ipv4][,ipv6]\n" \
-    "-incoming rdma:host:port[,ipv4][,ipv6]\n" \
-    "-incoming unix:socketpath\n" \
-    "                prepare for incoming migration, listen on\n" \
-    "                specified protocol and socket address\n" \
-    "-incoming fd:fd\n" \
-    "-incoming exec:cmdline\n" \
-    "                accept incoming migration on given file descriptor\n" \
-    "                or from given external command\n" \
-    "-incoming defer\n" \
-    "                wait for the URI to be specified via migrate_incoming\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -incoming 
tcp:address@hidden:@var{port}[,address@hidden,ipv4][,ipv6]
address@hidden -incoming rdma:@var{host}:@var{port}[,ipv4][,ipv6]
address@hidden -incoming
-Prepare for incoming migration, listen on a given tcp port.
-
address@hidden -incoming unix:@var{socketpath}
-Prepare for incoming migration, listen on a given unix socket.
-
address@hidden -incoming fd:@var{fd}
-Accept incoming migration from a given filedescriptor.
-
address@hidden -incoming exec:@var{cmdline}
-Accept incoming migration as an output from specified external command.
-
address@hidden -incoming defer
-Wait for the URI to be specified via migrate_incoming.  The monitor can
-be used to change settings (such as migration parameters) prior to issuing
-the migrate_incoming to allow the migration to begin.
-ETEXI
-
-DEF("only-migratable", 0, QEMU_OPTION_only_migratable, \
-    "-only-migratable     allow only migratable devices\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -only-migratable
address@hidden -only-migratable
-Only allow migratable devices. Devices will not be allowed to enter an
-unmigratable state.
-ETEXI
-
-DEF("nodefaults", 0, QEMU_OPTION_nodefaults, \
-    "-nodefaults     don't create default devices\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -nodefaults
address@hidden -nodefaults
-Don't create default devices. Normally, QEMU sets the default devices like 
serial
-port, parallel port, virtual console, monitor device, VGA adapter, floppy and
-CD-ROM drive and others. The @code{-nodefaults} option will disable all those
-default devices.
-ETEXI
-
-#ifndef _WIN32
-DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
-    "-chroot dir     chroot to dir just before starting the VM\n",
-    QEMU_ARCH_ALL)
-#endif
-STEXI
address@hidden -chroot @var{dir}
address@hidden -chroot
-Immediately before starting guest execution, chroot to the specified
-directory.  Especially useful in combination with -runas.
-ETEXI
-
-#ifndef _WIN32
-DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
-    "-runas user     change to user id user just before starting the VM\n",
-    QEMU_ARCH_ALL)
-#endif
-STEXI
address@hidden -runas @var{user}
address@hidden -runas
-Immediately before starting guest execution, drop root privileges, switching
-to the specified user.
-ETEXI
-
-DEF("prom-env", HAS_ARG, QEMU_OPTION_prom_env,
-    "-prom-env variable=value\n"
-    "                set OpenBIOS nvram variables\n",
-    QEMU_ARCH_PPC | QEMU_ARCH_SPARC)
-STEXI
address@hidden -prom-env @address@hidden
address@hidden -prom-env
-Set OpenBIOS nvram @var{variable} to given @var{value} (PPC, SPARC only).
-ETEXI
-DEF("semihosting", 0, QEMU_OPTION_semihosting,
-    "-semihosting    semihosting mode\n",
-    QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32 |
-    QEMU_ARCH_MIPS)
-STEXI
address@hidden -semihosting
address@hidden -semihosting
-Enable semihosting mode (ARM, M68K, Xtensa, MIPS only).
-ETEXI
-DEF("semihosting-config", HAS_ARG, QEMU_OPTION_semihosting_config,
-    "-semihosting-config 
[enable=on|off][,target=native|gdb|auto][,arg=str[,...]]\n" \
-    "                semihosting configuration\n",
-QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32 |
-QEMU_ARCH_MIPS)
-STEXI
address@hidden -semihosting-config 
[enable=on|off][,target=native|gdb|auto][,arg=str[,...]]
address@hidden -semihosting-config
-Enable and configure semihosting (ARM, M68K, Xtensa, MIPS only).
address@hidden @option
address@hidden address@hidden|gdb|auto}
-Defines where the semihosting calls will be addressed, to QEMU (@code{native})
-or to GDB (@code{gdb}). The default is @code{auto}, which means @code{gdb}
-during debug sessions and @code{native} otherwise.
address@hidden address@hidden,address@hidden,...
-Allows the user to pass input arguments, and can be used multiple times to 
build
-up a list. The old-style @code{-kernel}/@code{-append} method of passing a
-command line is still supported for backward compatibility. If both the
address@hidden arg} and the @code{-kernel}/@code{-append} are
-specified, the former is passed to semihosting as it always takes precedence.
address@hidden table
-ETEXI
-DEF("old-param", 0, QEMU_OPTION_old_param,
-    "-old-param      old param mode\n", QEMU_ARCH_ARM)
-STEXI
address@hidden -old-param
address@hidden -old-param (ARM)
-Old param mode (ARM only).
-ETEXI
-
-DEF("sandbox", HAS_ARG, QEMU_OPTION_sandbox, \
-    "-sandbox 
on[,obsolete=allow|deny][,elevateprivileges=allow|deny|children]\n" \
-    "          [,spawn=allow|deny][,resourcecontrol=allow|deny]\n" \
-    "                Enable seccomp mode 2 system call filter (default 
'off').\n" \
-    "                use 'obsolete' to allow obsolete system calls that are 
provided\n" \
-    "                    by the kernel, but typically no longer used by 
modern\n" \
-    "                    C library implementations.\n" \
-    "                use 'elevateprivileges' to allow or deny QEMU process to 
elevate\n" \
-    "                    its privileges by blacklisting all set*uid|gid system 
calls.\n" \
-    "                    The value 'children' will deny set*uid|gid system 
calls for\n" \
-    "                    main QEMU process but will allow forks and execves to 
run unprivileged\n" \
-    "                use 'spawn' to avoid QEMU to spawn new threads or 
processes by\n" \
-    "                     blacklisting *fork and execve\n" \
-    "                use 'resourcecontrol' to disable process affinity and 
schedular priority\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -sandbox 
@var{arg}[,address@hidden,address@hidden,address@hidden,address@hidden
address@hidden -sandbox
-Enable Seccomp mode 2 system call filter. 'on' will enable syscall filtering 
and 'off' will
-disable it.  The default is 'off'.
address@hidden @option
address@hidden address@hidden
-Enable Obsolete system calls
address@hidden address@hidden
-Disable set*uid|gid system calls
address@hidden address@hidden
-Disable *fork and execve
address@hidden address@hidden
-Disable process affinity and schedular priority
address@hidden table
-ETEXI
-
-DEF("readconfig", HAS_ARG, QEMU_OPTION_readconfig,
-    "-readconfig <file>\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -readconfig @var{file}
address@hidden -readconfig
-Read device configuration from @var{file}. This approach is useful when you 
want to spawn
-QEMU process with many command line options but you don't want to exceed the 
command line
-character limit.
-ETEXI
-DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig,
-    "-writeconfig <file>\n"
-    "                read/write config file\n", QEMU_ARCH_ALL)
-STEXI
address@hidden -writeconfig @var{file}
address@hidden -writeconfig
-Write device configuration to @var{file}. The @var{file} can be either 
filename to save
-command line and device configuration into file or dash @code{-}) character to 
print the
-output to stdout. This can be later used as input file for @code{-readconfig} 
option.
-ETEXI
-DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig,
-    "-nodefconfig\n"
-    "                do not load default config files at startup\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -nodefconfig
address@hidden -nodefconfig
-Normally QEMU loads configuration files from @var{sysconfdir} and 
@var{datadir} at startup.
-The @code{-nodefconfig} option will prevent QEMU from loading any of those 
config files.
-ETEXI
-DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
-    "-no-user-config\n"
-    "                do not load user-provided config files at startup\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -no-user-config
address@hidden -no-user-config
-The @code{-no-user-config} option makes QEMU not load any of the user-provided
-config files on @var{sysconfdir}, but won't make it skip the QEMU-provided 
config
-files from @var{datadir}.
-ETEXI
-DEF("trace", HAS_ARG, QEMU_OPTION_trace,
-    "-trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
-    "                specify tracing options\n",
-    QEMU_ARCH_ALL)
-STEXI
-HXCOMM This line is not accurate, as some sub-options are backend-specific but
-HXCOMM HX does not support conditional compilation of text.
address@hidden -trace address@hidden,address@hidden,address@hidden
address@hidden -trace
address@hidden qemu-option-trace.texi
-ETEXI
-
-HXCOMM Internal use
-DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
-DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
-
-#ifdef __linux__
-DEF("enable-fips", 0, QEMU_OPTION_enablefips,
-    "-enable-fips    enable FIPS 140-2 compliance\n",
-    QEMU_ARCH_ALL)
-#endif
-STEXI
address@hidden -enable-fips
address@hidden -enable-fips
-Enable FIPS 140-2 compliance mode.
-ETEXI
-
-HXCOMM Deprecated by -machine accel=tcg property
-DEF("no-kvm", 0, QEMU_OPTION_no_kvm, "", QEMU_ARCH_I386)
-
-HXCOMM Deprecated by kvm-pit driver properties
-DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection,
-    "", QEMU_ARCH_I386)
-
-HXCOMM Deprecated (ignored)
-DEF("no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit, "", QEMU_ARCH_I386)
-
-HXCOMM Deprecated by -machine kernel_irqchip=on|off property
-DEF("no-kvm-irqchip", 0, QEMU_OPTION_no_kvm_irqchip, "", QEMU_ARCH_I386)
-
-HXCOMM Deprecated (ignored)
-DEF("tdf", 0, QEMU_OPTION_tdf,"", QEMU_ARCH_ALL)
-
-DEF("msg", HAS_ARG, QEMU_OPTION_msg,
-    "-msg timestamp[=on|off]\n"
-    "                change the format of messages\n"
-    "                on|off controls leading timestamps (default:on)\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -msg timestamp[=on|off]
address@hidden -msg
-prepend a timestamp to each log message.(default:on)
-ETEXI
-
-DEF("dump-vmstate", HAS_ARG, QEMU_OPTION_dump_vmstate,
-    "-dump-vmstate <file>\n"
-    "                Output vmstate information in JSON format to file.\n"
-    "                Use the scripts/vmstate-static-checker.py file to\n"
-    "                check for possible regressions in migration code\n"
-    "                by comparing two such vmstate dumps.\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -dump-vmstate @var{file}
address@hidden -dump-vmstate
-Dump json-encoded vmstate information for current machine type to file
-in @var{file}
-ETEXI
-
-STEXI
address@hidden table
-ETEXI
-DEFHEADING()
-
-DEFHEADING(Generic object creation:)
-STEXI
address@hidden @option
-ETEXI
-
-DEF("object", HAS_ARG, QEMU_OPTION_object,
-    "-object TYPENAME[,PROP1=VALUE1,...]\n"
-    "                create a new object of type TYPENAME setting properties\n"
-    "                in the order they are specified.  Note that the 'id'\n"
-    "                property must be set.  These objects are placed in the\n"
-    "                '/objects' path.\n",
-    QEMU_ARCH_ALL)
-STEXI
address@hidden -object @var{typename}[,@address@hidden,...]
address@hidden -object
-Create a new object of type @var{typename} setting properties
-in the order they are specified.  Note that the 'id'
-property must be set.  These objects are placed in the
-'/objects' path.
-
address@hidden @option
-
address@hidden -object 
memory-backend-file,address@hidden,address@hidden,address@hidden,address@hidden|off},address@hidden|off}
-
-Creates a memory file backend object, which can be used to back
-the guest RAM with huge pages. The @option{id} parameter is a
-unique ID that will be used to reference this memory region
-when configuring the @option{-numa} argument. The @option{size}
-option provides the size of the memory region, and accepts
-common suffixes, eg @option{500M}. The @option{mem-path} provides
-the path to either a shared memory or huge page filesystem mount.
-The @option{share} boolean option determines whether the memory
-region is marked as private to QEMU, or shared. The latter allows
-a co-operating external process to access the QEMU memory region.
-Setting the @option{discard-data} boolean option to @var{on}
-indicates that file contents can be destroyed when QEMU exits,
-to avoid unnecessarily flushing data to the backing file.  Note
-that @option{discard-data} is only an optimization, and QEMU
-might not discard file contents if it aborts unexpectedly or is
-terminated using SIGKILL.
-
address@hidden -object rng-random,address@hidden,address@hidden/dev/random}
-
-Creates a random number generator backend which obtains entropy from
-a device on the host. The @option{id} parameter is a unique ID that
-will be used to reference this entropy backend from the @option{virtio-rng}
-device. The @option{filename} parameter specifies which file to obtain
-entropy from and if omitted defaults to @option{/dev/random}.
-
address@hidden -object rng-egd,address@hidden,address@hidden
-
-Creates a random number generator backend which obtains entropy from
-an external daemon running on the host. The @option{id} parameter is
-a unique ID that will be used to reference this entropy backend from
-the @option{virtio-rng} device. The @option{chardev} parameter is
-the unique ID of a character device backend that provides the connection
-to the RNG daemon.
-
address@hidden -object 
tls-creds-anon,address@hidden,address@hidden,address@hidden/path/to/cred/dir},address@hidden|off}
-
-Creates a TLS anonymous credentials object, which can be used to provide
-TLS support on network backends. The @option{id} parameter is a unique
-ID which network backends will use to access the credentials. The
address@hidden is either @option{server} or @option{client} depending
-on whether the QEMU network backend that uses the credentials will be
-acting as a client or as a server. If @option{verify-peer} is enabled
-(the default) then once the handshake is completed, the peer credentials
-will be verified, though this is a no-op for anonymous credentials.
-
-The @var{dir} parameter tells QEMU where to find the credential
-files. For server endpoints, this directory may contain a file
address@hidden providing diffie-hellman parameters to use
-for the TLS server. If the file is missing, QEMU will generate
-a set of DH parameters at startup. This is a computationally
-expensive operation that consumes random pool entropy, so it is
-recommended that a persistent set of parameters be generated
-upfront and saved.
-
address@hidden -object 
tls-creds-x509,address@hidden,address@hidden,address@hidden/path/to/cred/dir},address@hidden|off},address@hidden
-
-Creates a TLS anonymous credentials object, which can be used to provide
-TLS support on network backends. The @option{id} parameter is a unique
-ID which network backends will use to access the credentials. The
address@hidden is either @option{server} or @option{client} depending
-on whether the QEMU network backend that uses the credentials will be
-acting as a client or as a server. If @option{verify-peer} is enabled
-(the default) then once the handshake is completed, the peer credentials
-will be verified. With x509 certificates, this implies that the clients
-must be provided with valid client certificates too.
-
-The @var{dir} parameter tells QEMU where to find the credential
-files. For server endpoints, this directory may contain a file
address@hidden providing diffie-hellman parameters to use
-for the TLS server. If the file is missing, QEMU will generate
-a set of DH parameters at startup. This is a computationally
-expensive operation that consumes random pool entropy, so it is
-recommended that a persistent set of parameters be generated
-upfront and saved.
-
-For x509 certificate credentials the directory will contain further files
-providing the x509 certificates. The certificates must be stored
-in PEM format, in filenames @var{ca-cert.pem}, @var{ca-crl.pem} (optional),
address@hidden (only servers), @var{server-key.pem} (only servers),
address@hidden (only clients), and @var{client-key.pem} (only clients).
-
-For the @var{server-key.pem} and @var{client-key.pem} files which
-contain sensitive private keys, it is possible to use an encrypted
-version by providing the @var{passwordid} parameter. This provides
-the ID of a previously created @code{secret} object containing the
-password for decryption.
-
address@hidden -object 
filter-buffer,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}][,address@hidden|off}]
-
-Interval @var{t} can't be 0, this filter batches the packet delivery: all
-packets arriving in a given interval on netdev @var{netdevid} are delayed
-until the end of the interval. Interval is in microseconds.
address@hidden is optional that indicate whether the netfilter is
-on (enabled) or off (disabled), the default status for netfilter will be 'on'.
-
-queue @var{all|rx|tx} is an option that can be applied to any netfilter.
-
address@hidden: the filter is attached both to the receive and the transmit
-              queue of the netdev (default).
-
address@hidden: the filter is attached to the receive queue of the netdev,
-             where it will receive packets sent to the netdev.
-
address@hidden: the filter is attached to the transmit queue of the netdev,
-             where it will receive packets sent by the netdev.
-
address@hidden -object 
filter-mirror,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}[,vnet_hdr_support]
-
-filter-mirror on netdev @var{netdevid},mirror net packet to address@hidden, if 
it has the vnet_hdr_support flag, filter-mirror will mirror packet with 
vnet_hdr_len.
-
address@hidden -object 
filter-redirector,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden|rx|tx}[,vnet_hdr_support]
-
-filter-redirector on netdev @var{netdevid},redirect filter's net packet to 
chardev
address@hidden,and redirect indev's packet to filter.if it has the 
vnet_hdr_support flag,
-filter-redirector will redirect packet with vnet_hdr_len.
-Create a filter-redirector we need to differ outdev id from indev id, id can 
not
-be the same. we can just use indev or outdev, but at least one of indev or 
outdev
-need to be specified.
-
address@hidden -object 
filter-rewriter,address@hidden,address@hidden,address@hidden|rx|tx},[vnet_hdr_support]
-
-Filter-rewriter is a part of COLO project.It will rewrite tcp packet to
-secondary from primary to keep secondary tcp connection,and rewrite
-tcp packet to primary from secondary make tcp packet can be handled by
-client.if it has the vnet_hdr_support flag, we can parse packet with vnet 
header.
-
-usage:
-colo secondary:
--object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
--object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
--object filter-rewriter,id=rew0,netdev=hn0,queue=all
-
address@hidden -object 
filter-dump,address@hidden,address@hidden,address@hidden,address@hidden
-
-Dump the network traffic on netdev @var{dev} to the file specified by
address@hidden At most @var{len} bytes (64k by default) per packet are stored.
-The file format is libpcap, so it can be analyzed with tools such as tcpdump
-or Wireshark.
-
address@hidden -object 
colo-compare,address@hidden,address@hidden,address@hidden,address@hidden,vnet_hdr_support]
-
-Colo-compare gets packet from address@hidden and address@hidden, than compare 
primary packet with
-secondary packet. If the packets are same, we will output primary
-packet to address@hidden, else we will notify colo-frame
-do checkpoint and send primary packet to address@hidden
-if it has the vnet_hdr_support flag, colo compare will send/recv packet with 
vnet_hdr_len.
-
-we must use it with the help of filter-mirror and filter-redirector.
-
address@hidden
-
-primary:
--netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
--device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
--chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
--chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
--chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
--chardev socket,id=compare0-0,host=3.3.3.3,port=9001
--chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
--chardev socket,id=compare_out0,host=3.3.3.3,port=9005
--object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
--object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
--object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
--object 
colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
-
-secondary:
--netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
--device e1000,netdev=hn0,mac=52:a4:00:12:78:66
--chardev socket,id=red0,host=3.3.3.3,port=9003
--chardev socket,id=red1,host=3.3.3.3,port=9004
--object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
--object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
-
address@hidden example
-
-If you want to know the detail of above command line, you can read
-the colo-compare git log.
-
address@hidden -object cryptodev-backend-builtin,address@hidden,address@hidden
-
-Creates a cryptodev backend which executes crypto opreation from
-the QEMU cipher APIS. The @var{id} parameter is
-a unique ID that will be used to reference this cryptodev backend from
-the @option{virtio-crypto} device. The @var{queues} parameter is optional,
-which specify the queue number of cryptodev backend, the default of
address@hidden is 1.
-
address@hidden
-
- # qemu-system-x86_64 \
-   [...] \
-       -object cryptodev-backend-builtin,id=cryptodev0 \
-       -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \
-   [...]
address@hidden example
-
address@hidden -object 
secret,address@hidden,address@hidden,address@hidden|base64}[,address@hidden,address@hidden
address@hidden -object 
secret,address@hidden,address@hidden,address@hidden|base64}[,address@hidden,address@hidden
-
-Defines a secret to store a password, encryption key, or some other sensitive
-data. The sensitive data can either be passed directly via the @var{data}
-parameter, or indirectly via the @var{file} parameter. Using the @var{data}
-parameter is insecure unless the sensitive data is encrypted.
-
-The sensitive data can be provided in raw format (the default), or base64.
-When encoded as JSON, the raw format only supports valid UTF-8 characters,
-so base64 is recommended for sending binary data. QEMU will convert from
-which ever format is provided to the format it needs internally. eg, an
-RBD password can be provided in raw format, even though it will be base64
-encoded when passed onto the RBD sever.
-
-For added protection, it is possible to encrypt the data associated with
-a secret using the AES-256-CBC cipher. Use of encryption is indicated
-by providing the @var{keyid} and @var{iv} parameters. The @var{keyid}
-parameter provides the ID of a previously defined secret that contains
-the AES-256 decryption key. This key should be 32-bytes long and be
-base64 encoded. The @var{iv} parameter provides the random initialization
-vector used for encryption of this particular secret and should be a
-base64 encrypted string of the 16-byte IV.
-
-The simplest (insecure) usage is to provide the secret inline
-
address@hidden
-
- # $QEMU -object secret,id=sec0,data=letmein,format=raw
-
address@hidden example
-
-The simplest secure usage is to provide the secret via a file
-
- # printf "letmein" > mypasswd.txt
- # $QEMU -object secret,id=sec0,file=mypasswd.txt,format=raw
-
-For greater security, AES-256-CBC should be used. To illustrate usage,
-consider the openssl command line tool which can encrypt the data. Note
-that when encrypting, the plaintext must be padded to the cipher block
-size (32 bytes) using the standard PKCS#5/6 compatible padding algorithm.
-
-First a master key needs to be created in base64 encoding:
-
address@hidden
- # openssl rand -base64 32 > key.b64
- # KEY=$(base64 -d key.b64 | hexdump  -v -e '/1 "%02X"')
address@hidden example
-
-Each secret to be encrypted needs to have a random initialization vector
-generated. These do not need to be kept secret
-
address@hidden
- # openssl rand -base64 16 > iv.b64
- # IV=$(base64 -d iv.b64 | hexdump  -v -e '/1 "%02X"')
address@hidden example
-
-The secret to be defined can now be encrypted, in this case we're
-telling openssl to base64 encode the result, but it could be left
-as raw bytes if desired.
-
address@hidden
- # SECRET=$(printf "letmein" |
-            openssl enc -aes-256-cbc -a -K $KEY -iv $IV)
address@hidden example
-
-When launching QEMU, create a master secret pointing to @code{key.b64}
-and specify that to be used to decrypt the user password. Pass the
-contents of @code{iv.b64} to the second secret
-
address@hidden
- # $QEMU \
-     -object secret,id=secmaster0,format=base64,file=key.b64 \
-     -object secret,id=sec0,keyid=secmaster0,format=base64,\
-         data=$SECRET,iv=$(<iv.b64)
address@hidden example
-
address@hidden table
-
-ETEXI
-
-
-HXCOMM This is the last statement. Insert new options before this line!
-STEXI
address@hidden table
-ETEXI
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 958249fbd8..62373ad792 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -134,6 +134,8 @@ class QAPIDoc(object):
         self.sections = []
         # the current section
         self._section = self.body
+        # in embedded texinfo?
+        self._intexi = False
 
     def has_section(self, name):
         """Return True if we have a section with this name."""
@@ -153,10 +155,17 @@ class QAPIDoc(object):
             raise QAPIParseError(self._parser, "Missing space after #")
         line = line[1:]
 
+        if self._intexi:
+            self._section.append(line)
+            if line == '!end texinfo':
+                self._intexi = False
+        elif line == '!texinfo':
+            self._intexi = True
+            self._section.append(line)
+        elif self.symbol:
+            self._append_symbol_line(line)
         # FIXME not nice: things like '#  @foo:' and '# @foo: ' aren't
         # recognized, and get silently treated as ordinary text
-        if self.symbol:
-            self._append_symbol_line(line)
         elif not self.body.text and line.startswith('@'):
             if not line.endswith(':'):
                 raise QAPIParseError(self._parser, "Line should end with :")
@@ -225,7 +234,7 @@ class QAPIDoc(object):
         if (in_arg or not self._section.name
                 or not self._section.name.startswith('Example')):
             line = line.strip()
-        match = re.match(r'(@\S+:)', line)
+        match = re.match(r'(@\S+:)($|\s)', line)
         if match:
             raise QAPIParseError(self._parser,
                                  "'%s' not allowed in free-form documentation"
diff --git a/vl.c b/vl.c
index 3fed457921..b9524f7e11 100644
--- a/vl.c
+++ b/vl.c
@@ -96,11 +96,11 @@ int main(int argc, char **argv)
 #include "sysemu/hax.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
+#include "qapi-options.h"
 #include "qapi-visit.h"
 #include "qapi/qmp/qjson.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
-#include "qemu-options.h"
 #include "qmp-commands.h"
 #include "qemu/main-loop.h"
 #ifdef CONFIG_VIRTFS
@@ -2009,20 +2009,17 @@ static void help(int exitcode)
 {
     version();
     printf("usage: %s [options] [disk_image]\n\n"
-           "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n",
-            error_get_progname());
-
-#define QEMU_OPTIONS_GENERATE_HELP
-#include "qemu-options-wrapper.h"
-
-    printf("\nDuring emulation, the following keys are useful:\n"
+           "'disk_image' is a raw hard disk image for IDE hard disk 0\n\n"
+           "%s"
+           "\nDuring emulation, the following keys are useful:\n"
            "ctrl-alt-f      toggle full screen\n"
            "ctrl-alt-n      switch to virtual console 'n'\n"
            "ctrl-alt        toggle mouse and keyboard grab\n"
            "\n"
            "When using -nographic, press 'ctrl-a h' to get some help.\n"
            "\n"
-           QEMU_HELP_BOTTOM "\n");
+           QEMU_HELP_BOTTOM "\n",
+           error_get_progname(), qapi_options_help);
 
     exit(exitcode);
 }
@@ -2036,13 +2033,6 @@ typedef struct QEMUOption {
     uint32_t arch_mask;
 } QEMUOption;
 
-static const QEMUOption qemu_options[] = {
-    { "h", 0, QEMU_OPTION_h, QEMU_ARCH_ALL },
-#define QEMU_OPTIONS_GENERATE_OPTIONS
-#include "qemu-options-wrapper.h"
-    { NULL },
-};
-
 typedef struct VGAInterfaceInfo {
     const char *opt_name;    /* option name */
     const char *name;        /* human-readable name */
@@ -2800,46 +2790,6 @@ static void qemu_run_machine_init_done_notifiers(void)
     machine_init_done = true;
 }
 
-static const QEMUOption *lookup_opt(int argc, char **argv,
-                                    const char **poptarg, int *poptind)
-{
-    const QEMUOption *popt;
-    int optind = *poptind;
-    char *r = argv[optind];
-    const char *optarg;
-
-    loc_set_cmdline(argv, optind, 1);
-    optind++;
-    /* Treat --foo the same as -foo.  */
-    if (r[1] == '-')
-        r++;
-    popt = qemu_options;
-    for(;;) {
-        if (!popt->name) {
-            error_report("invalid option");
-            exit(1);
-        }
-        if (!strcmp(popt->name, r + 1))
-            break;
-        popt++;
-    }
-    if (popt->flags & HAS_ARG) {
-        if (optind >= argc) {
-            error_report("requires an argument");
-            exit(1);
-        }
-        optarg = argv[optind++];
-        loc_set_cmdline(argv, optind - 2, 2);
-    } else {
-        optarg = NULL;
-    }
-
-    *poptarg = optarg;
-    *poptind = optind;
-
-    return popt;
-}
-
 static MachineClass *select_machine(void)
 {
     MachineClass *machine_class = find_default_machine();
@@ -3088,6 +3038,15 @@ static void register_global_properties(MachineState *ms)
     user_register_global_props();
 }
 
+/* TODO make options conditional in schema and drop this crap */
+static void check_option_arch(uint32_t arch_mask)
+{
+    if (!(arch_type & arch_mask)) {
+        error_report("Option not supported for this target");
+        exit(1);
+    }
+}
+
 int main(int argc, char **argv, char **envp)
 {
     int i;
@@ -3101,8 +3060,6 @@ int main(int argc, char **argv, char **envp)
     QemuOpts *opts, *machine_opts;
     QemuOpts *hda_opts = NULL, *icount_opts = NULL, *accel_opts = NULL;
     QemuOptsList *olist;
-    int optind;
-    const char *optarg;
     const char *loadvm = NULL;
     MachineClass *machine_class;
     const char *cpu_model;
@@ -3133,6 +3090,7 @@ int main(int argc, char **argv, char **envp)
     } BlockdevOptions_queue;
     QSIMPLEQ_HEAD(, BlockdevOptions_queue) bdo_queue
         = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);
+    QAPIOption *qopt;
 
     module_call_init(MODULE_INIT_TRACE);
 
@@ -3147,6 +3105,8 @@ int main(int argc, char **argv, char **envp)
     module_call_init(MODULE_INIT_QOM);
     monitor_init_qmp_commands();
 
+    qopt = qapi_options_parse(argc, argv);
+
     qemu_add_opts(&qemu_drive_opts);
     qemu_add_drive_opts(&qemu_legacy_drive_opts);
     qemu_add_drive_opts(&qemu_common_drive_opts);
@@ -3202,58 +3162,52 @@ int main(int argc, char **argv, char **envp)
     autostart = 1;
 
     /* first pass of option parsing */
-    optind = 1;
-    while (optind < argc) {
-        if (argv[optind][0] != '-') {
-            /* disk image */
-            optind++;
-        } else {
-            const QEMUOption *popt;
-
-            popt = lookup_opt(argc, argv, &optarg, &optind);
-            switch (popt->index) {
-            case QEMU_OPTION_nodefconfig:
-                defconfig = false;
-                break;
-            case QEMU_OPTION_nouserconfig:
-                userconfig = false;
-                break;
-            }
+    for (i = 0; !qopt[i].cnt; i++) {
+        switch (qopt[i].type) {
+        case QAPI_OPTION_KIND_NODEFCONFIG:
+            defconfig = false;
+            break;
+        case QAPI_OPTION_KIND_NO_USER_CONFIG:
+            userconfig = false;
+            break;
+        case QAPI_OPTION_KIND_READCONFIG:
+            /* TODO read .json config and insert it into @qopt right here */
+            break;
+        case QAPI_OPTION_KIND_WRITECONFIG:
+            /* TODO write .json config here? */
+            break;
+        case QAPI_OPTION_KIND_SET:
+            /* TODO how to port this one from QemuOpts to QAPI? */
+            break;
+        default:
+            ;
         }
     }
 
     if (defconfig && userconfig) {
+        /* TODO read default .json config and prepend it to @qopt */
         if (qemu_read_default_config_file() < 0) {
             exit(1);
         }
     }
 
     /* second pass of option parsing */
-    optind = 1;
-    for(;;) {
-        if (optind >= argc)
-            break;
-        if (argv[optind][0] != '-') {
-            hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
-        } else {
-            const QEMUOption *popt;
+    for (i = 0; qopt[i].cnt; i++) {
+            /* TODO reindent */
+            loc_set_cmdline(argv, qopt[i].idx, qopt[i].cnt);
 
-            popt = lookup_opt(argc, argv, &optarg, &optind);
-            if (!(popt->arch_mask & arch_type)) {
-                error_report("Option not supported for this target");
-                exit(1);
-            }
-            switch(popt->index) {
-            case QEMU_OPTION_no_kvm_irqchip: {
+            switch (qopt[i].type) {
+            case QAPI_OPTION_KIND_NO_KVM_IRQCHIP: {
+                check_option_arch(QEMU_ARCH_I386);
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "kernel_irqchip=off", false);
                 break;
             }
-            case QEMU_OPTION_cpu:
+            case QAPI_OPTION_KIND_CPU:
                 /* hw initialization will check this */
-                cpu_model = optarg;
+                cpu_model = qopt[i].u.cpu.data;
                 break;
-            case QEMU_OPTION_hda:
+            case QAPI_OPTION_KIND_HDA:
                 {
                     char buf[256];
                     if (cyls == 0)
@@ -3266,21 +3220,25 @@ int main(int argc, char **argv, char **envp)
                                  ",trans=lba" :
                                  translation == BIOS_ATA_TRANSLATION_NONE ?
                                  ",trans=none" : "");
-                    drive_add(IF_DEFAULT, 0, optarg, buf);
+                    drive_add(IF_DEFAULT, 0, qopt[i].u.hda.data, buf);
                     break;
                 }
-            case QEMU_OPTION_hdb:
-            case QEMU_OPTION_hdc:
-            case QEMU_OPTION_hdd:
-                drive_add(IF_DEFAULT, popt->index - QEMU_OPTION_hda, optarg,
-                          HD_OPTS);
+            case QAPI_OPTION_KIND_HDB:
+                drive_add(IF_DEFAULT, 1, qopt[i].u.hdb.data, HD_OPTS);
                 break;
-            case QEMU_OPTION_blockdev:
+            case QAPI_OPTION_KIND_HDC:
+                drive_add(IF_DEFAULT, 2, qopt[i].u.hdc.data, HD_OPTS);
+                break;
+            case QAPI_OPTION_KIND_HDD:
+                drive_add(IF_DEFAULT, 3, qopt[i].u.hdb.data, HD_OPTS);
+                break;
+            case QAPI_OPTION_KIND_BLOCKDEV:
                 {
                     Visitor *v;
                     BlockdevOptions_queue *bdo;
 
-                    v = qobject_input_visitor_new_str(optarg, "driver", &err);
+                    v = qobject_input_visitor_new_str(qopt[i].u.blockdev.data,
+                                                      "driver", &err);
                     if (!v) {
                         error_report_err(err);
                         exit(1);
@@ -3294,35 +3252,37 @@ int main(int argc, char **argv, char **envp)
                     QSIMPLEQ_INSERT_TAIL(&bdo_queue, bdo, entry);
                     break;
                 }
-            case QEMU_OPTION_drive:
-                if (drive_def(optarg) == NULL) {
+            case QAPI_OPTION_KIND_DRIVE:
+                if (drive_def(qopt[i].u.drive.data) == NULL) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_set:
-                if (qemu_set_option(optarg) != 0)
+            case QAPI_OPTION_KIND_SET:
+                if (qemu_set_option(qopt[i].u.set.data) != 0) {
                     exit(1);
+                }
                 break;
-            case QEMU_OPTION_global:
-                if (qemu_global_option(optarg) != 0)
+            case QAPI_OPTION_KIND_GLOBAL:
+                if (qemu_global_option(qopt[i].u.global.data) != 0) {
                     exit(1);
+                }
                 break;
-            case QEMU_OPTION_mtdblock:
-                drive_add(IF_MTD, -1, optarg, MTD_OPTS);
+            case QAPI_OPTION_KIND_MTDBLOCK:
+                drive_add(IF_MTD, -1, qopt[i].u.mtdblock.data, MTD_OPTS);
                 break;
-            case QEMU_OPTION_sd:
-                drive_add(IF_SD, -1, optarg, SD_OPTS);
+            case QAPI_OPTION_KIND_SD:
+                drive_add(IF_SD, -1, qopt[i].u.sd.data, SD_OPTS);
                 break;
-            case QEMU_OPTION_pflash:
-                drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);
+            case QAPI_OPTION_KIND_PFLASH:
+                drive_add(IF_PFLASH, -1, qopt[i].u.pflash.data, PFLASH_OPTS);
                 break;
-            case QEMU_OPTION_snapshot:
+            case QAPI_OPTION_KIND_SNAPSHOT:
                 snapshot = 1;
                 break;
-            case QEMU_OPTION_hdachs:
+            case QAPI_OPTION_KIND_HDACHS:
                 {
                     const char *p;
-                    p = optarg;
+                    p = qopt[i].u.hdachs.data;
                     cyls = strtol(p, (char **)&p, 0);
                     if (cyls < 1 || cyls > 16383)
                         goto chs_fail;
@@ -3383,23 +3343,23 @@ int main(int argc, char **argv, char **envp)
                 error_report("'-hdachs' is deprecated, please use '-device"
                              " ide-hd,cyls=c,heads=h,secs=s,...' instead");
                 break;
-            case QEMU_OPTION_numa:
+            case QAPI_OPTION_KIND_NUMA:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
-                                               optarg, true);
+                                               qopt[i].u.numa.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_display:
-                display_type = select_display(optarg);
+            case QAPI_OPTION_KIND_DISPLAY:
+                display_type = select_display(qopt[i].u.display.data);
                 break;
-            case QEMU_OPTION_nographic:
+            case QAPI_OPTION_KIND_NOGRAPHIC:
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "graphics=off", false);
                 nographic = true;
                 display_type = DT_NONE;
                 break;
-            case QEMU_OPTION_curses:
+            case QAPI_OPTION_KIND_CURSES:
 #ifdef CONFIG_CURSES
                 display_type = DT_CURSES;
 #else
@@ -3407,174 +3367,183 @@ int main(int argc, char **argv, char **envp)
                 exit(1);
 #endif
                 break;
-            case QEMU_OPTION_portrait:
+            case QAPI_OPTION_KIND_PORTRAIT:
                 graphic_rotate = 90;
                 break;
-            case QEMU_OPTION_rotate:
-                graphic_rotate = strtol(optarg, (char **) &optarg, 10);
+            case QAPI_OPTION_KIND_ROTATE:
+                graphic_rotate = strtol(qopt[i].u.rotate.data,
+                                        (char **)&qopt[i].u.rotate.data, 10);
                 if (graphic_rotate != 0 && graphic_rotate != 90 &&
                     graphic_rotate != 180 && graphic_rotate != 270) {
                     error_report("only 90, 180, 270 deg rotation is 
available");
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_kernel:
-                qemu_opts_set(qemu_find_opts("machine"), 0, "kernel", optarg,
-                              &error_abort);
+            case QAPI_OPTION_KIND_KERNEL:
+                qemu_opts_set(qemu_find_opts("machine"), 0, "kernel",
+                              qopt[i].u.kernel.data, &error_abort);
                 break;
-            case QEMU_OPTION_initrd:
-                qemu_opts_set(qemu_find_opts("machine"), 0, "initrd", optarg,
-                              &error_abort);
+            case QAPI_OPTION_KIND_INITRD:
+                qemu_opts_set(qemu_find_opts("machine"), 0, "initrd",
+                              qopt[i].u.initrd.data, &error_abort);
                 break;
-            case QEMU_OPTION_append:
-                qemu_opts_set(qemu_find_opts("machine"), 0, "append", optarg,
-                              &error_abort);
+            case QAPI_OPTION_KIND_APPEND:
+                qemu_opts_set(qemu_find_opts("machine"), 0, "append",
+                              qopt[i].u.append.data, &error_abort);
                 break;
-            case QEMU_OPTION_dtb:
-                qemu_opts_set(qemu_find_opts("machine"), 0, "dtb", optarg,
-                              &error_abort);
+            case QAPI_OPTION_KIND_DTB:
+                qemu_opts_set(qemu_find_opts("machine"), 0, "dtb",
+                              qopt[i].u.dtb.data, &error_abort);
                 break;
-            case QEMU_OPTION_cdrom:
-                drive_add(IF_DEFAULT, 2, optarg, CDROM_OPTS);
+            case QAPI_OPTION_KIND_CDROM:
+                drive_add(IF_DEFAULT, 2, qopt[i].u.cdrom.data, CDROM_OPTS);
                 break;
-            case QEMU_OPTION_boot:
+            case QAPI_OPTION_KIND_BOOT:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("boot-opts"),
-                                               optarg, true);
+                                               qopt[i].u.boot.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_fda:
-            case QEMU_OPTION_fdb:
-                drive_add(IF_FLOPPY, popt->index - QEMU_OPTION_fda,
-                          optarg, FD_OPTS);
+            case QAPI_OPTION_KIND_FDA:
+                drive_add(IF_FLOPPY, 0, qopt[i].u.fda.data, FD_OPTS);
                 break;
-            case QEMU_OPTION_no_fd_bootchk:
+            case QAPI_OPTION_KIND_FDB:
+                drive_add(IF_FLOPPY, 1, qopt[i].u.fdb.data, FD_OPTS);
+                break;
+            case QAPI_OPTION_KIND_NO_FD_BOOTCHK:
+                check_option_arch(QEMU_ARCH_I386);
                 fd_bootchk = 0;
                 break;
-            case QEMU_OPTION_netdev:
+            case QAPI_OPTION_KIND_NETDEV:
                 default_net = 0;
-                if (net_client_parse(qemu_find_opts("netdev"), optarg) == -1) {
+                if (net_client_parse(qemu_find_opts("netdev"),
+                                     qopt[i].u.netdev.data) == -1) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_net:
+            case QAPI_OPTION_KIND_NET:
                 default_net = 0;
-                if (net_client_parse(qemu_find_opts("net"), optarg) == -1) {
+                if (net_client_parse(qemu_find_opts("net"),
+                                     qopt[i].u.net.data) == -1) {
                     exit(1);
                 }
                 break;
 #ifdef CONFIG_LIBISCSI
-            case QEMU_OPTION_iscsi:
+            case QAPI_OPTION_KIND_ISCSI:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("iscsi"),
-                                               optarg, false);
+                                               qopt[i].u.iscsi.data, false);
                 if (!opts) {
                     exit(1);
                 }
                 break;
 #endif
 #ifdef CONFIG_SLIRP
-            case QEMU_OPTION_tftp:
+            case QAPI_OPTION_KIND_TFTP:
                 error_report("The -tftp option is deprecated. "
                              "Please use '-netdev user,tftp=...' instead.");
-                legacy_tftp_prefix = optarg;
+                legacy_tftp_prefix = qopt[i].u.tftp.data;
                 break;
-            case QEMU_OPTION_bootp:
+            case QAPI_OPTION_KIND_BOOTP:
                 error_report("The -bootp option is deprecated. "
                              "Please use '-netdev user,bootfile=...' 
instead.");
-                legacy_bootp_filename = optarg;
+                legacy_bootp_filename = qopt[i].u.bootp.data;
                 break;
-            case QEMU_OPTION_redir:
+            case QAPI_OPTION_KIND_REDIR:
                 error_report("The -redir option is deprecated. "
                              "Please use '-netdev user,hostfwd=...' instead.");
-                if (net_slirp_redir(optarg) < 0)
+                if (net_slirp_redir(qopt[i].u.redir.data) < 0) {
                     exit(1);
+                }
                 break;
 #endif
-            case QEMU_OPTION_bt:
-                add_device_config(DEV_BT, optarg);
+            case QAPI_OPTION_KIND_BT:
+                add_device_config(DEV_BT, qopt[i].u.bt.data);
                 break;
-            case QEMU_OPTION_audio_help:
+            case QAPI_OPTION_KIND_AUDIO_HELP:
                 AUD_help ();
                 exit (0);
                 break;
-            case QEMU_OPTION_soundhw:
-                select_soundhw (optarg);
+            case QAPI_OPTION_KIND_SOUNDHW:
+                select_soundhw(qopt[i].u.soundhw.data);
                 break;
-            case QEMU_OPTION_h:
+            case QAPI_OPTION_KIND_HELP:
                 help(0);
                 break;
-            case QEMU_OPTION_version:
+            case QAPI_OPTION_KIND_VERSION:
                 version();
                 exit(0);
                 break;
-            case QEMU_OPTION_m:
+            case QAPI_OPTION_KIND_MEM:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("memory"),
-                                               optarg, true);
+                                               qopt[i].u.mem.data, true);
                 if (!opts) {
                     exit(EXIT_FAILURE);
                 }
                 break;
 #ifdef CONFIG_TPM
-            case QEMU_OPTION_tpmdev:
-                if (tpm_config_parse(qemu_find_opts("tpmdev"), optarg) < 0) {
+            case QAPI_OPTION_KIND_TPMDEV:
+                if (tpm_config_parse(qemu_find_opts("tpmdev"),
+                                     qopt[i].u.tpmdev.data) < 0) {
                     exit(1);
                 }
                 break;
 #endif
-            case QEMU_OPTION_mempath:
-                mem_path = optarg;
+            case QAPI_OPTION_KIND_MEM_PATH:
+                mem_path = qopt[i].u.mem_path.data;
                 break;
-            case QEMU_OPTION_mem_prealloc:
+            case QAPI_OPTION_KIND_MEM_PREALLOC:
                 mem_prealloc = 1;
                 break;
-            case QEMU_OPTION_d:
-                log_mask = optarg;
+            case QAPI_OPTION_KIND_DEBUG_ENABLE:
+                log_mask = qopt[i].u.debug_enable.data;
                 break;
-            case QEMU_OPTION_D:
-                log_file = optarg;
+            case QAPI_OPTION_KIND_DEBUG_LOG:
+                log_file = qopt[i].u.debug_log.data;
                 break;
-            case QEMU_OPTION_DFILTER:
-                qemu_set_dfilter_ranges(optarg, &error_fatal);
+            case QAPI_OPTION_KIND_DFILTER:
+                qemu_set_dfilter_ranges(qopt[i].u.dfilter.data, &error_fatal);
                 break;
-            case QEMU_OPTION_s:
+            case QAPI_OPTION_KIND_GDB_DEFAULT:
                 add_device_config(DEV_GDB, "tcp::" DEFAULT_GDBSTUB_PORT);
                 break;
-            case QEMU_OPTION_gdb:
-                add_device_config(DEV_GDB, optarg);
+            case QAPI_OPTION_KIND_GDB:
+                add_device_config(DEV_GDB, qopt[i].u.gdb.data);
                 break;
-            case QEMU_OPTION_L:
-                if (is_help_option(optarg)) {
+            case QAPI_OPTION_KIND_LOAD_PATH:
+                if (is_help_option(qopt[i].u.load_path.data)) {
                     list_data_dirs = true;
                 } else {
                     qemu_add_data_dir(optarg);
                 }
                 break;
-            case QEMU_OPTION_bios:
-                qemu_opts_set(qemu_find_opts("machine"), 0, "firmware", optarg,
-                              &error_abort);
+            case QAPI_OPTION_KIND_BIOS:
+                qemu_opts_set(qemu_find_opts("machine"), 0, "firmware",
+                              qopt[i].u.bios.data, &error_abort);
                 break;
-            case QEMU_OPTION_singlestep:
+            case QAPI_OPTION_KIND_SINGLESTEP:
                 singlestep = 1;
                 break;
-            case QEMU_OPTION_S:
+            case QAPI_OPTION_KIND_STOPPED:
                 autostart = 0;
                 break;
-            case QEMU_OPTION_k:
-                keyboard_layout = optarg;
+            case QAPI_OPTION_KIND_KEYBOARD_LAYOUT:
+                keyboard_layout = qopt[i].u.keyboard_layout.data;
                 break;
-            case QEMU_OPTION_localtime:
+            case QAPI_OPTION_KIND_LOCALTIME:
                 rtc_utc = 0;
                 break;
-            case QEMU_OPTION_vga:
-                vga_model = optarg;
+            case QAPI_OPTION_KIND_VGA:
+                vga_model = qopt[i].u.vga.data;
                 default_vga = 0;
                 break;
-            case QEMU_OPTION_g:
+            case QAPI_OPTION_KIND_GRAPHICAL_RESOLUTION:
                 {
                     const char *p;
                     int w, h, depth;
-                    p = optarg;
+
+                    check_option_arch(QEMU_ARCH_PPC | QEMU_ARCH_SPARC);
+                    p = qopt[i].u.graphical_resolution.data;
                     w = strtol(p, (char **)&p, 10);
                     if (w <= 0) {
                     graphic_error:
@@ -3604,55 +3573,57 @@ int main(int argc, char **argv, char **envp)
                     graphic_depth = depth;
                 }
                 break;
-            case QEMU_OPTION_echr:
+            case QAPI_OPTION_KIND_ECHR:
                 {
                     char *r;
-                    term_escape_char = strtol(optarg, &r, 0);
-                    if (r == optarg)
+                    term_escape_char = strtol(qopt[i].u.echr.data, &r, 0);
+                    if (r == qopt[i].u.echr.data) {
                         printf("Bad argument to echr\n");
+                    }
                     break;
                 }
-            case QEMU_OPTION_monitor:
+            case QAPI_OPTION_KIND_MONITOR:
                 default_monitor = 0;
-                if (strncmp(optarg, "none", 4)) {
-                    monitor_parse(optarg, "readline", false);
+                if (strncmp(qopt[i].u.monitor.data, "none", 4)) {
+                    monitor_parse(qopt[i].u.monitor.data, "readline", false);
                 }
                 break;
-            case QEMU_OPTION_qmp:
-                monitor_parse(optarg, "control", false);
+            case QAPI_OPTION_KIND_QMP:
+                monitor_parse(qopt[i].u.qmp.data, "control", false);
                 default_monitor = 0;
                 break;
-            case QEMU_OPTION_qmp_pretty:
-                monitor_parse(optarg, "control", true);
+            case QAPI_OPTION_KIND_QMP_PRETTY:
+                monitor_parse(qopt[i].u.qmp_pretty.data, "control", true);
                 default_monitor = 0;
                 break;
-            case QEMU_OPTION_mon:
-                opts = qemu_opts_parse_noisily(qemu_find_opts("mon"), optarg,
-                                               true);
+            case QAPI_OPTION_KIND_MON:
+                opts = qemu_opts_parse_noisily(qemu_find_opts("mon"),
+                                               qopt[i].u.mon.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 default_monitor = 0;
                 break;
-            case QEMU_OPTION_chardev:
+            case QAPI_OPTION_KIND_CHARDEV:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("chardev"),
-                                               optarg, true);
+                                               qopt[i].u.chardev.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_fsdev:
+            case QAPI_OPTION_KIND_FSDEV:
                 olist = qemu_find_opts("fsdev");
                 if (!olist) {
                     error_report("fsdev support is disabled");
                     exit(1);
                 }
-                opts = qemu_opts_parse_noisily(olist, optarg, true);
+                opts = qemu_opts_parse_noisily(olist, qopt[i].u.fsdev.data,
+                                               true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_virtfs: {
+            case QAPI_OPTION_KIND_VIRTFS: {
                 QemuOpts *fsdev;
                 QemuOpts *device;
                 const char *writeout, *sock_fd, *socket, *path, 
*security_model;
@@ -3662,7 +3633,8 @@ int main(int argc, char **argv, char **envp)
                     error_report("virtfs support is disabled");
                     exit(1);
                 }
-                opts = qemu_opts_parse_noisily(olist, optarg, true);
+                opts = qemu_opts_parse_noisily(olist, qopt[i].u.virtfs.data,
+                                               true);
                 if (!opts) {
                     exit(1);
                 }
@@ -3724,7 +3696,7 @@ int main(int argc, char **argv, char **envp)
                              qemu_opt_get(opts, "mount_tag"), &error_abort);
                 break;
             }
-            case QEMU_OPTION_virtfs_synth: {
+            case QAPI_OPTION_KIND_VIRTFS_SYNTH: {
                 QemuOpts *fsdev;
                 QemuOpts *device;
 
@@ -3743,62 +3715,63 @@ int main(int argc, char **argv, char **envp)
                 qemu_opt_set(device, "mount_tag", "v_synth", &error_abort);
                 break;
             }
-            case QEMU_OPTION_serial:
-                add_device_config(DEV_SERIAL, optarg);
+            case QAPI_OPTION_KIND_SERIAL:
+                add_device_config(DEV_SERIAL, qopt[i].u.serial.data);
                 default_serial = 0;
-                if (strncmp(optarg, "mon:", 4) == 0) {
+                if (strncmp(qopt[i].u.serial.data, "mon:", 4) == 0) {
                     default_monitor = 0;
                 }
                 break;
-            case QEMU_OPTION_watchdog:
+            case QAPI_OPTION_KIND_WATCHDOG:
                 if (watchdog) {
                     error_report("only one watchdog option may be given");
                     return 1;
                 }
-                watchdog = optarg;
+                watchdog = qopt[i].u.watchdog.data;
                 break;
-            case QEMU_OPTION_watchdog_action:
-                if (select_watchdog_action(optarg) == -1) {
+            case QAPI_OPTION_KIND_WATCHDOG_ACTION:
+                if (select_watchdog_action(qopt[i].u.watchdog_action.data)
+                    == -1) {
                     error_report("unknown -watchdog-action parameter");
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_virtiocon:
-                add_device_config(DEV_VIRTCON, optarg);
+            case QAPI_OPTION_KIND_VIRTIOCONSOLE:
+                add_device_config(DEV_VIRTCON, qopt[i].u.virtioconsole.data);
                 default_virtcon = 0;
-                if (strncmp(optarg, "mon:", 4) == 0) {
+                if (strncmp(qopt[i].u.virtioconsole.data, "mon:", 4) == 0) {
                     default_monitor = 0;
                 }
                 break;
-            case QEMU_OPTION_parallel:
-                add_device_config(DEV_PARALLEL, optarg);
+            case QAPI_OPTION_KIND_PARALLEL:
+                add_device_config(DEV_PARALLEL, qopt[i].u.parallel.data);
                 default_parallel = 0;
-                if (strncmp(optarg, "mon:", 4) == 0) {
+                if (strncmp(qopt[i].u.parallel.data, "mon:", 4) == 0) {
                     default_monitor = 0;
                 }
                 break;
-            case QEMU_OPTION_debugcon:
-                add_device_config(DEV_DEBUGCON, optarg);
+            case QAPI_OPTION_KIND_DEBUGCON:
+                add_device_config(DEV_DEBUGCON, qopt[i].u.debugcon.data);
                 break;
-            case QEMU_OPTION_loadvm:
-                loadvm = optarg;
+            case QAPI_OPTION_KIND_LOADVM:
+                loadvm = qopt[i].u.loadvm.data;
                 break;
-            case QEMU_OPTION_full_screen:
+            case QAPI_OPTION_KIND_FULL_SCREEN:
                 full_screen = 1;
                 break;
-            case QEMU_OPTION_no_frame:
+            case QAPI_OPTION_KIND_NO_FRAME:
                 no_frame = 1;
                 break;
-            case QEMU_OPTION_alt_grab:
+            case QAPI_OPTION_KIND_ALT_GRAB:
                 alt_grab = 1;
                 break;
-            case QEMU_OPTION_ctrl_grab:
+            case QAPI_OPTION_KIND_CTRL_GRAB:
                 ctrl_grab = 1;
                 break;
-            case QEMU_OPTION_no_quit:
+            case QAPI_OPTION_KIND_NO_QUIT:
                 no_quit = 1;
                 break;
-            case QEMU_OPTION_sdl:
+            case QAPI_OPTION_KIND_SDL:
 #ifdef CONFIG_SDL
                 display_type = DT_SDL;
                 break;
@@ -3806,154 +3779,168 @@ int main(int argc, char **argv, char **envp)
                 error_report("SDL support is disabled");
                 exit(1);
 #endif
-            case QEMU_OPTION_pidfile:
-                pid_file = optarg;
+            case QAPI_OPTION_KIND_PIDFILE:
+                pid_file = qopt[i].u.pidfile.data;
                 break;
-            case QEMU_OPTION_win2k_hack:
+            case QAPI_OPTION_KIND_WIN2K_HACK:
+                check_option_arch(QEMU_ARCH_I386);
                 win2k_install_hack = 1;
                 break;
-            case QEMU_OPTION_rtc_td_hack: {
+            case QAPI_OPTION_KIND_RTC_TD_HACK: {
                 static GlobalProperty slew_lost_ticks = {
                     .driver   = "mc146818rtc",
                     .property = "lost_tick_policy",
                     .value    = "slew",
                 };
 
+                check_option_arch(QEMU_ARCH_I386);
                 qdev_prop_register_global(&slew_lost_ticks);
                 break;
             }
-            case QEMU_OPTION_acpitable:
+            case QAPI_OPTION_KIND_ACPITABLE:
+                check_option_arch(QEMU_ARCH_I386);
                 opts = qemu_opts_parse_noisily(qemu_find_opts("acpi"),
-                                               optarg, true);
+                                               qopt[i].u.acpitable.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 acpi_table_add(opts, &error_fatal);
                 break;
-            case QEMU_OPTION_smbios:
+            case QAPI_OPTION_KIND_SMBIOS:
+                check_option_arch(QEMU_ARCH_I386 | QEMU_ARCH_ARM);
                 opts = qemu_opts_parse_noisily(qemu_find_opts("smbios"),
-                                               optarg, false);
+                                               qopt[i].u.smbios.data, false);
                 if (!opts) {
                     exit(1);
                 }
                 smbios_entry_add(opts, &error_fatal);
                 break;
-            case QEMU_OPTION_fwcfg:
+            case QAPI_OPTION_KIND_FW_CFG:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("fw_cfg"),
-                                               optarg, true);
+                                               qopt[i].u.fw_cfg.data, true);
                 if (opts == NULL) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_enable_kvm:
+            case QAPI_OPTION_KIND_ENABLE_KVM:
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "accel=kvm", false);
                 break;
-            case QEMU_OPTION_enable_hax:
+            case QAPI_OPTION_KIND_ENABLE_HAX:
+                check_option_arch(QEMU_ARCH_I386);
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "accel=hax", false);
                 break;
-            case QEMU_OPTION_M:
-            case QEMU_OPTION_machine:
+            case QAPI_OPTION_KIND_MACHINE:
                 olist = qemu_find_opts("machine");
-                opts = qemu_opts_parse_noisily(olist, optarg, true);
+                opts = qemu_opts_parse_noisily(olist, qopt[i].u.machine.data,
+                                               true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-             case QEMU_OPTION_no_kvm:
+             case QAPI_OPTION_KIND_NO_KVM:
+                check_option_arch(QEMU_ARCH_I386);
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "accel=tcg", false);
                 break;
-            case QEMU_OPTION_no_kvm_pit: {
+            case QAPI_OPTION_KIND_NO_KVM_PIT: {
+                check_option_arch(QEMU_ARCH_I386);
                 warn_report("ignoring deprecated option");
                 break;
             }
-            case QEMU_OPTION_no_kvm_pit_reinjection: {
+            case QAPI_OPTION_KIND_NO_KVM_PIT_REINJECTION: {
                 static GlobalProperty kvm_pit_lost_tick_policy = {
                     .driver   = "kvm-pit",
                     .property = "lost_tick_policy",
                     .value    = "discard",
                 };
 
+                check_option_arch(QEMU_ARCH_I386);
                 warn_report("deprecated, replaced by "
                             "-global kvm-pit.lost_tick_policy=discard");
                 qdev_prop_register_global(&kvm_pit_lost_tick_policy);
                 break;
             }
-            case QEMU_OPTION_accel:
+            case QAPI_OPTION_KIND_ACCEL:
+            {
+                const char *accel;
                 accel_opts = qemu_opts_parse_noisily(qemu_find_opts("accel"),
-                                                     optarg, true);
-                optarg = qemu_opt_get(accel_opts, "accel");
-                if (!optarg || is_help_option(optarg)) {
+                                                     qopt[i].u.accel.data, 
true);
+                accel = qemu_opt_get(accel_opts, "accel");
+                if (!accel || is_help_option(qopt[i].u.accel.data)) {
                     error_printf("Possible accelerators: kvm, xen, hax, 
tcg\n");
                     exit(0);
                 }
                 opts = qemu_opts_create(qemu_find_opts("machine"), NULL,
                                         false, &error_abort);
-                qemu_opt_set(opts, "accel", optarg, &error_abort);
+                qemu_opt_set(opts, "accel", qopt[i].u.accel.data, 
&error_abort);
                 break;
-            case QEMU_OPTION_usb:
+            }
+            case QAPI_OPTION_KIND_USB:
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "usb=on", false);
                 break;
-            case QEMU_OPTION_usbdevice:
+            case QAPI_OPTION_KIND_USBDEVICE:
                 error_report("'-usbdevice' is deprecated, please use "
                              "'-device usb-...' instead");
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "usb=on", false);
-                add_device_config(DEV_USB, optarg);
+                add_device_config(DEV_USB, qopt[i].u.usbdevice.data);
                 break;
-            case QEMU_OPTION_device:
+            case QAPI_OPTION_KIND_DEVICE:
                 if (!qemu_opts_parse_noisily(qemu_find_opts("device"),
-                                             optarg, true)) {
+                                             qopt[i].u.device.data, true)) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_smp:
+            case QAPI_OPTION_KIND_SMP:
                 if (!qemu_opts_parse_noisily(qemu_find_opts("smp-opts"),
-                                             optarg, true)) {
+                                             qopt[i].u.smp.data, true)) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_vnc:
-                vnc_parse(optarg, &error_fatal);
+            case QAPI_OPTION_KIND_VNC:
+                vnc_parse(qopt[i].u.vnc.data, &error_fatal);
                 break;
-            case QEMU_OPTION_no_acpi:
+            case QAPI_OPTION_KIND_NO_ACPI:
+                check_option_arch(QEMU_ARCH_I386 | QEMU_ARCH_ARM);
                 acpi_enabled = 0;
                 break;
-            case QEMU_OPTION_no_hpet:
+            case QAPI_OPTION_KIND_NO_HPET:
+                check_option_arch(QEMU_ARCH_I386);
                 no_hpet = 1;
                 break;
-            case QEMU_OPTION_balloon:
-                if (balloon_parse(optarg) < 0) {
-                    error_report("unknown -balloon argument %s", optarg);
+            case QAPI_OPTION_KIND_BALLOON:
+                if (balloon_parse(qopt[i].u.balloon.data) < 0) {
+                    error_report("unknown -balloon argument %s",
+                                 qopt[i].u.balloon.data);
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_no_reboot:
+            case QAPI_OPTION_KIND_NO_REBOOT:
                 no_reboot = 1;
                 break;
-            case QEMU_OPTION_no_shutdown:
+            case QAPI_OPTION_KIND_NO_SHUTDOWN:
                 no_shutdown = 1;
                 break;
-            case QEMU_OPTION_show_cursor:
+            case QAPI_OPTION_KIND_SHOW_CURSOR:
                 cursor_hide = 0;
                 break;
-            case QEMU_OPTION_uuid:
-                if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {
+            case QAPI_OPTION_KIND_UUID:
+                if (qemu_uuid_parse(qopt[i].u.uuid.data, &qemu_uuid) < 0) {
                     error_report("failed to parse UUID string: wrong format");
                     exit(1);
                 }
                 qemu_uuid_set = true;
                 break;
-            case QEMU_OPTION_option_rom:
+            case QAPI_OPTION_KIND_OPTION_ROM:
                 if (nb_option_roms >= MAX_OPTION_ROMS) {
                     error_report("too many option ROMs");
                     exit(1);
                 }
                 opts = qemu_opts_parse_noisily(qemu_find_opts("option-rom"),
-                                               optarg, true);
+                                               qopt[i].u.option_rom.data, 
true);
                 if (!opts) {
                     exit(1);
                 }
@@ -3966,14 +3953,20 @@ int main(int argc, char **argv, char **envp)
                 }
                 nb_option_roms++;
                 break;
-            case QEMU_OPTION_semihosting:
+            case QAPI_OPTION_KIND_SEMIHOSTING:
+                check_option_arch(QEMU_ARCH_ARM | QEMU_ARCH_M68K
+                                  | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32
+                                  | QEMU_ARCH_MIPS);
                 semihosting.enabled = true;
                 semihosting.target = SEMIHOSTING_TARGET_AUTO;
                 break;
-            case QEMU_OPTION_semihosting_config:
+            case QAPI_OPTION_KIND_SEMIHOSTING_CONFIG:
+                check_option_arch(QEMU_ARCH_ARM | QEMU_ARCH_M68K
+                                  | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32
+                                  | QEMU_ARCH_MIPS);
                 semihosting.enabled = true;
                 opts = 
qemu_opts_parse_noisily(qemu_find_opts("semihosting-config"),
-                                               optarg, false);
+                                               
qopt[i].u.semihosting_config.data, false);
                 if (opts != NULL) {
                     semihosting.enabled = qemu_opt_get_bool(opts, "enable",
                                                             true);
@@ -3987,7 +3980,7 @@ int main(int argc, char **argv, char **envp)
                             semihosting.target = SEMIHOSTING_TARGET_AUTO;
                         } else {
                             error_report("unsupported semihosting-config %s",
-                                         optarg);
+                                         qopt[i].u.semihosting_config.data);
                             exit(1);
                         }
                     } else {
@@ -3997,71 +3990,75 @@ int main(int argc, char **argv, char **envp)
                     qemu_opt_foreach(opts, add_semihosting_arg,
                                      &semihosting, NULL);
                 } else {
-                    error_report("unsupported semihosting-config %s", optarg);
+                    error_report("unsupported semihosting-config %s",
+                                 qopt[i].u.semihosting_config.data);
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_tdf:
+            case QAPI_OPTION_KIND_TDF:
                 warn_report("ignoring deprecated option");
                 break;
-            case QEMU_OPTION_name:
+            case QAPI_OPTION_KIND_NAME:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("name"),
-                                               optarg, true);
+                                               qopt[i].u.name.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_prom_env:
+            case QAPI_OPTION_KIND_PROM_ENV:
+                check_option_arch(QEMU_ARCH_PPC | QEMU_ARCH_SPARC);
                 if (nb_prom_envs >= MAX_PROM_ENVS) {
                     error_report("too many prom variables");
                     exit(1);
                 }
-                prom_envs[nb_prom_envs] = optarg;
+                prom_envs[nb_prom_envs] = qopt[i].u.prom_env.data;
                 nb_prom_envs++;
                 break;
-            case QEMU_OPTION_old_param:
+            case QAPI_OPTION_KIND_OLD_PARAM:
+                check_option_arch(QEMU_ARCH_ARM);
                 old_param = 1;
                 break;
-            case QEMU_OPTION_clock:
+            case QAPI_OPTION_KIND_CLOCK:
                 /* Clock options no longer exist.  Keep this option for
                  * backward compatibility.
                  */
                 break;
-            case QEMU_OPTION_startdate:
-                configure_rtc_date_offset(optarg, 1);
+            case QAPI_OPTION_KIND_STARTDATE:
+                configure_rtc_date_offset(qopt[i].u.startdate.data, 1);
                 break;
-            case QEMU_OPTION_rtc:
-                opts = qemu_opts_parse_noisily(qemu_find_opts("rtc"), optarg,
-                                               false);
+            case QAPI_OPTION_KIND_RTC:
+                opts = qemu_opts_parse_noisily(qemu_find_opts("rtc"),
+                                               qopt[i].u.rtc.data, false);
                 if (!opts) {
                     exit(1);
                 }
                 configure_rtc(opts);
                 break;
-            case QEMU_OPTION_tb_size:
+            case QAPI_OPTION_KIND_TB_SIZE:
 #ifndef CONFIG_TCG
                 error_report("TCG is disabled");
                 exit(1);
 #endif
-                if (qemu_strtoul(optarg, NULL, 0, &tcg_tb_size) < 0) {
+                if (qemu_strtoul(qopt[i].u.tb_size.data, NULL, 0, &tcg_tb_size)
+                    < 0) {
                     error_report("Invalid argument to -tb-size");
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_icount:
+            case QAPI_OPTION_KIND_ICOUNT:
                 icount_opts = qemu_opts_parse_noisily(qemu_find_opts("icount"),
-                                                      optarg, true);
+                                                      qopt[i].u.icount.data, 
true);
                 if (!icount_opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_incoming:
+            case QAPI_OPTION_KIND_INCOMING:
                 if (!incoming) {
                     runstate_set(RUN_STATE_INMIGRATE);
                 }
-                incoming = optarg;
+                incoming = qopt[i].u.incoming.data;
                 break;
-            case QEMU_OPTION_only_migratable:
+            case QAPI_OPTION_KIND_ONLY_MIGRATABLE:
                 /*
                  * TODO: we can remove this option one day, and we
                  * should all use:
@@ -4070,72 +4067,73 @@ int main(int argc, char **argv, char **envp)
                  */
                 qemu_global_option("migration.only-migratable=true");
                 break;
-            case QEMU_OPTION_nodefaults:
+            case QAPI_OPTION_KIND_NODEFAULTS:
                 has_defaults = 0;
                 break;
-            case QEMU_OPTION_xen_domid:
+            case QAPI_OPTION_KIND_XEN_DOMID:
                 if (!(xen_available())) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
-                xen_domid = atoi(optarg);
+                xen_domid = atoi(qopt[i].u.xen_domid.data);
                 break;
-            case QEMU_OPTION_xen_create:
+            case QAPI_OPTION_KIND_XEN_CREATE:
                 if (!(xen_available())) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_mode = XEN_CREATE;
                 break;
-            case QEMU_OPTION_xen_attach:
+            case QAPI_OPTION_KIND_XEN_ATTACH:
                 if (!(xen_available())) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_mode = XEN_ATTACH;
                 break;
-            case QEMU_OPTION_xen_domid_restrict:
+            case QAPI_OPTION_KIND_XEN_DOMID_RESTRICT:
                 if (!(xen_available())) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_domid_restrict = true;
                 break;
-            case QEMU_OPTION_trace:
+            case QAPI_OPTION_KIND_TRACE:
                 g_free(trace_file);
-                trace_file = trace_opt_parse(optarg);
+                trace_file = trace_opt_parse(qopt[i].u.trace.data);
                 break;
-            case QEMU_OPTION_readconfig:
+            case QAPI_OPTION_KIND_READCONFIG:
                 {
-                    int ret = qemu_read_config_file(optarg);
+                    int ret = qemu_read_config_file(qopt[i].u.readconfig.data);
                     if (ret < 0) {
-                        error_report("read config %s: %s", optarg,
-                                     strerror(-ret));
+                        error_report("read config %s: %s",
+                                     qopt[i].u.readconfig.data, 
strerror(-ret));
                         exit(1);
                     }
                     break;
                 }
-            case QEMU_OPTION_spice:
+            case QAPI_OPTION_KIND_SPICE:
                 olist = qemu_find_opts("spice");
                 if (!olist) {
                     error_report("spice support is disabled");
                     exit(1);
                 }
-                opts = qemu_opts_parse_noisily(olist, optarg, false);
+                opts = qemu_opts_parse_noisily(olist, qopt[i].u.spice.data, 
false);
                 if (!opts) {
                     exit(1);
                 }
                 display_remote++;
                 break;
-            case QEMU_OPTION_writeconfig:
+            case QAPI_OPTION_KIND_WRITECONFIG:
                 {
                     FILE *fp;
-                    if (strcmp(optarg, "-") == 0) {
+                    if (strcmp(qopt[i].u.writeconfig.data, "-") == 0) {
                         fp = stdout;
                     } else {
-                        fp = fopen(optarg, "w");
+                        fp = fopen(qopt[i].u.writeconfig.data, "w");
                         if (fp == NULL) {
-                            error_report("open %s: %s", optarg,
+                            error_report("open %s: %s",
+                                         qopt[i].u.writeconfig.data,
                                          strerror(errno));
                             exit(1);
                         }
@@ -4146,23 +4144,23 @@ int main(int argc, char **argv, char **envp)
                     }
                     break;
                 }
-            case QEMU_OPTION_qtest:
-                qtest_chrdev = optarg;
+            case QAPI_OPTION_KIND_QTEST:
+                qtest_chrdev = qopt[i].u.qtest.data;
                 break;
-            case QEMU_OPTION_qtest_log:
-                qtest_log = optarg;
+            case QAPI_OPTION_KIND_QTEST_LOG:
+                qtest_log = qopt[i].u.qtest_log.data;
                 break;
-            case QEMU_OPTION_sandbox:
+            case QAPI_OPTION_KIND_SANDBOX:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("sandbox"),
-                                               optarg, true);
+                                               qopt[i].u.sandbox.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_add_fd:
+            case QAPI_OPTION_KIND_ADD_FD:
 #ifndef _WIN32
                 opts = qemu_opts_parse_noisily(qemu_find_opts("add-fd"),
-                                               optarg, false);
+                                               qopt[i].u.add_fd.data, false);
                 if (!opts) {
                     exit(1);
                 }
@@ -4172,46 +4170,52 @@ int main(int argc, char **argv, char **envp)
                 exit(1);
 #endif
                 break;
-            case QEMU_OPTION_object:
+            case QAPI_OPTION_KIND_OBJECT:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("object"),
-                                               optarg, true);
+                                               qopt[i].u.object.data, true);
                 if (!opts) {
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_realtime:
+            case QAPI_OPTION_KIND_REALTIME:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("realtime"),
-                                               optarg, false);
+                                               qopt[i].u.realtime.data, false);
                 if (!opts) {
                     exit(1);
                 }
                 enable_mlock = qemu_opt_get_bool(opts, "mlock", true);
                 break;
-            case QEMU_OPTION_msg:
-                opts = qemu_opts_parse_noisily(qemu_find_opts("msg"), optarg,
-                                               false);
+            case QAPI_OPTION_KIND_MSG:
+                opts = qemu_opts_parse_noisily(qemu_find_opts("msg"),
+                                               qopt[i].u.msg.data, false);
                 if (!opts) {
                     exit(1);
                 }
                 configure_msg(opts);
                 break;
-            case QEMU_OPTION_dump_vmstate:
+            case QAPI_OPTION_KIND_DUMP_VMSTATE:
                 if (vmstate_dump_file) {
                     error_report("only one '-dump-vmstate' "
                                  "option may be given");
                     exit(1);
                 }
-                vmstate_dump_file = fopen(optarg, "w");
+                vmstate_dump_file = fopen(qopt[i].u.dump_vmstate.data, "w");
                 if (vmstate_dump_file == NULL) {
-                    error_report("open %s: %s", optarg, strerror(errno));
+                    error_report("open %s: %s",
+                                 qopt[i].u.dump_vmstate.data, strerror(errno));
                     exit(1);
                 }
                 break;
             default:
-                os_parse_cmd_args(popt->index, optarg);
+                os_parse_cmd_args(&qopt[i]);
             }
-        }
     }
+
+    for (i = qopt[i].idx; argv[i]; i++) {
+        loc_set_cmdline(argv, i, 1);
+        hda_opts = drive_add(IF_DEFAULT, 0, argv[i], HD_OPTS);
+    }
+
     /*
      * Clear error location left behind by the loop.
      * Best done right after the loop.  Do not insert code here!
@@ -4826,6 +4830,8 @@ int main(int argc, char **argv, char **envp)
         break;
     }
 
+    g_free((void *)qopt);
+
     /* must be after terminal init, SDL library changes signal handlers */
     os_setup_signal_handling();
 
-- 
2.13.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]