* Bugfixes

* Meson conversions
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJqObcUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroPwFgf9GgktU8JPTr/PENuYJkJkcoDriPSk
 KC5w5XWMzHHtSQLDLYhA9boLVo4flsAmE+CBJ3dQlKNhR2uezEvFM3ndtQ7koQ3z
 9svjBZ/z5HKooSxPgOrRE43JpRxUHEhcRFGIfu8AIfRz8xQZ5fD9I5sGCUcNlRRi
 gWBjh849pSGW0ukL+ADz86UzTCSQGVY5ia6vnyYhvE7vT/uvcDTSLTBXmj2EpDEg
 vJzQYvcApgCd8U+Aj5iNvryt4fnjdj0xaDdyIIkrKK0WA8wJw5u7YFl7RWrkmVQG
 1K/rrkULJUlCpx/bHkgI88Wrd3t7G8EGFL0OkzKYfFHWv+XUfndtmxkkfg==
 =JLRA
 -----END PGP SIGNATURE-----

Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* Bugfixes
* Meson conversions

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJqObcUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPwFgf9GgktU8JPTr/PENuYJkJkcoDriPSk
# KC5w5XWMzHHtSQLDLYhA9boLVo4flsAmE+CBJ3dQlKNhR2uezEvFM3ndtQ7koQ3z
# 9svjBZ/z5HKooSxPgOrRE43JpRxUHEhcRFGIfu8AIfRz8xQZ5fD9I5sGCUcNlRRi
# gWBjh849pSGW0ukL+ADz86UzTCSQGVY5ia6vnyYhvE7vT/uvcDTSLTBXmj2EpDEg
# vJzQYvcApgCd8U+Aj5iNvryt4fnjdj0xaDdyIIkrKK0WA8wJw5u7YFl7RWrkmVQG
# 1K/rrkULJUlCpx/bHkgI88Wrd3t7G8EGFL0OkzKYfFHWv+XUfndtmxkkfg==
# =JLRA
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 27 Apr 2022 11:52:39 PM PDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  qemu-options: Limit the -enable-kvm option to the targets that support it
  meson, configure: move --enable-module-upgrades to meson
  meson: remove CONFIG_XEN_PCI_PASSTHROUGH from config-target.h
  meson, configure: move libgio test to meson
  meson, configure: move usbfs test to meson
  meson, configure: move keyctl test to meson
  meson, configure: move RDMA options to meson
  configure, meson: move OpenGL check to meson
  configure: move --enable/--disable-debug-info to second option parsing pass
  configure: gcov should not exclude fortify-source
  configure: pc-bios/qemu-icon.bmp does not exist
  qga: wixl: get path to sysroot from pkg-config as intended
  configure: remove dead code
  meson: show final set of compiler flags
  i386: pcmpestr 64-bit sign extension bug
  remove -writeconfig
  configure: make fortify_source=yes by default
  error-report: fix g_date_time_format assertion

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-04-28 01:53:59 -07:00
commit 6071ff6087
21 changed files with 221 additions and 483 deletions

View File

@ -15,7 +15,7 @@ softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: files('vhost-user.c'))
softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true: files('cryptodev-vhost-user.c'))
softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio])
softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
subdir('tpm')

348
configure vendored
View File

