Enables or disables ACPI Heterogeneous Memory Attribute Table
(HMAT) support. The default is off.
- ``memory-backend='id'``
+ ``memory-backend='id'``
An alternative to legacy ``-mem-path`` and ``mem-prealloc`` options.
Allows to use a memory backend as main RAM.
For example:
::
- -object memory-backend-file,id=pc.ram,size=512M,mem-path=/hugetlbfs,prealloc=on,share=on
- -machine memory-backend=pc.ram
- -m 512M
+
+ -object memory-backend-file,id=pc.ram,size=512M,mem-path=/hugetlbfs,prealloc=on,share=on
+ -machine memory-backend=pc.ram
+ -m 512M
Migration compatibility note:
- a) as backend id one shall use value of 'default-ram-id', advertised by
- machine type (available via ``query-machines`` QMP command), if migration
- to/from old QEMU (<5.0) is expected.
- b) for machine types 4.0 and older, user shall
- use ``x-use-canonical-path-for-ramblock-id=off`` backend option
- if migration to/from old QEMU (<5.0) is expected.
+
+ * as backend id one shall use value of 'default-ram-id', advertised by
+ machine type (available via ``query-machines`` QMP command), if migration
+ to/from old QEMU (<5.0) is expected.
+ * for machine types 4.0 and older, user shall
+ use ``x-use-canonical-path-for-ramblock-id=off`` backend option
+ if migration to/from old QEMU (<5.0) is expected.
+
For example:
::
- -object memory-backend-ram,id=pc.ram,size=512M,x-use-canonical-path-for-ramblock-id=off
- -machine memory-backend=pc.ram
- -m 512M
+
+ -object memory-backend-ram,id=pc.ram,size=512M,x-use-canonical-path-for-ramblock-id=off
+ -machine memory-backend=pc.ram
+ -m 512M
ERST
-HXCOMM Deprecated by -machine
-DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL)
+DEF("M", HAS_ARG, QEMU_OPTION_M,
+ " sgx-epc.0.memdev=memid,sgx-epc.0.node=numaid\n",
+ QEMU_ARCH_ALL)
+
+SRST
+``sgx-epc.0.memdev=@var{memid},sgx-epc.0.node=@var{numaid}``
+ Define an SGX EPC section.
+ERST
DEF("cpu", HAS_ARG, QEMU_OPTION_cpu,
"-cpu cpu select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL)
ERST
DEF("smp", HAS_ARG, QEMU_OPTION_smp,
- "-smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,dies=dies][,sockets=sockets]\n"
- " set the number of CPUs to 'n' [default=1]\n"
- " maxcpus= maximum number of total cpus, including\n"
+ "-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads]\n"
+ " set the number of initial 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 (for PC, it's on one die)\n"
- " threads= number of threads on one CPU core\n"
- " dies= number of CPU dies on one socket (for PC only)\n"
- " sockets= number of discrete sockets in the system\n",
- QEMU_ARCH_ALL)
+ " sockets= number of sockets on the machine board\n"
+ " dies= number of dies in one socket\n"
+ " clusters= number of clusters in one die\n"
+ " cores= number of cores in one cluster\n"
+ " threads= number of threads in one core\n"
+ "Note: Different machines may have different subsets of the CPU topology\n"
+ " parameters supported, so the actual meaning of the supported parameters\n"
+ " will vary accordingly. For example, for a machine type that supports a\n"
+ " three-level CPU hierarchy of sockets/cores/threads, the parameters will\n"
+ " sequentially mean as below:\n"
+ " sockets means the number of sockets on the machine board\n"
+ " cores means the number of cores in one socket\n"
+ " threads means the number of threads in one core\n"
+ " For a particular machine type board, an expected CPU topology hierarchy\n"
+ " can be defined through the supported sub-option. Unsupported parameters\n"
+ " can also be provided in addition to the sub-option, but their values\n"
+ " must be set as 1 in the purpose of correct parsing.\n",
+ QEMU_ARCH_ALL)
SRST
-``-smp [cpus=]n[,cores=cores][,threads=threads][,dies=dies][,sockets=sockets][,maxcpus=maxcpus]``
- Simulate an SMP system with 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 cores per die, the
- number of threads per cores, the number of dies per packages and the
- total number of sockets can be specified. Missing values will be
- computed. If any on the three values is given, the total number of
- CPUs n can be omitted. maxcpus specifies the maximum number of
- hotpluggable CPUs.
+``-smp [[cpus=]n][,maxcpus=maxcpus][,sockets=sockets][,dies=dies][,clusters=clusters][,cores=cores][,threads=threads]``
+ Simulate a SMP system with '\ ``n``\ ' CPUs initially present on
+ the machine type board. On boards supporting CPU hotplug, the optional
+ '\ ``maxcpus``\ ' parameter can be set to enable further CPUs to be
+ added at runtime. When both parameters are omitted, the maximum number
+ of CPUs will be calculated from the provided topology members and the
+ initial CPU count will match the maximum number. When only one of them
+ is given then the omitted one will be set to its counterpart's value.
+ Both parameters may be specified, but the maximum number of CPUs must
+ be equal to or greater than the initial CPU count. Product of the
+ CPU topology hierarchy must be equal to the maximum number of CPUs.
+ Both parameters are subject to an upper limit that is determined by
+ the specific machine type chosen.
+
+ To control reporting of CPU topology information, values of the topology
+ parameters can be specified. Machines may only support a subset of the
+ parameters and different machines may have different subsets supported
+ which vary depending on capacity of the corresponding CPU targets. So
+ for a particular machine type board, an expected topology hierarchy can
+ be defined through the supported sub-option. Unsupported parameters can
+ also be provided in addition to the sub-option, but their values must be
+ set as 1 in the purpose of correct parsing.
+
+ Either the initial CPU count, or at least one of the topology parameters
+ must be specified. The specified parameters must be greater than zero,
+ explicit configuration like "cpus=0" is not allowed. Values for any
+ omitted parameters will be computed from those which are given.
+
+ For example, the following sub-option defines a CPU topology hierarchy
+ (2 sockets totally on the machine, 2 cores per socket, 2 threads per
+ core) for a machine that only supports sockets/cores/threads.
+ Some members of the option can be omitted but their values will be
+ automatically computed:
+
+ ::
+
+ -smp 8,sockets=2,cores=2,threads=2,maxcpus=8
+
+ The following sub-option defines a CPU topology hierarchy (2 sockets
+ totally on the machine, 2 dies per socket, 2 cores per die, 2 threads
+ per core) for PC machines which support sockets/dies/cores/threads.
+ Some members of the option can be omitted but their values will be
+ automatically computed:
+
+ ::
+
+ -smp 16,sockets=2,dies=2,cores=2,threads=2,maxcpus=16
+
+ The following sub-option defines a CPU topology hierarchy (2 sockets
+ totally on the machine, 2 clusters per socket, 2 cores per cluster,
+ 2 threads per core) for ARM virt machines which support sockets/clusters
+ /cores/threads. Some members of the option can be omitted but their values
+ will be automatically computed:
+
+ ::
+
+ -smp 16,sockets=2,clusters=2,cores=2,threads=2,maxcpus=16
+
+ Historically preference was given to the coarsest topology parameters
+ when computing missing values (ie sockets preferred over cores, which
+ were preferred over threads), however, this behaviour is considered
+ liable to change. Prior to 6.2 the preference was sockets over cores
+ over threads. Since 6.2 the preference is cores over sockets over threads.
+
+ For example, the following option defines a machine board with 2 sockets
+ of 1 core before 6.2 and 1 socket of 2 cores after 6.2:
+
+ ::
+
+ -smp 2
ERST
DEF("numa", HAS_ARG, QEMU_OPTION_numa,
-m 2G \
-object memory-backend-ram,size=1G,id=m0 \
-object memory-backend-ram,size=1G,id=m1 \
- -smp 2 \
+ -smp 2,sockets=2,maxcpus=2 \
-numa node,nodeid=0,memdev=m0 \
-numa node,nodeid=1,memdev=m1,initiator=0 \
-numa cpu,node-id=0,socket-id=0 \
#endif
#ifdef CONFIG_SPICE
"-audiodev spice,id=id[,prop[=value][,...]]\n"
+#endif
+#ifdef CONFIG_DBUS_DISPLAY
+ "-audiodev dbus,id=id[,prop[=value][,...]]\n"
#endif
"-audiodev wav,id=id[,prop[=value][,...]]\n"
" path= path of wav file to record\n",
``-device pci-ipmi-bt,bmc=id``
Like the KCS interface, but defines a BT interface on the PCI bus.
+
+``-device intel-iommu[,option=...]``
+ This is only supported by ``-machine q35``, which will enable Intel VT-d
+ emulation within the guest. It supports below options:
+
+ ``intremap=on|off`` (default: auto)
+ This enables interrupt remapping feature. It's required to enable
+ complete x2apic. Currently it only supports kvm kernel-irqchip modes
+ ``off`` or ``split``, while full kernel-irqchip is not yet supported.
+ The default value is "auto", which will be decided by the mode of
+ kernel-irqchip.
+
+ ``caching-mode=on|off`` (default: off)
+ This enables caching mode for the VT-d emulated device. When
+ caching-mode is enabled, each guest DMA buffer mapping will generate an
+ IOTLB invalidation from the guest IOMMU driver to the vIOMMU device in
+ a synchronous way. It is required for ``-device vfio-pci`` to work
+ with the VT-d device, because host assigned devices requires to setup
+ the DMA mapping on the host before guest DMA starts.
+
+ ``device-iotlb=on|off`` (default: off)
+ This enables device-iotlb capability for the emulated VT-d device. So
+ far virtio/vhost should be the only real user for this parameter,
+ paired with ats=on configured for the device.
+
+ ``aw-bits=39|48`` (default: 39)
+ This decides the address width of IOVA address space. The address
+ space has 39 bits width for 3-level IOMMU page tables, and 48 bits for
+ 4-level IOMMU page tables.
+
+ Please also refer to the wiki page for general scenarios of VT-d
+ emulation in QEMU: https://wiki.qemu.org/Features/VT-d.
+
ERST
DEF("name", HAS_ARG, QEMU_OPTION_name,
the bus number and the unit id.
``index=index``
- This option defines where is connected the drive by using an
+ This option defines where the drive is connected by using an
index in the list of available connectors of a given interface
type.
#endif
#if defined(CONFIG_SDL)
"-display sdl[,alt_grab=on|off][,ctrl_grab=on|off][,gl=on|core|es|off]\n"
- " [,show-cursor=on|off][,window-close=on|off]\n"
+ " [,grab-mod=<mod>][,show-cursor=on|off][,window-close=on|off]\n"
#endif
#if defined(CONFIG_GTK)
"-display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off]\n"
#if defined(CONFIG_CURSES)
"-display curses[,charset=<encoding>]\n"
#endif
+#if defined(CONFIG_COCOA)
+ "-display cocoa[,full-grab=on|off][,swap-opt-cmd=on|off]\n"
+#endif
#if defined(CONFIG_OPENGL)
"-display egl-headless[,rendernode=<file>]\n"
+#endif
+#if defined(CONFIG_DBUS_DISPLAY)
+ "-display dbus[,addr=<dbusaddr>]\n"
+ " [,gl=on|core|es|off][,rendernode=<file>]\n"
+#endif
+#if defined(CONFIG_COCOA)
+ "-display cocoa[,show-cursor=on|off][,left-command-key=on|off]\n"
#endif
"-display none\n"
" select display backend type\n"
application. The Spice server will redirect the serial consoles
and QEMU monitors. (Since 4.0)
+ ``dbus``
+ Export the display over D-Bus interfaces. (Since 7.0)
+
+ The connection is registered with the "org.qemu" name (and queued when
+ already owned).
+
+ ``addr=<dbusaddr>`` : D-Bus bus address to connect to.
+
+ ``p2p=yes|no`` : Use peer-to-peer connection, accepted via QMP ``add_client``.
+
+ ``gl=on|off|core|es`` : Use OpenGL for rendering (the D-Bus interface
+ will share framebuffers with DMABUF file descriptors).
+
``sdl``
Display video output via SDL (usually in a separate graphics
window; see the SDL documentation for other possibilities).
Valid parameters are:
- ``alt_grab=on|off`` : Use Control+Alt+Shift-g to toggle mouse grabbing
+ ``grab-mod=<mods>`` : Used to select the modifier keys for toggling
+ the mouse grabbing in conjunction with the "g" key. ``<mods>`` can be
+ either ``lshift-lctrl-lalt`` or ``rctrl``.
+
+ ``alt_grab=on|off`` : Use Control+Alt+Shift-g to toggle mouse grabbing.
+ This parameter is deprecated - use ``grab-mod`` instead.
- ``ctrl_grab=on|off`` : Use Right-Control-g to toggle mouse grabbing
+ ``ctrl_grab=on|off`` : Use Right-Control-g to toggle mouse grabbing.
+ This parameter is deprecated - use ``grab-mod`` instead.
``gl=on|off|core|es`` : Use OpenGL for displaying
``charset=CP850`` for IBM CP850 encoding. The default is
``CP437``.
+ ``cocoa``
+ Display video output in a Cocoa window. Mac only. This interface
+ provides drop-down menus and other UI elements to configure and
+ control the VM during runtime. Valid parameters are:
+
+ ``show-cursor=on|off`` : Force showing the mouse cursor
+
+ ``left-command-key=on|off`` : Disable forwarding left command key to host
+
``egl-headless[,rendernode=<file>]``
Offload all OpenGL operations to a local DRI device. For any
graphical display, this display needs to be paired with either
``-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).
+ switching, etc). This option is deprecated - please use
+ ``-display sdl,grab-mod=lshift-lctrl-lalt`` instead.
ERST
DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab,
``-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).
-ERST
-
-DEF("no-quit", 0, QEMU_OPTION_no_quit,
- "-no-quit disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL)
-SRST
-``-no-quit``
- Disable window close capability (SDL and GTK only). This option is
- deprecated, please use ``-display ...,window-close=off`` instead.
+ switching, etc). This option is deprecated - please use
+ ``-display sdl,grab-mod=rctrl`` instead.
ERST
DEF("sdl", 0, QEMU_OPTION_sdl,
" specify SMBIOS type 3 fields\n"
"-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n"
" [,asset=str][,part=str][,max-speed=%d][,current-speed=%d]\n"
+ " [,processor-id=%d]\n"
" specify SMBIOS type 4 fields\n"
"-smbios type=11[,value=str][,path=filename]\n"
" specify SMBIOS type 11 fields\n"
``-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]``
+``-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str][,asset=str][,part=str][,processor-id=%d]``
Specify SMBIOS type 4 fields
``-smbios type=11[,value=str][,path=filename]``
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=on|off][,ipv6=on|off][,nodelay=on|off][,reconnect=seconds]\n"
+ "-chardev socket,id=id[,host=host],port=port[,to=to][,ipv4=on|off][,ipv6=on|off][,nodelay=on|off]\n"
" [,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds][,mux=on|off]\n"
" [,logfile=PATH][,logappend=on|off][,tls-creds=ID][,tls-authz=ID] (tcp)\n"
"-chardev socket,id=id,path=path[,server=on|off][,wait=on|off][,telnet=on|off][,websocket=on|off][,reconnect=seconds]\n"
DEF("compat", HAS_ARG, QEMU_OPTION_compat,
"-compat [deprecated-input=accept|reject|crash][,deprecated-output=accept|hide]\n"
- " Policy for handling deprecated management interfaces\n",
+ " Policy for handling deprecated management interfaces\n"
+ "-compat [unstable-input=accept|reject|crash][,unstable-output=accept|hide]\n"
+ " Policy for handling unstable management interfaces\n",
QEMU_ARCH_ALL)
SRST
``-compat [deprecated-input=@var{input-policy}][,deprecated-output=@var{output-policy}]``
Suppress deprecated command results and events
Limitation: covers only syntactic aspects of QMP.
+
+``-compat [unstable-input=@var{input-policy}][,unstable-output=@var{output-policy}]``
+ Set policy for handling unstable management interfaces (experimental):
+
+ ``unstable-input=accept`` (default)
+ Accept unstable commands and arguments
+ ``unstable-input=reject``
+ Reject unstable commands and arguments
+ ``unstable-input=crash``
+ Crash on unstable commands and arguments
+ ``unstable-output=accept`` (default)
+ Emit unstable command results and events
+ ``unstable-output=hide``
+ Suppress unstable command results and events
+
+ Limitation: covers only syntactic aspects of QMP.
ERST
DEF("fw_cfg", HAS_ARG, QEMU_OPTION_fwcfg,
ERST
DEF("plugin", HAS_ARG, QEMU_OPTION_plugin,
- "-plugin [file=]<file>[,arg=<string>]\n"
+ "-plugin [file=]<file>[,<argname>=<argvalue>]\n"
" load a plugin\n",
QEMU_ARCH_ALL)
SRST
-``-plugin file=file[,arg=string]``
+``-plugin file=file[,argname=argvalue]``
Load a plugin.
``file=file``
Load the given plugin from a shared library file.
- ``arg=string``
- Argument string passed to the plugin. (Can be given multiple
- times.)
+ ``argname=argvalue``
+ Argument passed to the plugin. (Can be given multiple times.)
ERST
HXCOMM Internal use
-object secret,id=sec0,keyid=secmaster0,format=base64,\\
data=$SECRET,iv=$(<iv.b64)
- ``-object sev-guest,id=id,cbitpos=cbitpos,reduced-phys-bits=val,[sev-device=string,policy=policy,handle=handle,dh-cert-file=file,session-file=file]``
+ ``-object sev-guest,id=id,cbitpos=cbitpos,reduced-phys-bits=val,[sev-device=string,policy=policy,handle=handle,dh-cert-file=file,session-file=file,kernel-hashes=on|off]``
Create a Secure Encrypted Virtualization (SEV) guest object,
which can be used to provide the guest memory encryption support
on AMD processors.
session with the guest owner to negotiate keys used for
attestation. The file must be encoded in base64.
+ The ``kernel-hashes`` adds the hashes of given kernel/initrd/
+ cmdline to a designated guest firmware page for measured Linux
+ boot with -kernel. The default is off. (Since 6.2)
+
e.g to launch a SEV guest
.. parsed-literal::
CN=laptop.example.com,O=Example Home,L=London,ST=London,C=GB
- ``-object iothread,id=id,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink``
+ ``-object iothread,id=id,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink,aio-max-batch=aio-max-batch``
Creates a dedicated event loop thread that devices can be
assigned to. This is known as an IOThread. By default device
emulation happens in vCPU threads or the main event loop thread.
the polling time when the algorithm detects it is spending too
long polling without encountering events.
- The polling parameters can be modified at run-time using the
+ The ``aio-max-batch`` parameter is the maximum number of requests
+ in a batch for the AIO engine, 0 means that the engine will use
+ its default.
+
+ The IOThread parameters can be modified at run-time using the
``qom-set`` command (where ``iothread1`` is the IOThread's
``id``):