2021-10-07 16:08:29 +03:00
|
|
|
# These options do not correspond to a --enable/--disable-* option
|
|
|
|
# on the configure script command line. If you add more, list them in
|
|
|
|
# scripts/meson-buildoptions.py's SKIP_OPTIONS constant too.
|
|
|
|
|
2020-08-26 14:04:16 +03:00
|
|
|
option('qemu_suffix', type : 'string', value: 'qemu',
|
2020-08-26 14:04:15 +03:00
|
|
|
description: 'Suffix for QEMU data/modules/config directories (can be empty)')
|
2022-04-20 18:33:57 +03:00
|
|
|
option('docdir', type : 'string', value : 'share/doc',
|
2020-08-26 14:04:17 +03:00
|
|
|
description: 'Base directory for documentation installation (can be empty)')
|
2022-06-24 18:40:42 +03:00
|
|
|
option('qemu_firmwarepath', type : 'array', value : ['share/qemu-firmware'],
|
2020-10-16 10:19:14 +03:00
|
|
|
description: 'search PATH for firmware files')
|
2022-04-20 18:33:54 +03:00
|
|
|
option('pkgversion', type : 'string', value : '',
|
|
|
|
description: 'use specified string as sub-version of the package')
|
2021-10-13 14:43:36 +03:00
|
|
|
option('smbd', type : 'string', value : '',
|
|
|
|
description: 'Path to smbd for slirp networking')
|
2021-10-13 14:19:00 +03:00
|
|
|
option('iasl', type : 'string', value : '',
|
|
|
|
description: 'Path to ACPI disassembler')
|
2022-04-20 18:33:52 +03:00
|
|
|
option('tls_priority', type : 'string', value : 'NORMAL',
|
|
|
|
description: 'Default TLS protocol/cipher priority string')
|
2020-11-20 10:38:22 +03:00
|
|
|
option('default_devices', type : 'boolean', value : true,
|
|
|
|
description: 'Include a default selection of devices in emulators')
|
2021-10-07 16:06:09 +03:00
|
|
|
option('audio_drv_list', type: 'array', value: ['default'],
|
2023-04-17 13:56:54 +03:00
|
|
|
choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'pipewire', 'sdl', 'sndio'],
|
2021-10-07 16:06:09 +03:00
|
|
|
description: 'Set audio driver list')
|
2022-04-20 18:33:53 +03:00
|
|
|
option('block_drv_rw_whitelist', type : 'string', value : '',
|
|
|
|
description: 'set block driver read-write whitelist (by default affects only QEMU, not tools like qemu-img)')
|
|
|
|
option('block_drv_ro_whitelist', type : 'string', value : '',
|
|
|
|
description: 'set block driver read-only whitelist (by default affects only QEMU, not tools like qemu-img)')
|
2022-04-20 18:33:55 +03:00
|
|
|
option('interp_prefix', type : 'string', value : '/usr/gnemul/qemu-%M',
|
|
|
|
description: 'where to find shared libraries etc., use %M for cpu name')
|
2021-10-07 16:08:12 +03:00
|
|
|
option('fuzzing_engine', type : 'string', value : '',
|
|
|
|
description: 'fuzzing engine library for OSS-Fuzz')
|
2021-10-07 16:08:14 +03:00
|
|
|
option('trace_file', type: 'string', value: 'trace',
|
|
|
|
description: 'Trace file prefix for simple backend')
|
2022-10-12 14:19:35 +03:00
|
|
|
option('coroutine_backend', type: 'combo',
|
|
|
|
choices: ['ucontext', 'sigaltstack', 'windows', 'auto'],
|
|
|
|
value: 'auto', description: 'coroutine backend to use')
|
2021-10-07 16:06:09 +03:00
|
|
|
|
2021-10-07 16:08:29 +03:00
|
|
|
# Everything else can be set via --enable/--disable-* option
|
|
|
|
# on the configure script command line. After adding an option
|
|
|
|
# here make sure to run "make update-buildoptions".
|
|
|
|
|
2020-10-16 01:06:25 +03:00
|
|
|
option('docs', type : 'feature', value : 'auto',
|
|
|
|
description: 'Documentations build support')
|
2021-10-07 16:08:12 +03:00
|
|
|
option('fuzzing', type : 'boolean', value: false,
|
|
|
|
description: 'build fuzzing targets')
|
2020-12-10 22:04:12 +03:00
|
|
|
option('gettext', type : 'feature', value : 'auto',
|
2020-09-01 08:59:23 +03:00
|
|
|
description: 'Localization of the GTK+ user interface')
|
2022-10-20 15:53:10 +03:00
|
|
|
option('modules', type : 'feature', value : 'disabled',
|
|
|
|
description: 'modules support (non Windows)')
|
2022-04-20 18:33:46 +03:00
|
|
|
option('module_upgrades', type : 'boolean', value : false,
|
|
|
|
description: 'try to load modules from alternate paths for upgrades')
|
2020-10-16 10:32:52 +03:00
|
|
|
option('install_blobs', type : 'boolean', value : true,
|
|
|
|
description: 'install provided firmware blobs')
|
2020-09-01 14:51:16 +03:00
|
|
|
option('sparse', type : 'feature', value : 'auto',
|
|
|
|
description: 'sparse checker')
|
2021-10-15 17:47:43 +03:00
|
|
|
option('guest_agent', type : 'feature', value : 'auto',
|
|
|
|
description: 'Build QEMU Guest Agent')
|
2021-01-21 13:49:04 +03:00
|
|
|
option('guest_agent_msi', type : 'feature', value : 'auto',
|
|
|
|
description: 'Build MSI package for the QEMU Guest Agent')
|
2021-10-15 17:47:43 +03:00
|
|
|
option('tools', type : 'feature', value : 'auto',
|
|
|
|
description: 'build support utilities that come with QEMU')
|
2022-02-01 15:53:43 +03:00
|
|
|
option('qga_vss', type : 'feature', value: 'auto',
|
|
|
|
description: 'build QGA VSS support (broken with MinGW)')
|
2020-09-01 08:59:23 +03:00
|
|
|
|
2020-09-01 18:15:30 +03:00
|
|
|
option('malloc_trim', type : 'feature', value : 'auto',
|
|
|
|
description: 'enable libc malloc_trim() for memory optimization')
|
|
|
|
option('malloc', type : 'combo', choices : ['system', 'tcmalloc', 'jemalloc'],
|
|
|
|
value: 'system', description: 'choose memory allocator to use')
|
|
|
|
|
2020-09-18 11:57:25 +03:00
|
|
|
option('kvm', type: 'feature', value: 'auto',
|
|
|
|
description: 'KVM acceleration support')
|
|
|
|
option('whpx', type: 'feature', value: 'auto',
|
|
|
|
description: 'WHPX acceleration support')
|
|
|
|
option('hvf', type: 'feature', value: 'auto',
|
|
|
|
description: 'HVF acceleration support')
|
2021-04-02 23:25:32 +03:00
|
|
|
option('nvmm', type: 'feature', value: 'auto',
|
|
|
|
description: 'NVMM acceleration support')
|
2020-09-18 11:57:25 +03:00
|
|
|
option('xen', type: 'feature', value: 'auto',
|
|
|
|
description: 'Xen backend support')
|
|
|
|
option('xen_pci_passthrough', type: 'feature', value: 'auto',
|
|
|
|
description: 'Xen PCI passthrough support')
|
2022-04-20 18:33:59 +03:00
|
|
|
option('tcg', type: 'feature', value: 'enabled',
|
2020-09-18 11:57:25 +03:00
|
|
|
description: 'TCG support')
|
2023-08-30 13:20:53 +03:00
|
|
|
option('plugins', type: 'boolean', value: false,
|
|
|
|
description: 'TCG plugins via shared library loading')
|
2023-08-28 12:48:30 +03:00
|
|
|
option('debug_tcg', type: 'boolean', value: false,
|
|
|
|
description: 'TCG debugging')
|
2024-03-12 03:23:30 +03:00
|
|
|
option('debug_remap', type: 'boolean', value: false,
|
|
|
|
description: 'syscall buffer debugging support')
|
2020-12-14 14:01:45 +03:00
|
|
|
option('tcg_interpreter', type: 'boolean', value: false,
|
2021-11-06 14:14:57 +03:00
|
|
|
description: 'TCG with bytecode interpreter (slow)')
|
2022-10-12 12:59:51 +03:00
|
|
|
option('safe_stack', type: 'boolean', value: false,
|
|
|
|
description: 'SafeStack Stack Smash Protection (requires clang/llvm and coroutine backend ucontext)')
|
2024-08-13 12:52:15 +03:00
|
|
|
option('asan', type: 'boolean', value: false,
|
|
|
|
description: 'enable address sanitizer')
|
|
|
|
option('ubsan', type: 'boolean', value: false,
|
|
|
|
description: 'enable undefined behaviour sanitizer')
|
2023-01-09 17:31:51 +03:00
|
|
|
option('tsan', type: 'boolean', value: false,
|
|
|
|
description: 'enable thread sanitizer')
|
2022-10-12 13:46:23 +03:00
|
|
|
option('stack_protector', type: 'feature', value: 'auto',
|
|
|
|
description: 'compiler-provided stack protection')
|
2022-08-17 17:37:23 +03:00
|
|
|
option('cfi', type: 'boolean', value: false,
|
2020-12-05 02:06:14 +03:00
|
|
|
description: 'Control-Flow Integrity (CFI)')
|
2022-08-17 17:37:23 +03:00
|
|
|
option('cfi_debug', type: 'boolean', value: false,
|
2020-12-05 02:06:14 +03:00
|
|
|
description: 'Verbose errors in case of CFI violation')
|
2021-02-17 18:24:25 +03:00
|
|
|
option('multiprocess', type: 'feature', value: 'auto',
|
|
|
|
description: 'Out of process device emulation support')
|
2023-12-13 13:30:09 +03:00
|
|
|
option('relocatable', type : 'boolean', value : true,
|
meson, cutils: allow non-relocatable installs
Say QEMU is configured with bindir = "/usr/bin" and a firmware path
that starts with "/usr/share/qemu". Ever since QEMU 5.2, QEMU's
install has been relocatable: if you move qemu-system-x86_64 from
/usr/bin to /home/username/bin, it will start looking for firmware in
/home/username/share/qemu. Previously, you would get a non-relocatable
install where the moved QEMU will keep looking for firmware in
/usr/share/qemu.
Windows almost always wants relocatable installs, and in fact that
is why QEMU 5.2 introduced relocatability in the first place.
However, newfangled distribution mechanisms such as AppImage
(https://docs.appimage.org/reference/best-practices.html), and
possibly NixOS, also dislike using at runtime the absolute paths
that were established at build time.
On POSIX systems you almost never care; if you do, your usecase
dictates which one is desirable, so there's no single answer.
Obviously relocatability works fine most of the time, because not many
people have complained about QEMU's switch to relocatable install,
and that's why until now there was no way to disable relocatability.
But a non-relocatable, non-modular binary can help if you want to do
experiments with old firmware and new QEMU or vice versa (because you
can just upgrade/downgrade the firmware package, and use rpm2cpio or
similar to extract the QEMU binaries outside /usr), so allow both.
This patch allows one to build a non-relocatable install using a new
option to configure. Why? Because it's not too hard, and because
it helps the user double check the relocatability of their install.
Note that the same code that handles relocation also lets you run QEMU
from the build tree and pick e.g. firmware files from the source tree
transparently. Therefore that part remains active with this patch,
even if you configure with --disable-relocatable.
Suggested-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-10-05 15:19:34 +03:00
|
|
|
description: 'toggle relocatable install')
|
2022-06-13 23:26:24 +03:00
|
|
|
option('vfio_user_server', type: 'feature', value: 'disabled',
|
|
|
|
description: 'vfio-user server support')
|
2021-07-15 10:53:53 +03:00
|
|
|
option('dbus_display', type: 'feature', value: 'auto',
|
|
|
|
description: '-display dbus support')
|
2021-12-21 14:38:27 +03:00
|
|
|
option('tpm', type : 'feature', value : 'auto',
|
|
|
|
description: 'TPM support')
|
2021-11-08 15:52:11 +03:00
|
|
|
|
|
|
|
# Do not enable it by default even for Mingw32, because it doesn't
|
|
|
|
# work on Wine.
|
|
|
|
option('membarrier', type: 'feature', value: 'disabled',
|
|
|
|
description: 'membarrier system call (for Linux 4.14+ or Windows')
|
|
|
|
|
2021-11-08 15:38:58 +03:00
|
|
|
option('avx2', type: 'feature', value: 'auto',
|
|
|
|
description: 'AVX2 optimizations')
|
2022-11-16 18:29:22 +03:00
|
|
|
option('avx512bw', type: 'feature', value: 'auto',
|
|
|
|
description: 'AVX512BW optimizations')
|
2022-04-20 18:33:42 +03:00
|
|
|
option('keyring', type: 'feature', value: 'auto',
|
|
|
|
description: 'Linux keyring support')
|
2023-08-24 12:42:08 +03:00
|
|
|
option('libkeyutils', type: 'feature', value: 'auto',
|
|
|
|
description: 'Linux keyutils support')
|
2020-09-18 11:57:25 +03:00
|
|
|
|
net: add initial support for AF_XDP network backend
AF_XDP is a network socket family that allows communication directly
with the network device driver in the kernel, bypassing most or all
of the kernel networking stack. In the essence, the technology is
pretty similar to netmap. But, unlike netmap, AF_XDP is Linux-native
and works with any network interfaces without driver modifications.
Unlike vhost-based backends (kernel, user, vdpa), AF_XDP doesn't
require access to character devices or unix sockets. Only access to
the network interface itself is necessary.
This patch implements a network backend that communicates with the
kernel by creating an AF_XDP socket. A chunk of userspace memory
is shared between QEMU and the host kernel. 4 ring buffers (Tx, Rx,
Fill and Completion) are placed in that memory along with a pool of
memory buffers for the packet data. Data transmission is done by
allocating one of the buffers, copying packet data into it and
placing the pointer into Tx ring. After transmission, device will
return the buffer via Completion ring. On Rx, device will take
a buffer form a pre-populated Fill ring, write the packet data into
it and place the buffer into Rx ring.
AF_XDP network backend takes on the communication with the host
kernel and the network interface and forwards packets to/from the
peer device in QEMU.
Usage example:
-device virtio-net-pci,netdev=guest1,mac=00:16:35:AF:AA:5C
-netdev af-xdp,ifname=ens6f1np1,id=guest1,mode=native,queues=1
XDP program bridges the socket with a network interface. It can be
attached to the interface in 2 different modes:
1. skb - this mode should work for any interface and doesn't require
driver support. With a caveat of lower performance.
2. native - this does require support from the driver and allows to
bypass skb allocation in the kernel and potentially use
zero-copy while getting packets in/out userspace.
By default, QEMU will try to use native mode and fall back to skb.
Mode can be forced via 'mode' option. To force 'copy' even in native
mode, use 'force-copy=on' option. This might be useful if there is
some issue with the driver.
Option 'queues=N' allows to specify how many device queues should
be open. Note that all the queues that are not open are still
functional and can receive traffic, but it will not be delivered to
QEMU. So, the number of device queues should generally match the
QEMU configuration, unless the device is shared with something
else and the traffic re-direction to appropriate queues is correctly
configured on a device level (e.g. with ethtool -N).
'start-queue=M' option can be used to specify from which queue id
QEMU should start configuring 'N' queues. It might also be necessary
to use this option with certain NICs, e.g. MLX5 NICs. See the docs
for examples.
In a general case QEMU will need CAP_NET_ADMIN and CAP_SYS_ADMIN
or CAP_BPF capabilities in order to load default XSK/XDP programs to
the network interface and configure BPF maps. It is possible, however,
to run with no capabilities. For that to work, an external process
with enough capabilities will need to pre-load default XSK program,
create AF_XDP sockets and pass their file descriptors to QEMU process
on startup via 'sock-fds' option. Network backend will need to be
configured with 'inhibit=on' to avoid loading of the program.
QEMU will need 32 MB of locked memory (RLIMIT_MEMLOCK) per queue
or CAP_IPC_LOCK.
There are few performance challenges with the current network backends.
First is that they do not support IO threads. This means that data
path is handled by the main thread in QEMU and may slow down other
work or may be slowed down by some other work. This also means that
taking advantage of multi-queue is generally not possible today.
Another thing is that data path is going through the device emulation
code, which is not really optimized for performance. The fastest
"frontend" device is virtio-net. But it's not optimized for heavy
traffic either, because it expects such use-cases to be handled via
some implementation of vhost (user, kernel, vdpa). In practice, we
have virtio notifications and rcu lock/unlock on a per-packet basis
and not very efficient accesses to the guest memory. Communication
channels between backend and frontend devices do not allow passing
more than one packet at a time as well.
Some of these challenges can be avoided in the future by adding better
batching into device emulation or by implementing vhost-af-xdp variant.
There are also a few kernel limitations. AF_XDP sockets do not
support any kinds of checksum or segmentation offloading. Buffers
are limited to a page size (4K), i.e. MTU is limited. Multi-buffer
support implementation for AF_XDP is in progress, but not ready yet.
Also, transmission in all non-zero-copy modes is synchronous, i.e.
done in a syscall. That doesn't allow high packet rates on virtual
interfaces.
However, keeping in mind all of these challenges, current implementation
of the AF_XDP backend shows a decent performance while running on top
of a physical NIC with zero-copy support.
Test setup:
2 VMs running on 2 physical hosts connected via ConnectX6-Dx card.
Network backend is configured to open the NIC directly in native mode.
The driver supports zero-copy. NIC is configured to use 1 queue.
Inside a VM - iperf3 for basic TCP performance testing and dpdk-testpmd
for PPS testing.
iperf3 result:
TCP stream : 19.1 Gbps
dpdk-testpmd (single queue, single CPU core, 64 B packets) results:
Tx only : 3.4 Mpps
Rx only : 2.0 Mpps
L2 FWD Loopback : 1.5 Mpps
In skb mode the same setup shows much lower performance, similar to
the setup where pair of physical NICs is replaced with veth pair:
iperf3 result:
TCP stream : 9 Gbps
dpdk-testpmd (single queue, single CPU core, 64 B packets) results:
Tx only : 1.2 Mpps
Rx only : 1.0 Mpps
L2 FWD Loopback : 0.7 Mpps
Results in skb mode or over the veth are close to results of a tap
backend with vhost=on and disabled segmentation offloading bridged
with a NIC.
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> (docker/lcitool)
Signed-off-by: Jason Wang <jasowang@redhat.com>
2023-09-13 21:34:37 +03:00
|
|
|
option('af_xdp', type : 'feature', value : 'auto',
|
|
|
|
description: 'AF_XDP network backend support')
|
2020-11-17 16:45:24 +03:00
|
|
|
option('attr', type : 'feature', value : 'auto',
|
|
|
|
description: 'attr/xattr support')
|
2021-06-03 12:15:26 +03:00
|
|
|
option('auth_pam', type : 'feature', value : 'auto',
|
|
|
|
description: 'PAM access control')
|
2020-11-17 15:02:17 +03:00
|
|
|
option('brlapi', type : 'feature', value : 'auto',
|
|
|
|
description: 'brlapi character device driver')
|
2020-11-17 15:07:52 +03:00
|
|
|
option('bzip2', type : 'feature', value : 'auto',
|
|
|
|
description: 'bzip2 support for DMG images')
|
2020-11-17 16:46:58 +03:00
|
|
|
option('cap_ng', type : 'feature', value : 'auto',
|
|
|
|
description: 'cap_ng support')
|
blkio: add libblkio block driver
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for
high-performance disk I/O. It currently supports io_uring,
virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers
under development.
One of the reasons for developing libblkio is that other applications
besides QEMU can use it. This will be particularly useful for
virtio-blk-vhost-user which applications may wish to use for connecting
to qemu-storage-daemon.
libblkio also gives us an opportunity to develop in Rust behind a C API
that is easy to consume from QEMU.
This commit adds io_uring, nvme-io_uring, virtio-blk-vhost-user, and
virtio-blk-vhost-vdpa BlockDrivers to QEMU using libblkio. It will be
easy to add other libblkio drivers since they will share the majority of
code.
For now I/O buffers are copied through bounce buffers if the libblkio
driver requires it. Later commits add an optimization for
pre-registering guest RAM to avoid bounce buffers.
The syntax is:
--blockdev io_uring,node-name=drive0,filename=test.img,readonly=on|off,cache.direct=on|off
--blockdev nvme-io_uring,node-name=drive0,filename=/dev/ng0n1,readonly=on|off,cache.direct=on
--blockdev virtio-blk-vhost-vdpa,node-name=drive0,path=/dev/vdpa...,readonly=on|off,cache.direct=on
--blockdev virtio-blk-vhost-user,node-name=drive0,path=vhost-user-blk.sock,readonly=on|off,cache.direct=on
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20221013185908.1297568-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-10-13 21:58:57 +03:00
|
|
|
option('blkio', type : 'feature', value : 'auto',
|
|
|
|
description: 'libblkio block device driver')
|
2021-05-14 14:48:32 +03:00
|
|
|
option('bpf', type : 'feature', value : 'auto',
|
|
|
|
description: 'eBPF support')
|
2020-09-01 18:28:59 +03:00
|
|
|
option('cocoa', type : 'feature', value : 'auto',
|
|
|
|
description: 'Cocoa user interface (macOS only)')
|
2020-11-17 14:43:15 +03:00
|
|
|
option('curl', type : 'feature', value : 'auto',
|
|
|
|
description: 'CURL block device driver')
|
2022-04-20 18:33:44 +03:00
|
|
|
option('gio', type : 'feature', value : 'auto',
|
|
|
|
description: 'use libgio for D-Bus support')
|
2020-11-17 15:01:26 +03:00
|
|
|
option('glusterfs', type : 'feature', value : 'auto',
|
|
|
|
description: 'Glusterfs block device driver')
|
Add Hyper-V Dynamic Memory Protocol driver (hv-balloon) base
This driver is like virtio-balloon on steroids: it allows both changing the
guest memory allocation via ballooning and (in the next patch) inserting
pieces of extra RAM into it on demand from a provided memory backend.
The actual resizing is done via ballooning interface (for example, via
the "balloon" HMP command).
This includes resizing the guest past its boot size - that is, hot-adding
additional memory in granularity limited only by the guest alignment
requirements, as provided by the next patch.
In contrast with ACPI DIMM hotplug where one can only request to unplug a
whole DIMM stick this driver allows removing memory from guest in single
page (4k) units via ballooning.
After a VM reboot the guest is back to its original (boot) size.
In the future, the guest boot memory size might be changed on reboot
instead, taking into account the effective size that VM had before that
reboot (much like Hyper-V does).
For performance reasons, the guest-released memory is tracked in a few
range trees, as a series of (start, count) ranges.
Each time a new page range is inserted into such tree its neighbors are
checked as candidates for possible merging with it.
Besides performance reasons, the Dynamic Memory protocol itself uses page
ranges as the data structure in its messages, so relevant pages need to be
merged into such ranges anyway.
One has to be careful when tracking the guest-released pages, since the
guest can maliciously report returning pages outside its current address
space, which later clash with the address range of newly added memory.
Similarly, the guest can report freeing the same page twice.
The above design results in much better ballooning performance than when
using virtio-balloon with the same guest: 230 GB / minute with this driver
versus 70 GB / minute with virtio-balloon.
During a ballooning operation most of time is spent waiting for the guest
to come up with newly freed page ranges, processing the received ranges on
the host side (in QEMU and KVM) is nearly instantaneous.
The unballoon operation is also pretty much instantaneous:
thanks to the merging of the ballooned out page ranges 200 GB of memory can
be returned to the guest in about 1 second.
With virtio-balloon this operation takes about 2.5 minutes.
These tests were done against a Windows Server 2019 guest running on a
Xeon E5-2699, after dirtying the whole memory inside guest before each
balloon operation.
Using a range tree instead of a bitmap to track the removed memory also
means that the solution scales well with the guest size: even a 1 TB range
takes just a few bytes of such metadata.
Since the required GTree operations aren't present in every Glib version
a check for them was added to the meson build script, together with new
"--enable-hv-balloon" and "--disable-hv-balloon" configure arguments.
If these GTree operations are missing in the system's Glib version this
driver will be skipped during QEMU build.
An optional "status-report=on" device parameter requests memory status
events from the guest (typically sent every second), which allow the host
to learn both the guest memory available and the guest memory in use
counts.
Following commits will add support for their external emission as
"HV_BALLOON_STATUS_REPORT" QMP events.
The driver is named hv-balloon since the Linux kernel client driver for
the Dynamic Memory Protocol is named as such and to follow the naming
pattern established by the virtio-balloon driver.
The whole protocol runs over Hyper-V VMBus.
The driver was tested against Windows Server 2012 R2, Windows Server 2016
and Windows Server 2019 guests and obeys the guest alignment requirements
reported to the host via DM_CAPABILITIES_REPORT message.
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
2023-06-12 17:00:54 +03:00
|
|
|
option('hv_balloon', type : 'feature', value : 'auto',
|
|
|
|
description: 'hv-balloon driver (requires Glib 2.68+ GTree API)')
|
2023-02-10 03:52:07 +03:00
|
|
|
option('libdw', type : 'feature', value : 'auto',
|
|
|
|
description: 'debuginfo support')
|
2020-11-17 15:11:25 +03:00
|
|
|
option('libiscsi', type : 'feature', value : 'auto',
|
|
|
|
description: 'libiscsi userspace initiator')
|
2020-11-17 15:11:25 +03:00
|
|
|
option('libnfs', type : 'feature', value : 'auto',
|
|
|
|
description: 'libnfs block device driver')
|
2020-09-16 19:07:29 +03:00
|
|
|
option('mpath', type : 'feature', value : 'auto',
|
|
|
|
description: 'Multipath persistent reservation passthrough')
|
2021-12-21 14:38:27 +03:00
|
|
|
option('numa', type : 'feature', value : 'auto',
|
|
|
|
description: 'libnuma support')
|
2020-10-13 02:43:48 +03:00
|
|
|
option('iconv', type : 'feature', value : 'auto',
|
|
|
|
description: 'Font glyph conversion support')
|
|
|
|
option('curses', type : 'feature', value : 'auto',
|
|
|
|
description: 'curses UI')
|
2024-10-09 00:17:23 +03:00
|
|
|
option('libcbor', type : 'feature', value : 'auto',
|
|
|
|
description: 'libcbor support')
|
2021-06-03 12:15:26 +03:00
|
|
|
option('gnutls', type : 'feature', value : 'auto',
|
|
|
|
description: 'GNUTLS cryptography support')
|
|
|
|
option('nettle', type : 'feature', value : 'auto',
|
|
|
|
description: 'nettle cryptography support')
|
|
|
|
option('gcrypt', type : 'feature', value : 'auto',
|
|
|
|
description: 'libgcrypt cryptography support')
|
2021-11-08 16:02:42 +03:00
|
|
|
option('crypto_afalg', type : 'feature', value : 'disabled',
|
|
|
|
description: 'Linux AF_ALG crypto backend driver')
|
2021-06-03 12:31:35 +03:00
|
|
|
option('libdaxctl', type : 'feature', value : 'auto',
|
|
|
|
description: 'libdaxctl support')
|
2021-06-03 12:31:35 +03:00
|
|
|
option('libpmem', type : 'feature', value : 'auto',
|
|
|
|
description: 'libpmem support')
|
2021-12-09 17:48:01 +03:00
|
|
|
option('libssh', type : 'feature', value : 'auto',
|
|
|
|
description: 'ssh block device support')
|
2020-10-15 13:09:27 +03:00
|
|
|
option('libudev', type : 'feature', value : 'auto',
|
|
|
|
description: 'Use libudev to enumerate host devices')
|
2021-06-03 12:15:26 +03:00
|
|
|
option('libusb', type : 'feature', value : 'auto',
|
|
|
|
description: 'libusb support for USB passthrough')
|
2021-10-07 16:08:20 +03:00
|
|
|
option('linux_aio', type : 'feature', value : 'auto',
|
|
|
|
description: 'Linux AIO support')
|
2021-06-03 12:31:35 +03:00
|
|
|
option('linux_io_uring', type : 'feature', value : 'auto',
|
|
|
|
description: 'Linux io_uring support')
|
2020-11-17 15:35:28 +03:00
|
|
|
option('lzfse', type : 'feature', value : 'auto',
|
|
|
|
description: 'lzfse support for DMG images')
|
2020-11-17 15:11:25 +03:00
|
|
|
option('lzo', type : 'feature', value : 'auto',
|
|
|
|
description: 'lzo compression support')
|
2020-11-17 15:11:25 +03:00
|
|
|
option('rbd', type : 'feature', value : 'auto',
|
|
|
|
description: 'Ceph block device driver')
|
2022-04-20 18:33:40 +03:00
|
|
|
option('opengl', type : 'feature', value : 'auto',
|
|
|
|
description: 'OpenGL support')
|
2022-04-20 18:33:41 +03:00
|
|
|
option('rdma', type : 'feature', value : 'auto',
|
|
|
|
description: 'Enable RDMA-based migration')
|
2021-01-07 16:02:29 +03:00
|
|
|
option('gtk', type : 'feature', value : 'auto',
|
|
|
|
description: 'GTK+ user interface')
|
2020-09-01 08:59:23 +03:00
|
|
|
option('sdl', type : 'feature', value : 'auto',
|
|
|
|
description: 'SDL user interface')
|
|
|
|
option('sdl_image', type : 'feature', value : 'auto',
|
|
|
|
description: 'SDL Image support for icons')
|
2020-11-17 16:22:24 +03:00
|
|
|
option('seccomp', type : 'feature', value : 'auto',
|
|
|
|
description: 'seccomp support')
|
2021-06-03 12:15:26 +03:00
|
|
|
option('smartcard', type : 'feature', value : 'auto',
|
|
|
|
description: 'CA smartcard emulation support')
|
2020-11-17 15:32:34 +03:00
|
|
|
option('snappy', type : 'feature', value : 'auto',
|
|
|
|
description: 'snappy compression support')
|
2021-10-07 16:08:23 +03:00
|
|
|
option('spice', type : 'feature', value : 'auto',
|
|
|
|
description: 'Spice server support')
|
|
|
|
option('spice_protocol', type : 'feature', value : 'auto',
|
|
|
|
description: 'Spice protocol support')
|
2020-09-01 08:59:23 +03:00
|
|
|
option('u2f', type : 'feature', value : 'auto',
|
|
|
|
description: 'U2F emulation support')
|
2022-05-19 15:38:57 +03:00
|
|
|
option('canokey', type : 'feature', value : 'auto',
|
|
|
|
description: 'CanoKey support')
|
2021-06-03 12:15:26 +03:00
|
|
|
option('usb_redir', type : 'feature', value : 'auto',
|
|
|
|
description: 'libusbredir support')
|
2021-10-28 21:59:08 +03:00
|
|
|
option('l2tpv3', type : 'feature', value : 'auto',
|
|
|
|
description: 'l2tpv3 network backend support')
|
2021-10-07 16:08:22 +03:00
|
|
|
option('netmap', type : 'feature', value : 'auto',
|
|
|
|
description: 'netmap network backend support')
|
2023-08-30 12:38:25 +03:00
|
|
|
option('pixman', type : 'feature', value : 'auto',
|
|
|
|
description: 'pixman support')
|
2022-04-08 19:20:47 +03:00
|
|
|
option('slirp', type: 'feature', value: 'auto',
|
|
|
|
description: 'libslirp user mode network backend support')
|
2021-10-07 16:08:21 +03:00
|
|
|
option('vde', type : 'feature', value : 'auto',
|
|
|
|
description: 'vde network backend support')
|
2022-03-17 20:28:33 +03:00
|
|
|
option('vmnet', type : 'feature', value : 'auto',
|
|
|
|
description: 'vmnet.framework network backend support')
|
2021-06-03 12:31:35 +03:00
|
|
|
option('virglrenderer', type : 'feature', value : 'auto',
|
|
|
|
description: 'virgl rendering support')
|
2023-03-21 19:47:36 +03:00
|
|
|
option('rutabaga_gfx', type : 'feature', value : 'auto',
|
|
|
|
description: 'rutabaga_gfx support')
|
2022-04-08 10:13:34 +03:00
|
|
|
option('png', type : 'feature', value : 'auto',
|
|
|
|
description: 'PNG support with libpng')
|
2021-09-03 11:13:55 +03:00
|
|
|
option('vnc', type : 'feature', value : 'auto',
|
2020-09-01 08:59:23 +03:00
|
|
|
description: 'VNC server')
|
|
|
|
option('vnc_jpeg', type : 'feature', value : 'auto',
|
|
|
|
description: 'JPEG lossy compression for VNC server')
|
|
|
|
option('vnc_sasl', type : 'feature', value : 'auto',
|
|
|
|
description: 'SASL authentication for VNC server')
|
2021-06-03 12:31:35 +03:00
|
|
|
option('vte', type : 'feature', value : 'auto',
|
|
|
|
description: 'vte support for the gtk UI')
|
2022-11-21 16:55:38 +03:00
|
|
|
|
|
|
|
# GTK Clipboard implementation is disabled by default, since it may cause hangs
|
|
|
|
# of the guest VCPUs. See gitlab issue 1150:
|
|
|
|
# https://gitlab.com/qemu-project/qemu/-/issues/1150
|
|
|
|
|
|
|
|
option('gtk_clipboard', type: 'feature', value : 'disabled',
|
|
|
|
description: 'clipboard support for the gtk UI (EXPERIMENTAL, MAY HANG)')
|
2020-09-01 08:59:23 +03:00
|
|
|
option('xkbcommon', type : 'feature', value : 'auto',
|
|
|
|
description: 'xkbcommon support')
|
2020-11-17 15:37:39 +03:00
|
|
|
option('zstd', type : 'feature', value : 'auto',
|
|
|
|
description: 'zstd compression support')
|
2024-06-10 13:21:06 +03:00
|
|
|
option('qpl', type : 'feature', value : 'auto',
|
|
|
|
description: 'Query Processing Library support')
|
2024-06-07 16:53:05 +03:00
|
|
|
option('uadk', type : 'feature', value : 'auto',
|
|
|
|
description: 'UADK Library support')
|
2024-08-31 02:27:19 +03:00
|
|
|
option('qatzip', type: 'feature', value: 'auto',
|
|
|
|
description: 'QATzip compression support')
|
2020-10-27 22:05:41 +03:00
|
|
|
option('fuse', type: 'feature', value: 'auto',
|
|
|
|
description: 'FUSE block device export')
|
2020-10-27 22:05:46 +03:00
|
|
|
option('fuse_lseek', type : 'feature', value : 'auto',
|
|
|
|
description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports')
|
2020-09-13 22:19:25 +03:00
|
|
|
|
2021-10-07 16:08:14 +03:00
|
|
|
option('trace_backends', type: 'array', value: ['log'],
|
|
|
|
choices: ['dtrace', 'ftrace', 'log', 'nop', 'simple', 'syslog', 'ust'],
|
|
|
|
description: 'Set available tracing backends')
|
|
|
|
|
2021-10-07 16:06:09 +03:00
|
|
|
option('alsa', type: 'feature', value: 'auto',
|
|
|
|
description: 'ALSA sound support')
|
|
|
|
option('coreaudio', type: 'feature', value: 'auto',
|
|
|
|
description: 'CoreAudio sound support')
|
|
|
|
option('dsound', type: 'feature', value: 'auto',
|
|
|
|
description: 'DirectSound sound support')
|
|
|
|
option('jack', type: 'feature', value: 'auto',
|
|
|
|
description: 'JACK sound support')
|
|
|
|
option('oss', type: 'feature', value: 'auto',
|
|
|
|
description: 'OSS sound support')
|
|
|
|
option('pa', type: 'feature', value: 'auto',
|
|
|
|
description: 'PulseAudio sound support')
|
2023-04-17 13:56:54 +03:00
|
|
|
option('pipewire', type: 'feature', value: 'auto',
|
2023-05-06 19:37:26 +03:00
|
|
|
description: 'PipeWire sound support')
|
2022-09-07 16:23:42 +03:00
|
|
|
option('sndio', type: 'feature', value: 'auto',
|
|
|
|
description: 'sndio sound support')
|
2021-10-07 16:06:09 +03:00
|
|
|
|
2022-04-20 18:34:07 +03:00
|
|
|
option('vhost_kernel', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhost kernel backend support')
|
|
|
|
option('vhost_net', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhost-net kernel acceleration support')
|
|
|
|
option('vhost_user', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhost-user backend support')
|
|
|
|
option('vhost_crypto', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhost-user crypto backend support')
|
|
|
|
option('vhost_vdpa', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhost-vdpa kernel backend support')
|
2020-11-17 16:46:21 +03:00
|
|
|
option('vhost_user_blk_server', type: 'feature', value: 'auto',
|
|
|
|
description: 'build vhost-user-blk server')
|
|
|
|
option('virtfs', type: 'feature', value: 'auto',
|
|
|
|
description: 'virtio-9p support')
|
2022-05-23 11:46:08 +03:00
|
|
|
option('libvduse', type: 'feature', value: 'auto',
|
|
|
|
description: 'build VDUSE Library')
|
2022-05-23 11:46:09 +03:00
|
|
|
option('vduse_blk_export', type: 'feature', value: 'auto',
|
|
|
|
description: 'VDUSE block export support')
|
2020-11-17 16:46:21 +03:00
|
|
|
|
2022-05-16 17:58:23 +03:00
|
|
|
option('capstone', type: 'feature', value: 'auto',
|
2020-09-13 22:19:25 +03:00
|
|
|
description: 'Whether and how to find the capstone library')
|
2020-10-05 12:31:15 +03:00
|
|
|
option('fdt', type: 'combo', value: 'auto',
|
|
|
|
choices: ['disabled', 'enabled', 'auto', 'system', 'internal'],
|
|
|
|
description: 'Whether and how to find the libfdt library')
|
2021-11-15 23:29:43 +03:00
|
|
|
|
|
|
|
option('selinux', type: 'feature', value: 'auto',
|
|
|
|
description: 'SELinux support in qemu-nbd')
|
2021-10-13 12:43:54 +03:00
|
|
|
option('replication', type: 'feature', value: 'auto',
|
|
|
|
description: 'replication support')
|
2023-05-15 16:06:38 +03:00
|
|
|
option('colo_proxy', type: 'feature', value: 'auto',
|
|
|
|
description: 'colo-proxy support')
|
2021-10-13 12:42:25 +03:00
|
|
|
option('bochs', type: 'feature', value: 'auto',
|
|
|
|
description: 'bochs image format support')
|
|
|
|
option('cloop', type: 'feature', value: 'auto',
|
|
|
|
description: 'cloop image format support')
|
|
|
|
option('dmg', type: 'feature', value: 'auto',
|
|
|
|
description: 'dmg image format support')
|
|
|
|
option('qcow1', type: 'feature', value: 'auto',
|
|
|
|
description: 'qcow1 image format support')
|
|
|
|
option('vdi', type: 'feature', value: 'auto',
|
|
|
|
description: 'vdi image format support')
|
2023-04-21 12:27:58 +03:00
|
|
|
option('vhdx', type: 'feature', value: 'auto',
|
|
|
|
description: 'vhdx image format support')
|
|
|
|
option('vmdk', type: 'feature', value: 'auto',
|
|
|
|
description: 'vmdk image format support')
|
|
|
|
option('vpc', type: 'feature', value: 'auto',
|
|
|
|
description: 'vpc image format support')
|
2021-10-13 12:42:25 +03:00
|
|
|
option('vvfat', type: 'feature', value: 'auto',
|
|
|
|
description: 'vvfat image format support')
|
|
|
|
option('qed', type: 'feature', value: 'auto',
|
|
|
|
description: 'qed image format support')
|
|
|
|
option('parallels', type: 'feature', value: 'auto',
|
|
|
|
description: 'parallels image format support')
|
2021-10-13 12:46:09 +03:00
|
|
|
option('block_drv_whitelist_in_tools', type: 'boolean', value: false,
|
|
|
|
description: 'use block whitelist also in tools instead of only QEMU')
|
|
|
|
option('rng_none', type: 'boolean', value: false,
|
|
|
|
description: 'dummy RNG, avoid using /dev/(u)random and getrandom()')
|
2021-10-13 12:52:03 +03:00
|
|
|
option('coroutine_pool', type: 'boolean', value: true,
|
|
|
|
description: 'coroutine freelist (better performance)')
|
2023-05-01 20:34:43 +03:00
|
|
|
option('debug_graph_lock', type: 'boolean', value: false,
|
|
|
|
description: 'graph lock debugging support')
|
2021-10-13 12:46:09 +03:00
|
|
|
option('debug_mutex', type: 'boolean', value: false,
|
|
|
|
description: 'mutex debugging support')
|
2021-10-13 12:52:03 +03:00
|
|
|
option('debug_stack_usage', type: 'boolean', value: false,
|
|
|
|
description: 'measure coroutine stack usage')
|
2023-04-17 16:00:37 +03:00
|
|
|
option('qom_cast_debug', type: 'boolean', value: true,
|
2021-10-13 12:46:09 +03:00
|
|
|
description: 'cast debugging support')
|
2021-10-13 14:43:36 +03:00
|
|
|
option('slirp_smbd', type : 'feature', value : 'auto',
|
|
|
|
description: 'use smbd (at path --smbd=*) in slirp networking')
|
2022-09-23 20:38:27 +03:00
|
|
|
|
2023-10-09 15:13:59 +03:00
|
|
|
option('qemu_ga_manufacturer', type: 'string', value: 'QEMU',
|
|
|
|
description: '"manufacturer" name for qemu-ga registry entries')
|
|
|
|
option('qemu_ga_distro', type: 'string', value: 'Linux',
|
|
|
|
description: 'second path element in qemu-ga registry entries')
|
|
|
|
option('qemu_ga_version', type: 'string', value: '',
|
|
|
|
description: 'version number for qemu-ga installer')
|
|
|
|
|
2022-09-23 20:38:27 +03:00
|
|
|
option('hexagon_idef_parser', type : 'boolean', value : true,
|
|
|
|
description: 'use idef-parser to automatically generate TCG code for the Hexagon frontend')
|
2024-06-18 18:32:52 +03:00
|
|
|
|
|
|
|
option('x86_version', type : 'combo', choices : ['0', '1', '2', '3', '4'], value: '1',
|
|
|
|
description: 'tweak required x86_64 architecture version beyond compiler default')
|
2024-10-03 16:28:44 +03:00
|
|
|
|
2024-10-14 14:01:13 +03:00
|
|
|
option('rust', type: 'feature', value: 'disabled',
|
2024-10-03 16:28:44 +03:00
|
|
|
description: 'Rust support')
|