@ -244,7 +244,6 @@ audio_drv_list="default"
block_drv_rw_whitelist=""
block_drv_ro_whitelist=""
host_cc="cc"
debug_info="yes"
lto="false"
stack_protector=""
safe_stack=""
@ -302,17 +301,15 @@ vhost_vsock="$default_feature"
vhost_user="no"
vhost_user_fs="$default_feature"
vhost_vdpa="$default_feature"
rdma="$default_feature"
pvrdma="$default_feature"
debug_info="yes"
debug_tcg="no"
debug="no"
sanitizers="no"
tsan="no"
fortify_source="$default_feature"
fortify_source="yes"
gcov="no"
EXESUF=""
modules="no"
module_upgrades="no"
prefix="/usr/local"
qemu_suffix="qemu"
softmmu="yes"
@ -320,17 +317,13 @@ linux_user=""
bsd_user=""
pkgversion=""
pie=""
trace_backends="log"
trace_file="trace"
opengl="$default_feature"
coroutine=""
tls_priority="NORMAL"
plugins="$default_feature"
secret_keyring="$default_feature"
meson=""
meson_args=""
ninja=""
gio="$default_feature"
skip_meson=no
# The following Meson options are handled manually (still they
@ -380,10 +373,6 @@ for opt do
;;
--extra-ldflags=*) EXTRA_LDFLAGS="$EXTRA_LDFLAGS $optarg"
;;
--enable-debug-info) debug_info="yes"
;;
--disable-debug-info) debug_info="no"
;;
--cross-cc-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --cross-cc-FOO option"
;;
--cross-cc-cflags-*) cc_arch=${opt#--cross-cc-cflags-}; cc_arch=${cc_arch%%=*}
@ -391,7 +380,6 @@ for opt do
cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}"
;;
--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
cc_archs="$cc_archs $cc_arch"
eval "cross_cc_${cc_arch}=\$optarg"
cross_cc_vars="$cross_cc_vars cross_cc_${cc_arch}"
;;
@ -761,22 +749,18 @@ for opt do
;;
--extra-ldflags=*)
;;
--enable-debug-info)
;;
--disable-debug-info)
;;
--cross-cc-*)
;;
--enable-debug-info) debug_info="yes"
;;
--disable-debug-info) debug_info="no"
;;
--enable-modules)
modules="yes"
;;
--disable-modules)
modules="no"
;;
--disable-module-upgrades) module_upgrades="no"
;;
--enable-module-upgrades) module_upgrades="yes"
;;
--cpu=*)
;;
--target-list=*) target_list="$optarg"
@ -966,10 +950,6 @@ for opt do
;;
--enable-vhost-user-fs) vhost_user_fs="yes"
;;
--disable-opengl) opengl="no"
;;
--enable-opengl) opengl="yes"
;;
--disable-zlib-test)
;;
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
@ -983,14 +963,6 @@ for opt do
;;
--tls-priority=*) tls_priority="$optarg"
;;
--enable-rdma) rdma="yes"
;;
--disable-rdma) rdma="no"
;;
--enable-pvrdma) pvrdma="yes"
;;
--disable-pvrdma) pvrdma="no"
;;
--disable-vhost-user) vhost_user="no"
;;
--enable-vhost-user) vhost_user="yes"
@ -1030,14 +1002,6 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
--enable-keyring) secret_keyring="yes"
;;
--disable-keyring) secret_keyring="no"
;;
--enable-gio) gio=yes
;;
--disable-gio) gio=no
;;
# backwards compatibility options
--enable-trace-backend=*) meson_option_parse "--enable-trace-backends=$optarg" "$optarg"
;;
@ -1249,14 +1213,11 @@ cat << EOF
bsd-user all BSD usermode emulation targets
pie Position Independent Executables
modules modules support (non-Windows)
module-upgrades try to load modules from alternate paths for upgrades
debug-tcg TCG debugging (default is disabled)
debug-info debugging information
lto Enable Link-Time Optimization.
safe-stack SafeStack Stack Smash Protection. Depends on
clang/llvm >= 3.7 and requires coroutine backend ucontext.
rdma Enable RDMA-based migration
pvrdma Enable PVRDMA support
vhost-net vhost-net kernel acceleration support
vhost-vsock virtio sockets device support
vhost-scsi vhost-scsi kernel target support
@ -1264,8 +1225,6 @@ cat << EOF
vhost-kernel vhost kernel backend support
vhost-user vhost-user backend support
vhost-vdpa vhost-vdpa kernel backend support
opengl opengl support
gio libgio support
NOTE: The object files are built at the place where configure is launched
EOF
@ -1522,11 +1481,6 @@ if test "$modules" = "yes" && test "$mingw32" = "yes" ; then
error_exit "Modules are not available for Windows"
fi
# module_upgrades is only reasonable if modules are enabled
if test "$modules" = "no" && test "$module_upgrades" = "yes" ; then
error_exit "Can't enable module-upgrades as Modules are not enabled"
fi
# Static linking is not possible with plugins, modules or PIE
if test "$static" = "yes" ; then
if test "$modules" = "yes" ; then
@ -2049,100 +2003,6 @@ EOF
fi
fi
##########################################
# RDMA needs OpenFabrics libraries
if test "$rdma" != "no" ; then
cat > $TMPC <<EOF
#include <rdma/rdma_cma.h>
int main(void) { return 0; }
EOF
rdma_libs="-lrdmacm -libverbs -libumad"
if compile_prog "" "$rdma_libs" ; then
rdma="yes"
else
if test "$rdma" = "yes" ; then
error_exit \
" OpenFabrics librdmacm/libibverbs/libibumad not present." \
" Your options:" \
" (1) Fast: Install infiniband packages (devel) from your distro." \
" (2) Cleanest: Install libraries from www.openfabrics.org" \
" (3) Also: Install softiwarp if you don't have RDMA hardware"
fi
rdma="no"
fi
fi
##########################################
# PVRDMA detection
cat > $TMPC <<EOF &&
#include <sys/mman.h>
int
main(void)
{
char buf = 0;
void *addr = &buf;
addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);
return 0;
}
EOF
if test "$rdma" = "yes" ; then
case "$pvrdma" in
"")
if compile_prog "" ""; then
pvrdma="yes"
else
pvrdma="no"
fi
;;
"yes")
if ! compile_prog "" ""; then
error_exit "PVRDMA is not supported since mremap is not implemented"
fi
pvrdma="yes"
;;
"no")
pvrdma="no"
;;
esac
else
if test "$pvrdma" = "yes" ; then
error_exit "PVRDMA requires rdma suppport"
fi
pvrdma="no"
fi
# Let's see if enhanced reg_mr is supported
if test "$pvrdma" = "yes" ; then
cat > $TMPC <<EOF &&
#include <infiniband/verbs.h>
int
main(void)
{
struct ibv_mr *mr;
struct ibv_pd *pd = NULL;
size_t length = 10;
uint64_t iova = 0;
int access = 0;
void *addr = NULL;
mr = ibv_reg_mr_iova(pd, addr, length, iova, access);
ibv_dereg_mr(mr);
return 0;
}
EOF
if ! compile_prog "" "-libverbs"; then
QEMU_CFLAGS="$QEMU_CFLAGS -DLEGACY_RDMA_REG_MR"
fi
fi
##########################################
# glib support probe
@ -2170,50 +2030,6 @@ if test "$static" = yes && test "$mingw32" = yes; then
glib_cflags="-DGLIB_STATIC_COMPILATION $glib_cflags"
fi
if ! test "$gio" = "no"; then
pass=no
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
gio_cflags=$($pkg_config --cflags gio-2.0)
gio_libs=$($pkg_config --libs gio-2.0)
gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
if ! has "$gdbus_codegen"; then
gdbus_codegen=
fi
# Check that the libraries actually work -- Ubuntu 18.04 ships
# with pkg-config --static --libs data for gio-2.0 that is missing
# -lblkid and will give a link error.
cat > $TMPC <<EOF
#include <gio/gio.h>
int main(void)
{
g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0);
return 0;
}
EOF
if compile_prog "$gio_cflags" "$gio_libs" ; then
pass=yes
else
pass=no
fi
if test "$pass" = "yes" &&
$pkg_config --atleast-version=$glib_req_ver gio-unix-2.0; then
gio_cflags="$gio_cflags $($pkg_config --cflags gio-unix-2.0)"
gio_libs="$gio_libs $($pkg_config --libs gio-unix-2.0)"
fi
fi
if test "$pass" = "no"; then
if test "$gio" = "yes"; then
feature_not_found "gio" "Install libgio >= 2.0"
else
gio=no
fi
else
gio=yes
fi
fi
# Sanity check that the current size_t matches the
# size that glib thinks it should be. This catches
# problems on multi-arch where people try to build
@ -2283,59 +2099,6 @@ case "$fdt" in
;;
esac
##########################################
# opengl probe (for sdl2, gtk)
if test "$opengl" != "no" ; then
epoxy=no
if $pkg_config epoxy; then
cat > $TMPC << EOF
#include <epoxy/egl.h>
int main(void) { return 0; }
EOF
if compile_prog "" "" ; then
epoxy=yes
fi
fi
if test "$epoxy" = "yes" ; then
opengl_cflags="$($pkg_config --cflags epoxy)"
opengl_libs="$($pkg_config --libs epoxy)"
opengl=yes
else
if test "$opengl" = "yes" ; then
feature_not_found "opengl" "Please install epoxy with EGL"
fi
opengl_cflags=""
opengl_libs=""
opengl=no
fi
fi
# check for usbfs
have_usbfs=no
if test "$linux_user" = "yes"; then
cat > $TMPC << EOF
#include <linux/usbdevice_fs.h>
#ifndef USBDEVFS_GET_CAPABILITIES
#error "USBDEVFS_GET_CAPABILITIES undefined"
#endif
#ifndef USBDEVFS_DISCONNECT_CLAIM
#error "USBDEVFS_DISCONNECT_CLAIM undefined"
#endif
int main(void)
{
return 0;
}
EOF
if compile_prog "" ""; then
have_usbfs=yes
fi
fi
##########################################
# capstone
@ -2586,50 +2349,13 @@ case "$slirp" in
;;
esac
##########################################
# check for usable __NR_keyctl syscall
if test "$linux" = "yes" ; then
have_keyring=no
cat > $TMPC << EOF
#include <errno.h>
#include <asm/unistd.h>
#include <linux/keyctl.h>
#include <unistd.h>
int main(void) {
return syscall(__NR_keyctl, KEYCTL_READ, 0, NULL, NULL, 0);
}
EOF
if compile_prog "" "" ; then
have_keyring=yes
fi
fi
if test "$secret_keyring" != "no"
then
if test "$have_keyring" = "yes"
then
secret_keyring=yes
else
if test "$secret_keyring" = "yes"
then
error_exit "syscall __NR_keyctl requested, \
but not implemented on your system"
else
secret_keyring=no
fi
fi
fi
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
write_c_skeleton
if test "$gcov" = "yes" ; then
:
elif test "$fortify_source" = "yes" ; then
if test "$fortify_source" = "yes" ; then
QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
debug=no
fi
@ -2704,7 +2430,7 @@ if test "$QEMU_GA_VERSION" = ""; then
QEMU_GA_VERSION=$(cat $source_path/VERSION)
fi
QEMU_GA_MSI_MINGW_DLL_PATH="$($pkg_config --variable=prefix glib-2.0)/bin"
QEMU_GA_MSI_MINGW_BIN_PATH="$($pkg_config --variable=prefix glib-2.0)/bin"
# Mac OS X ships with a broken assembler
roms=
@ -2792,7 +2518,7 @@ if test "$debug_tcg" = "yes" ; then
fi
if test "$mingw32" = "yes" ; then
echo "CONFIG_WIN32=y" >> $config_host_mak
echo "QEMU_GA_MSI_MINGW_DLL_PATH=${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $config_host_mak
echo "QEMU_GA_MSI_MINGW_BIN_PATH=${QEMU_GA_MSI_MINGW_BIN_PATH}" >> $config_host_mak
echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER}" >> $config_host_mak
echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO}" >> $config_host_mak
echo "QEMU_GA_VERSION=${QEMU_GA_VERSION}" >> $config_host_mak
@ -2826,20 +2552,6 @@ if test "$modules" = "yes"; then
echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak
echo "CONFIG_MODULES=y" >> $config_host_mak
fi
if test "$module_upgrades" = "yes"; then
echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
fi
if test "$have_usbfs" = "yes" ; then
echo "CONFIG_USBFS=y" >> $config_host_mak
fi
if test "$gio" = "yes" ; then
echo "CONFIG_GIO=y" >> $config_host_mak
echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
echo "GIO_LIBS=$gio_libs" >> $config_host_mak
fi
if test "$gdbus_codegen" != "" ; then
echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
fi
echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
if test "$xen" = "enabled" ; then
@ -2881,15 +2593,6 @@ fi
if test "$vhost_user_fs" = "yes" ; then
echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
fi
if test "$tcg" = "enabled" -a "$tcg_interpreter" = "true" ; then
echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak
fi
if test "$opengl" = "yes" ; then
echo "CONFIG_OPENGL=y" >> $config_host_mak
echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
fi
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
@ -2906,15 +2609,6 @@ if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then
echo "CONFIG_TSAN=y" >> $config_host_mak
fi
if test "$rdma" = "yes" ; then
echo "CONFIG_RDMA=y" >> $config_host_mak
echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
fi
if test "$pvrdma" = "yes" ; then
echo "CONFIG_PVRDMA=y" >> $config_host_mak
fi
if test "$plugins" = "yes" ; then
echo "CONFIG_PLUGIN=y" >> $config_host_mak
fi
@ -2926,10 +2620,6 @@ if test -n "$gdb_bin"; then
fi
fi
if test "$secret_keyring" = "yes" ; then
echo "CONFIG_SECRET_KEYRING=y" >> $config_host_mak
fi
echo "ROMS=$roms" >> $config_host_mak
echo "MAKE=$make" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
@ -3024,8 +2714,6 @@ LINKS="Makefile"
LINKS="$LINKS tests/tcg/Makefile.target"
LINKS="$LINKS pc-bios/optionrom/Makefile"
LINKS="$LINKS pc-bios/s390-ccw/Makefile"
LINKS="$LINKS roms/seabios/Makefile"
LINKS="$LINKS pc-bios/qemu-icon.bmp"
LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit
LINKS="$LINKS tests/avocado tests/data"
LINKS="$LINKS tests/qemu-iotests/check"
@ -3059,24 +2747,6 @@ done
export target_list source_path use_containers cpu host_cc
$source_path/tests/tcg/configure.sh)
# temporary config to build submodules
if test -f $source_path/roms/seabios/Makefile; then
for rom in seabios; do
config_mak=roms/$rom/config.mak
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
echo "AS=$as" >> $config_mak
echo "CCAS=$ccas" >> $config_mak
echo "CC=$cc" >> $config_mak
echo "BCC=bcc" >> $config_mak
echo "CPP=$cpp" >> $config_mak
echo "OBJCOPY=objcopy" >> $config_mak
echo "IASL=$iasl" >> $config_mak
echo "LD=$ld" >> $config_mak
echo "RANLIB=$ranlib" >> $config_mak
done
fi
config_mak=pc-bios/optionrom/config.mak
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "TOPSRC_DIR=$source_path" >> $config_mak

View File

@ -1,7 +1,5 @@
if 'CONFIG_PVRDMA' in config_host
# if not found, CONFIG_PVRDMA should not be set
if have_pvrdma
# FIXME: broken on big endian architectures
libumad = cc.find_library('ibumad', required: true)
executable('rdmacm-mux', files('main.c'), genh,
dependencies: [glib, libumad],
build_by_default: false,

View File

@ -34,7 +34,9 @@ else
crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
endif
crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyring.c'))
if have_keyring
crypto_ss.add(files('secret_keyring.c'))
endif
if have_afalg
crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'))
endif

View File

@ -67,13 +67,6 @@ and will cause a warning.
The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on``
rather than ``delay=off``.
``-writeconfig`` (since 6.0)
'''''''''''''''''''''''''''''
The ``-writeconfig`` option is not able to serialize the entire contents
of the QEMU command line. It is thus considered a failed experiment
and deprecated, with no current replacement.
Userspace local APIC with KVM (x86, since 6.0)
''''''''''''''''''''''''''''''''''''''''''''''

View File

@ -348,6 +348,13 @@ or ``gnutls`` library enabled as a cryptography provider.
Neither the ``nettle`` library, or the built-in cryptography provider are
supported on FIPS enabled hosts.
``-writeconfig`` (removed in 7.1)
'''''''''''''''''''''''''''''''''
The ``-writeconfig`` option was not able to serialize the entire contents
of the QEMU command line. It is thus considered a failed experiment
and removed without a replacement.
QEMU Machine Protocol (QMP) commands
------------------------------------

View File

@ -8,13 +8,17 @@ softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
))
xen_specific_ss = ss.source_set()
xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files(
'xen-host-pci-device.c',
'xen_pt.c',
'xen_pt_config_init.c',
'xen_pt_graphics.c',
'xen_pt_load_rom.c',
'xen_pt_msi.c',
), if_false: files('xen_pt_stub.c'))
if have_xen_pci_passthrough
xen_specific_ss.add(files(
'xen-host-pci-device.c',
'xen_pt.c',
'xen_pt_config_init.c',
'xen_pt_graphics.c',
'xen_pt_load_rom.c',
'xen_pt_msi.c',
))
else
xen_specific_ss.add('xen_pt_stub.c')
endif
specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)

View File

@ -12,7 +12,6 @@ void qemu_add_opts(QemuOptsList *list);
void qemu_add_drive_opts(QemuOptsList *list);
int qemu_global_option(const char *str);
void qemu_config_write(FILE *fp);
int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname,
Error **errp);

View File

@ -448,11 +448,32 @@ glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
meson.override_dependency('glib-2.0', glib)
gio = not_found
if 'CONFIG_GIO' in config_host
gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
link_args: config_host['GIO_LIBS'].split(),
version: config_host['GLIB_VERSION'])
gdbus_codegen = not_found
if not get_option('gio').auto() or have_system
gio = dependency('gio-2.0', required: get_option('gio'),
method: 'pkg-config', kwargs: static_kwargs)
if gio.found() and not cc.links('''
#include <gio/gio.h>
int main(void)
{
g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0);
return 0;
}''', dependencies: [glib, gio])
if get_option('gio').enabled()
error('The installed libgio is broken for static linking')
endif
gio = not_found
endif
if gio.found()
gdbus_codegen = find_program(gio.get_variable('gdbus_codegen'),
required: get_option('gio'))
gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
method: 'pkg-config', kwargs: static_kwargs)
gio = declare_dependency(dependencies: [gio, gio_unix],
version: gio.version())
endif
endif
lttng = not_found
if 'ust' in get_option('trace_backends')
lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
@ -1000,9 +1021,14 @@ if not get_option('coreaudio').auto() or (targetos == 'darwin' and have_system)
endif
opengl = not_found
if 'CONFIG_OPENGL' in config_host
opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(),
link_args: config_host['OPENGL_LIBS'].split())
if not get_option('opengl').auto() or have_system or have_vhost_user_gpu
epoxy = dependency('epoxy', method: 'pkg-config',
required: get_option('opengl'), kwargs: static_kwargs)
if cc.has_header('epoxy/egl.h', dependencies: epoxy)
opengl = epoxy
elif get_option('opengl').enabled()
error('epoxy/egl.h not found')
endif
endif
gbm = not_found
if (have_system or have_tools) and (virgl.found() or opengl.found())
@ -1214,9 +1240,22 @@ if numa.found() and not cc.links('''
endif
rdma = not_found
if 'CONFIG_RDMA' in config_host
rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
if not get_option('rdma').auto() or have_system
libumad = cc.find_library('ibumad', required: get_option('rdma'))
rdma_libs = [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'],
required: get_option('rdma'),
kwargs: static_kwargs),
cc.find_library('ibverbs', required: get_option('rdma'),
kwargs: static_kwargs),
libumad]
rdma = declare_dependency(dependencies: rdma_libs)
foreach lib: rdma_libs
if not lib.found()
rdma = not_found
endif
endforeach
endif
xen = not_found
if 'CONFIG_XEN_BACKEND' in config_host
xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
@ -1462,7 +1501,7 @@ dbus_display = get_option('dbus_display') \
error_message: '-display dbus requires glib>=2.64') \
.require(enable_modules,
error_message: '-display dbus requires --enable-modules') \
.require(config_host.has_key('GDBUS_CODEGEN'),
.require(gdbus_codegen.found(),
error_message: '-display dbus requires gdbus-codegen') \
.allowed()
@ -1511,6 +1550,11 @@ endif
config_host_data.set('HOST_' + host_arch.to_upper(), 1)
if get_option('module_upgrades') and not enable_modules
error('Cannot enable module-upgrades as modules are not enabled')
endif
config_host_data.set('CONFIG_MODULE_UPGRADES', get_option('module_upgrades'))
config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
@ -1524,6 +1568,7 @@ config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
config_host_data.set('CONFIG_CURL', curl.found())
config_host_data.set('CONFIG_CURSES', curses.found())
config_host_data.set('CONFIG_GBM', gbm.found())
config_host_data.set('CONFIG_GIO', gio.found())
config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found())
if glusterfs.found()
config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().version_compare('>=4'))
@ -1546,8 +1591,10 @@ config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
config_host_data.set('CONFIG_NUMA', numa.found())
config_host_data.set('CONFIG_OPENGL', opengl.found())
config_host_data.set('CONFIG_PROFILER', get_option('profiler'))
config_host_data.set('CONFIG_RBD', rbd.found())
config_host_data.set('CONFIG_RDMA', rdma.found())
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
config_host_data.set('CONFIG_SECCOMP', seccomp.found())
@ -1646,7 +1693,7 @@ config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '
if rdma.found()
config_host_data.set('HAVE_IBV_ADVISE_MR',
cc.has_function('ibv_advise_mr',
args: config_host['RDMA_LIBS'].split(),
dependencies: rdma,
prefix: '#include <infiniband/verbs.h>'))
endif
@ -1920,6 +1967,32 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + '''
return getauxval(AT_HWCAP) == 0;
}'''))
config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles('''
#include <linux/usbdevice_fs.h>
#ifndef USBDEVFS_GET_CAPABILITIES
#error "USBDEVFS_GET_CAPABILITIES undefined"
#endif
#ifndef USBDEVFS_DISCONNECT_CLAIM
#error "USBDEVFS_DISCONNECT_CLAIM undefined"
#endif
int main(void) { return 0; }'''))
have_keyring = get_option('keyring') \
.require(targetos == 'linux', error_message: 'keyring is only available on Linux') \
.require(cc.compiles('''
#include <errno.h>
#include <asm/unistd.h>
#include <linux/keyctl.h>
#include <sys/syscall.h>
#include <unistd.h>
int main(void) {
return syscall(__NR_keyctl, KEYCTL_READ, 0, NULL, NULL, 0);
}'''), error_message: 'keyctl syscall not available on this system').allowed()
config_host_data.set('CONFIG_SECRET_KEYRING', have_keyring)
have_cpuid_h = cc.links('''
#include <cpuid.h>
int main(void) {
@ -1966,6 +2039,36 @@ config_host_data.set('CONFIG_AVX512F_OPT', get_option('avx512f') \
int main(int argc, char *argv[]) { return bar(argv[0]); }
'''), error_message: 'AVX512F not available').allowed())
have_pvrdma = get_option('pvrdma') \
.require(rdma.found(), error_message: 'PVRDMA requires OpenFabrics libraries') \
.require(cc.compiles('''
int main(void)
{
char buf = 0;
void *addr = &buf;
addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);
return 0;
}'''), error_message: 'PVRDMA requires mremap').allowed()
if have_pvrdma
config_host_data.set('LEGACY_RDMA_REG_MR', not cc.compiles('''
#include <infiniband/verbs.h>
int main(void)
{
struct ibv_mr *mr;
struct ibv_pd *pd = NULL;
size_t length = 10;
uint64_t iova = 0;
int access = 0;
void *addr = NULL;
mr = ibv_reg_mr_iova(pd, addr, length, iova, access);
ibv_dereg_mr(mr);
return 0;
}'''))
endif
if get_option('membarrier').disabled()
have_membarrier = false
elif targetos == 'windows'
@ -2093,14 +2196,14 @@ host_kconfig = \
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
(spice.found() ? ['CONFIG_SPICE=y'] : []) + \
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=y'] : []) + \
(opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \
(x11.found() ? ['CONFIG_X11=y'] : []) + \
('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=y'] : []) + \
('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=y'] : []) + \
('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=y'] : []) + \
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=y'] : []) + \
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : [])
ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ]
@ -2144,8 +2247,6 @@ foreach target : target_dirs
config_all += { sym: 'y' }
if sym == 'CONFIG_TCG' and tcg_arch == 'tci'
config_target += { 'CONFIG_TCG_INTERPRETER': 'y' }
elif sym == 'CONFIG_XEN' and have_xen_pci_passthrough
config_target += { 'CONFIG_XEN_PCI_PASSTHROUGH': 'y' }
endif
if target in modular_tcg
config_target += { 'CONFIG_TCG_MODULAR': 'y' }
@ -3480,7 +3581,7 @@ summary_info += {'block layer': have_block}
summary_info += {'Install blobs': get_option('install_blobs')}
summary_info += {'module support': config_host.has_key('CONFIG_MODULES')}
if config_host.has_key('CONFIG_MODULES')
summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')}
summary_info += {'alternative module path': get_option('module_upgrades')}
endif
summary_info += {'fuzzing support': get_option('fuzzing')}
if have_system
@ -3535,10 +3636,10 @@ link_args = get_option(link_language + '_link_args')
if link_args.length() > 0
summary_info += {'LDFLAGS': ' '.join(link_args)}
endif
summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']}
summary_info += {'QEMU_CXXFLAGS': config_host['QEMU_CXXFLAGS']}
summary_info += {'QEMU_OBJCFLAGS': config_host['QEMU_OBJCFLAGS']}
summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']}
summary_info += {'QEMU_CFLAGS': ' '.join(qemu_cflags)}
summary_info += {'QEMU_CXXFLAGS': ' '.join(qemu_cxxflags)}
summary_info += {'QEMU_OBJCFLAGS': ' '.join(qemu_objcflags)}
summary_info += {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)}
summary_info += {'profiler': get_option('profiler')}
summary_info += {'link-time optimization (LTO)': get_option('b_lto')}
summary_info += {'PIE': get_option('b_pie')}
@ -3648,7 +3749,7 @@ if nettle.found()
endif
summary_info += {'AF_ALG support': have_afalg}
summary_info += {'rng-none': get_option('rng_none')}
summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')}
summary_info += {'Linux keyring': have_keyring}
summary(summary_info, bool_yn: true, section: 'Crypto')
# Libraries
@ -3694,8 +3795,8 @@ summary_info += {'l2tpv3 support': have_l2tpv3}
summary_info += {'Linux AIO support': libaio}
summary_info += {'Linux io_uring support': linux_io_uring}
summary_info += {'ATTR/XATTR support': libattr}
summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')}
summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')}
summary_info += {'RDMA support': rdma}
summary_info += {'PVRDMA support': have_pvrdma}
summary_info += {'fdt support': fdt_opt == 'disabled' ? false : fdt_opt}
summary_info += {'libcap-ng support': libcap_ng}
summary_info += {'bpf support': libbpf}
@ -3708,7 +3809,7 @@ summary_info += {'smartcard support': cacard}
summary_info += {'U2F support': u2f}
summary_info += {'libusb': libusb}
summary_info += {'usb net redir': usbredir}
summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')}
summary_info += {'OpenGL support (epoxy)': opengl}
summary_info += {'GBM': gbm}
summary_info += {'libiscsi support': libiscsi}
summary_info += {'libnfs support': libnfs}

View File

@ -34,6 +34,8 @@ option('fuzzing', type : 'boolean', value: false,
description: 'build fuzzing targets')
option('gettext', type : 'feature', value : 'auto',
description: 'Localization of the GTK+ user interface')
option('module_upgrades', type : 'boolean', value : false,
description: 'try to load modules from alternate paths for upgrades')
option('install_blobs', type : 'boolean', value : true,
description: 'install provided firmware blobs')
option('sparse', type : 'feature', value : 'auto',
@ -90,6 +92,8 @@ option('avx2', type: 'feature', value: 'auto',
description: 'AVX2 optimizations')
option('avx512f', type: 'feature', value: 'disabled',
description: 'AVX512F optimizations')
option('keyring', type: 'feature', value: 'auto',
description: 'Linux keyring support')
option('attr', type : 'feature', value : 'auto',
description: 'attr/xattr support')
@ -107,6 +111,8 @@ option('cocoa', type : 'feature', value : 'auto',
description: 'Cocoa user interface (macOS only)')
option('curl', type : 'feature', value : 'auto',
description: 'CURL block device driver')
option('gio', type : 'feature', value : 'auto',
description: 'use libgio for D-Bus support')
option('glusterfs', type : 'feature', value : 'auto',
description: 'Glusterfs block device driver')
option('libiscsi', type : 'feature', value : 'auto',
@ -149,6 +155,12 @@ option('lzo', type : 'feature', value : 'auto',
description: 'lzo compression support')
option('rbd', type : 'feature', value : 'auto',
description: 'Ceph block device driver')
option('opengl', type : 'feature', value : 'auto',
description: 'OpenGL support')
option('rdma', type : 'feature', value : 'auto',
description: 'Enable RDMA-based migration')
option('pvrdma', type : 'feature', value : 'auto',
description: 'Enable PVRDMA support')
option('gtk', type : 'feature', value : 'auto',
description: 'GTK+ user interface')
option('sdl', type : 'feature', value : 'auto',

View File

@ -27,7 +27,7 @@ softmmu_ss.add(files(
'tls.c',
), gnutls)
softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
softmmu_ss.add(when: rdma, if_true: files('rdma.c'))
if get_option('live_block_migration').allowed()
softmmu_ss.add(files('block.c'))
endif

View File

@ -4176,7 +4176,9 @@ SRST
ERST
DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \
"-enable-kvm enable KVM full virtualization support\n", QEMU_ARCH_ALL)
"-enable-kvm enable KVM full virtualization support\n",
QEMU_ARCH_ARM | QEMU_ARCH_I386 | QEMU_ARCH_MIPS | QEMU_ARCH_PPC |
QEMU_ARCH_RISCV | QEMU_ARCH_S390X)
SRST
``-enable-kvm``
Enable KVM full virtualization support. This option is only
@ -4622,18 +4624,14 @@ SRST
ERST
DEF("readconfig", HAS_ARG, QEMU_OPTION_readconfig,
"-readconfig <file>\n", QEMU_ARCH_ALL)
"-readconfig <file>\n"
" read config file\n", QEMU_ARCH_ALL)
SRST
``-readconfig file``
Read device configuration from 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.
ERST
DEF("writeconfig", HAS_ARG, QEMU_OPTION_writeconfig,
"-writeconfig <file>\n"
" read/write config file (deprecated)\n", QEMU_ARCH_ALL)
SRST
ERST
DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
"-no-user-config\n"

View File

@ -129,7 +129,7 @@ if targetos == 'windows'
wixl, '-o', '@OUTPUT0@', '@INPUT0@',
qemu_ga_msi_arch[cpu],
qemu_ga_msi_vss,
'-D', 'Mingw_dlls=' + config_host['QEMU_GA_MSI_MINGW_DLL_PATH'],
'-D', 'Mingw_bin=' + config_host['QEMU_GA_MSI_MINGW_BIN_PATH'],
])
all_qga += [qga_msi]
alias_target('msi', qga_msi)

View File

@ -19,6 +19,8 @@ meson_options_help() {
printf "%s\n" ' --disable-install-blobs install provided firmware blobs'
printf "%s\n" ' --enable-malloc=CHOICE choose memory allocator to use [system] (choices:'
printf "%s\n" ' jemalloc/system/tcmalloc)'
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
printf "%s\n" ' upgrades'
printf "%s\n" ' --enable-profiler profiler support'
printf "%s\n" ' --enable-qom-cast-debug cast debugging support'
printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and'
@ -59,6 +61,7 @@ meson_options_help() {
printf "%s\n" ' fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports'
printf "%s\n" ' gcrypt libgcrypt cryptography support'
printf "%s\n" ' gettext Localization of the GTK+ user interface'
printf "%s\n" ' gio use libgio for D-Bus support'
printf "%s\n" ' glusterfs Glusterfs block device driver'
printf "%s\n" ' gnutls GNUTLS cryptography support'
printf "%s\n" ' gtk GTK+ user interface'
@ -68,6 +71,7 @@ meson_options_help() {
printf "%s\n" ' hvf HVF acceleration support'
printf "%s\n" ' iconv Font glyph conversion support'
printf "%s\n" ' jack JACK sound support'
printf "%s\n" ' keyring Linux keyring support'
printf "%s\n" ' kvm KVM acceleration support'
printf "%s\n" ' l2tpv3 l2tpv3 network backend support'
printf "%s\n" ' libdaxctl libdaxctl support'
@ -91,14 +95,17 @@ meson_options_help() {
printf "%s\n" ' nettle nettle cryptography support'
printf "%s\n" ' numa libnuma support'
printf "%s\n" ' nvmm NVMM acceleration support'
printf "%s\n" ' opengl OpenGL support'
printf "%s\n" ' oss OSS sound support'
printf "%s\n" ' pa PulseAudio sound support'
printf "%s\n" ' parallels parallels image format support'
printf "%s\n" ' png PNG support with libpng'
printf "%s\n" ' pvrdma Enable PVRDMA support'
printf "%s\n" ' qcow1 qcow1 image format support'
printf "%s\n" ' qed qed image format support'
printf "%s\n" ' qga-vss build QGA VSS support (broken with MinGW)'
printf "%s\n" ' rbd Ceph block device driver'
printf "%s\n" ' rdma Enable RDMA-based migration'
printf "%s\n" ' replication replication support'
printf "%s\n" ' sdl SDL user interface'
printf "%s\n" ' sdl-image SDL Image support for icons'
@ -204,6 +211,8 @@ _meson_option_parse() {
--disable-gcrypt) printf "%s" -Dgcrypt=disabled ;;
--enable-gettext) printf "%s" -Dgettext=enabled ;;
--disable-gettext) printf "%s" -Dgettext=disabled ;;
--enable-gio) printf "%s" -Dgio=enabled ;;
--disable-gio) printf "%s" -Dgio=disabled ;;
--enable-glusterfs) printf "%s" -Dglusterfs=enabled ;;
--disable-glusterfs) printf "%s" -Dglusterfs=disabled ;;
--enable-gnutls) printf "%s" -Dgnutls=enabled ;;
@ -226,6 +235,8 @@ _meson_option_parse() {
--disable-install-blobs) printf "%s" -Dinstall_blobs=false ;;
--enable-jack) printf "%s" -Djack=enabled ;;
--disable-jack) printf "%s" -Djack=disabled ;;
--enable-keyring) printf "%s" -Dkeyring=enabled ;;
--disable-keyring) printf "%s" -Dkeyring=disabled ;;
--enable-kvm) printf "%s" -Dkvm=enabled ;;
--disable-kvm) printf "%s" -Dkvm=disabled ;;
--enable-l2tpv3) printf "%s" -Dl2tpv3=enabled ;;
@ -259,6 +270,8 @@ _meson_option_parse() {
--disable-malloc-trim) printf "%s" -Dmalloc_trim=disabled ;;
--enable-membarrier) printf "%s" -Dmembarrier=enabled ;;
--disable-membarrier) printf "%s" -Dmembarrier=disabled ;;
--enable-module-upgrades) printf "%s" -Dmodule_upgrades=true ;;
--disable-module-upgrades) printf "%s" -Dmodule_upgrades=false ;;
--enable-mpath) printf "%s" -Dmpath=enabled ;;
--disable-mpath) printf "%s" -Dmpath=disabled ;;
--enable-multiprocess) printf "%s" -Dmultiprocess=enabled ;;
@ -271,6 +284,8 @@ _meson_option_parse() {
--disable-numa) printf "%s" -Dnuma=disabled ;;
--enable-nvmm) printf "%s" -Dnvmm=enabled ;;
--disable-nvmm) printf "%s" -Dnvmm=disabled ;;
--enable-opengl) printf "%s" -Dopengl=enabled ;;
--disable-opengl) printf "%s" -Dopengl=disabled ;;
--enable-oss) printf "%s" -Doss=enabled ;;
--disable-oss) printf "%s" -Doss=disabled ;;
--enable-pa) printf "%s" -Dpa=enabled ;;
@ -281,6 +296,8 @@ _meson_option_parse() {
--disable-png) printf "%s" -Dpng=disabled ;;
--enable-profiler) printf "%s" -Dprofiler=true ;;
--disable-profiler) printf "%s" -Dprofiler=false ;;
--enable-pvrdma) printf "%s" -Dpvrdma=enabled ;;
--disable-pvrdma) printf "%s" -Dpvrdma=disabled ;;
--enable-qcow1) printf "%s" -Dqcow1=enabled ;;
--disable-qcow1) printf "%s" -Dqcow1=disabled ;;
--enable-qed) printf "%s" -Dqed=enabled ;;
@ -291,6 +308,8 @@ _meson_option_parse() {
--disable-qom-cast-debug) printf "%s" -Dqom_cast_debug=false ;;
--enable-rbd) printf "%s" -Drbd=enabled ;;
--disable-rbd) printf "%s" -Drbd=disabled ;;
--enable-rdma) printf "%s" -Drdma=enabled ;;
--disable-rdma) printf "%s" -Drdma=disabled ;;
--enable-replication) printf "%s" -Dreplication=enabled ;;
--disable-replication) printf "%s" -Dreplication=disabled ;;
--enable-rng-none) printf "%s" -Drng_none=true ;;

View File

@ -3551,26 +3551,6 @@ void qemu_init(int argc, char **argv, char **envp)
display_remote++;
break;
#endif
case QEMU_OPTION_writeconfig:
{
FILE *fp;
warn_report("-writeconfig is deprecated and will go away without a replacement");
if (strcmp(optarg, "-") == 0) {
fp = stdout;
} else {
fp = fopen(optarg, "w");
if (fp == NULL) {
error_report("open %s: %s", optarg,
strerror(errno));
exit(1);
}
}
qemu_config_write(fp);
if (fp != stdout) {
fclose(fp);
}
break;
}
case QEMU_OPTION_qtest:
qtest_chrdev = optarg;
break;

View File

@ -2011,25 +2011,23 @@ SSE_HELPER_Q(helper_pcmpgtq, FCMPGTQ)
static inline int pcmp_elen(CPUX86State *env, int reg, uint32_t ctrl)
{
int val;
target_long val, limit;
/* Presence of REX.W is indicated by a bit higher than 7 set */
if (ctrl >> 8) {
val = abs1((int64_t)env->regs[reg]);
val = (target_long)env->regs[reg];
} else {
val = abs1((int32_t)env->regs[reg]);
val = (int32_t)env->regs[reg];
}
if (ctrl & 1) {
if (val > 8) {
return 8;
}
limit = 8;
} else {
if (val > 16) {
return 16;
}
limit = 16;
}
return val;
if ((val > limit) || (val < -limit)) {
return limit;
}
return abs1(val);
}
static inline int pcmp_ilen(Reg *r, uint8_t ctrl)

View File

@ -98,14 +98,13 @@ if dbus_display
endif
dbus_daemon = find_program('dbus-daemon', required: false)
if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN')
if dbus_daemon.found() and gdbus_codegen.found()
# Temporarily disabled due to Patchew failures:
#qtests_i386 += ['dbus-vmstate-test']
dbus_vmstate1 = custom_target('dbus-vmstate description',
output: ['dbus-vmstate1.h', 'dbus-vmstate1.c'],
input: meson.project_source_root() / 'backends/dbus-vmstate1.xml',
command: [config_host['GDBUS_CODEGEN'],
'@INPUT@',
command: [gdbus_codegen, '@INPUT@',
'--interface-prefix', 'org.qemu',
'--generate-c-code', '@BASENAME@']).to_list()
else

View File

@ -1,5 +1,6 @@
softmmu_ss.add(pixman)
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman) # for the include path
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) # for the include path
softmmu_ss.add(files(
'clipboard.c',
@ -43,7 +44,6 @@ vnc_ss.add(zlib, png, jpeg, gnutls)
vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c'))
softmmu_ss.add_all(when: vnc, if_true: vnc_ss)
softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c'))
specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl)
ui_modules = {}
@ -53,17 +53,18 @@ if curses.found()
ui_modules += {'curses' : curses_ss}
endif
if config_host.has_key('CONFIG_OPENGL')
softmmu_ss.add(opengl)
if opengl.found()
opengl_ss = ss.source_set()
opengl_ss.add(gbm)
opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'],
opengl_ss.add(when: [opengl, pixman],
if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
ui_modules += {'opengl' : opengl_ss}
endif
if config_host.has_key('CONFIG_OPENGL') and gbm.found()
if opengl.found() and gbm.found()
egl_headless_ss = ss.source_set()
egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'],
egl_headless_ss.add(when: [opengl, gbm, pixman],
if_true: files('egl-headless.c'))
ui_modules += {'egl-headless' : egl_headless_ss}
endif
@ -73,14 +74,13 @@ if dbus_display
dbus_display1 = custom_target('dbus-display gdbus-codegen',
output: ['dbus-display1.h', 'dbus-display1.c'],
input: files('dbus-display1.xml'),
command: [config_host['GDBUS_CODEGEN'],
'@INPUT@',
command: [gdbus_codegen, '@INPUT@',
'--glib-min-required', '2.64',
'--output-directory', meson.current_build_dir(),
'--interface-prefix', 'org.qemu.',
'--c-namespace', 'QemuDBus',
'--generate-c-code', '@BASENAME@'])
dbus_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'],
dbus_ss.add(when: [gio, pixman, opengl],
if_true: [files(
'dbus-chardev.c',
'dbus-clipboard.c',
@ -98,8 +98,8 @@ if gtk.found()
gtk_ss = ss.source_set()
gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c'))
gtk_ss.add(when: x11, if_true: files('x_keymap.c'))
gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.c'))
gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl.c'))
gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c'))
gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c'))
ui_modules += {'gtk' : gtk_ss}
endif
@ -112,7 +112,7 @@ if sdl.found()
'sdl2-input.c',
'sdl2.c',
))
sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c'))
sdl_ss.add(when: opengl, if_true: files('sdl2-gl.c'))
sdl_ss.add(when: x11, if_true: files('x_keymap.c'))
ui_modules += {'sdl' : sdl_ss}
endif
@ -127,7 +127,7 @@ if spice.found()
ui_modules += {'spice-core' : spice_core_ss}
endif
if spice.found() and config_host.has_key('CONFIG_GIO')
if spice.found() and gio.found()
spice_ss = ss.source_set()
spice_ss.add(spice, gio, pixman, files('spice-app.c'))
ui_modules += {'spice-app': spice_ss}

View File

@ -173,7 +173,7 @@ static char *
real_time_iso8601(void)
{
#if GLIB_CHECK_VERSION(2,62,0)
g_autoptr(GDateTime) dt = g_date_time_new_from_unix_utc(g_get_real_time());
g_autoptr(GDateTime) dt = g_date_time_new_now_utc();
/* ignore deprecation warning, since GLIB_VERSION_MAX_ALLOWED is 2.56 */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

View File

@ -61,7 +61,7 @@ endif
if have_system
util_ss.add(files('crc-ccitt.c'))
util_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus.c'), gio])
util_ss.add(when: gio, if_true: files('dbus.c'))
util_ss.add(when: 'CONFIG_LINUX', if_true: files('userfaultfd.c'))
endif

View File

@ -314,48 +314,6 @@ void qemu_add_opts(QemuOptsList *list)
abort();
}
struct ConfigWriteData {
QemuOptsList *list;
FILE *fp;
};
static int config_write_opt(void *opaque, const char *name, const char *value,
Error **errp)
{
struct ConfigWriteData *data = opaque;
fprintf(data->fp, " %s = \"%s\"\n", name, value);
return 0;
}
static int config_write_opts(void *opaque, QemuOpts *opts, Error **errp)
{
struct ConfigWriteData *data = opaque;
const char *id = qemu_opts_id(opts);
if (id) {
fprintf(data->fp, "[%s \"%s\"]\n", data->list->name, id);
} else {
fprintf(data->fp, "[%s]\n", data->list->name);
}
qemu_opt_foreach(opts, config_write_opt, data, NULL);
fprintf(data->fp, "\n");
return 0;
}
void qemu_config_write(FILE *fp)
{
struct ConfigWriteData data = { .fp = fp };
QemuOptsList **lists = vm_config_groups;
int i;
fprintf(fp, "# qemu config file\n\n");
for (i = 0; lists[i] != NULL; i++) {
data.list = lists[i];
qemu_opts_foreach(data.list, config_write_opts, &data, NULL);
}
}
/* Returns number of config groups on success, -errno on error */
static int qemu_config_foreach(FILE *fp, QEMUConfigCB *cb, void *opaque,
const char *fname, Error **errp)