* WHPX support for xcr0
* qga-wss fixes * Meson conversions * Removed -soundhw pcspk -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJ2CEcUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroMHUAgAq6BXpuqyAMMnrylvt77qwGG37keV lxw8aGciztUJIZFi1dAxIuw2ohsFGdfxKKt1sEIUu33OSBeb1I786f2xuLF7t7Am An0Jd5I/V/9ClRrz2ITiLOCBzPTU3faY8h382OdnMJCkAFjjF5PIoECZWRBtjPVq B4jDKuredgCt4EGDViQr0R5om+bBdHQmHcPHTNIv3UsRu2RhzIieBy4qLBUADIMU wJeW0jIdtfE9gwfdjtdom1tDxxKNtYttyIAQY8SpSEGLHzpqfNW0Z3UFGcswIk8g QCJpsddJzKivvS3a8pm/3tKkSWmqcgGNH2b3CFEZ26MkkLZIOYiVmPGNqQ== =7/z9 -----END PGP SIGNATURE----- Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * WHPX support for xcr0 * qga-wss fixes * Meson conversions * Removed -soundhw pcspk # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJ2CEcUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroMHUAgAq6BXpuqyAMMnrylvt77qwGG37keV # lxw8aGciztUJIZFi1dAxIuw2ohsFGdfxKKt1sEIUu33OSBeb1I786f2xuLF7t7Am # An0Jd5I/V/9ClRrz2ITiLOCBzPTU3faY8h382OdnMJCkAFjjF5PIoECZWRBtjPVq # B4jDKuredgCt4EGDViQr0R5om+bBdHQmHcPHTNIv3UsRu2RhzIieBy4qLBUADIMU # wJeW0jIdtfE9gwfdjtdom1tDxxKNtYttyIAQY8SpSEGLHzpqfNW0Z3UFGcswIk8g # QCJpsddJzKivvS3a8pm/3tKkSWmqcgGNH2b3CFEZ26MkkLZIOYiVmPGNqQ== # =7/z9 # -----END PGP SIGNATURE----- # gpg: Signature made Sat 07 May 2022 12:48:55 AM CDT # 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: (25 commits) pc: remove -soundhw pcspk configure, meson: move vhost options to Meson meson: use have_vhost_* variables to pick sources meson: create have_vhost_* variables build: move vhost-user-fs configuration to Kconfig build: move vhost-scsi configuration to Kconfig build: move vhost-vsock configuration to Kconfig configure: simplify vhost-net-{user, vdpa} configuration meson, virtio: place all virtio-pci devices under virtio_pci_ss configure: omit options with default values from meson command line meson: pass more options directly as -D configure: switch directory options to automatic parsing meson: always combine directories with prefix meson, configure: move --interp-prefix to meson meson, configure: move --with-pkgversion, CONFIG_STAMP to meson meson, configure: move bdrv whitelists to meson meson, configure: move --tls-priority to meson configure: switch string options to automatic parsing configure: move Windows flags detection to meson configure, meson: move iasl detection to meson ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
commit
f133664915
@ -22,15 +22,12 @@ config TPM
|
|||||||
|
|
||||||
config VHOST_USER
|
config VHOST_USER
|
||||||
bool
|
bool
|
||||||
select VHOST
|
|
||||||
|
|
||||||
config VHOST_VDPA
|
config VHOST_VDPA
|
||||||
bool
|
bool
|
||||||
select VHOST
|
|
||||||
|
|
||||||
config VHOST_KERNEL
|
config VHOST_KERNEL
|
||||||
bool
|
bool
|
||||||
select VHOST
|
|
||||||
|
|
||||||
config VIRTFS
|
config VIRTFS
|
||||||
bool
|
bool
|
||||||
|
@ -12,9 +12,13 @@ softmmu_ss.add([files(
|
|||||||
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
|
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
|
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
|
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'))
|
if have_vhost_user
|
||||||
|
softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c'))
|
||||||
|
endif
|
||||||
softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.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'))
|
if have_vhost_user_crypto
|
||||||
|
softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost-user.c'))
|
||||||
|
endif
|
||||||
softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
|
softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
|
softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
|
||||||
|
|
||||||
|
673
configure
vendored
673
configure
vendored
@ -224,10 +224,6 @@ glob() {
|
|||||||
eval test -z '"${1#'"$2"'}"'
|
eval test -z '"${1#'"$2"'}"'
|
||||||
}
|
}
|
||||||
|
|
||||||
ld_has() {
|
|
||||||
$ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
|
if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
|
||||||
then
|
then
|
||||||
error_exit "main directory cannot contain spaces nor colons"
|
error_exit "main directory cannot contain spaces nor colons"
|
||||||
@ -235,16 +231,10 @@ fi
|
|||||||
|
|
||||||
# default parameters
|
# default parameters
|
||||||
cpu=""
|
cpu=""
|
||||||
iasl="iasl"
|
|
||||||
interp_prefix="/usr/gnemul/qemu-%M"
|
|
||||||
static="no"
|
static="no"
|
||||||
cross_compile="no"
|
cross_compile="no"
|
||||||
cross_prefix=""
|
cross_prefix=""
|
||||||
audio_drv_list="default"
|
|
||||||
block_drv_rw_whitelist=""
|
|
||||||
block_drv_ro_whitelist=""
|
|
||||||
host_cc="cc"
|
host_cc="cc"
|
||||||
lto="false"
|
|
||||||
stack_protector=""
|
stack_protector=""
|
||||||
safe_stack=""
|
safe_stack=""
|
||||||
use_containers="yes"
|
use_containers="yes"
|
||||||
@ -292,22 +282,10 @@ EXTRA_CXXFLAGS=""
|
|||||||
EXTRA_OBJCFLAGS=""
|
EXTRA_OBJCFLAGS=""
|
||||||
EXTRA_LDFLAGS=""
|
EXTRA_LDFLAGS=""
|
||||||
|
|
||||||
xen_ctrl_version="$default_feature"
|
|
||||||
vhost_kernel="$default_feature"
|
|
||||||
vhost_net="$default_feature"
|
|
||||||
vhost_crypto="$default_feature"
|
|
||||||
vhost_scsi="$default_feature"
|
|
||||||
vhost_vsock="$default_feature"
|
|
||||||
vhost_user="no"
|
|
||||||
vhost_user_fs="$default_feature"
|
|
||||||
vhost_vdpa="$default_feature"
|
|
||||||
debug_info="yes"
|
|
||||||
debug_tcg="no"
|
debug_tcg="no"
|
||||||
debug="no"
|
|
||||||
sanitizers="no"
|
sanitizers="no"
|
||||||
tsan="no"
|
tsan="no"
|
||||||
fortify_source="yes"
|
fortify_source="yes"
|
||||||
gcov="no"
|
|
||||||
EXESUF=""
|
EXESUF=""
|
||||||
modules="no"
|
modules="no"
|
||||||
prefix="/usr/local"
|
prefix="/usr/local"
|
||||||
@ -315,15 +293,13 @@ qemu_suffix="qemu"
|
|||||||
softmmu="yes"
|
softmmu="yes"
|
||||||
linux_user=""
|
linux_user=""
|
||||||
bsd_user=""
|
bsd_user=""
|
||||||
pkgversion=""
|
|
||||||
pie=""
|
pie=""
|
||||||
trace_file="trace"
|
|
||||||
coroutine=""
|
coroutine=""
|
||||||
tls_priority="NORMAL"
|
|
||||||
plugins="$default_feature"
|
plugins="$default_feature"
|
||||||
meson=""
|
meson=""
|
||||||
meson_args=""
|
meson_args=""
|
||||||
ninja=""
|
ninja=""
|
||||||
|
bindir="bin"
|
||||||
skip_meson=no
|
skip_meson=no
|
||||||
|
|
||||||
# The following Meson options are handled manually (still they
|
# The following Meson options are handled manually (still they
|
||||||
@ -339,16 +315,10 @@ else
|
|||||||
fi
|
fi
|
||||||
fdt="auto"
|
fdt="auto"
|
||||||
|
|
||||||
# 2. Support --with/--without option
|
# 2. Automatically enable/disable other options
|
||||||
default_devices="true"
|
|
||||||
|
|
||||||
# 3. Automatically enable/disable other options
|
|
||||||
tcg="enabled"
|
tcg="enabled"
|
||||||
cfi="false"
|
cfi="false"
|
||||||
|
|
||||||
# 4. Detection partly done in configure
|
|
||||||
xen=${default_feature:+disabled}
|
|
||||||
|
|
||||||
# parse CC options second
|
# parse CC options second
|
||||||
for opt do
|
for opt do
|
||||||
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
|
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
|
||||||
@ -415,6 +385,7 @@ ranlib="${RANLIB-${cross_prefix}ranlib}"
|
|||||||
nm="${NM-${cross_prefix}nm}"
|
nm="${NM-${cross_prefix}nm}"
|
||||||
smbd="$SMBD"
|
smbd="$SMBD"
|
||||||
strip="${STRIP-${cross_prefix}strip}"
|
strip="${STRIP-${cross_prefix}strip}"
|
||||||
|
widl="${WIDL-${cross_prefix}widl}"
|
||||||
windres="${WINDRES-${cross_prefix}windres}"
|
windres="${WINDRES-${cross_prefix}windres}"
|
||||||
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
||||||
query_pkg_config() {
|
query_pkg_config() {
|
||||||
@ -551,7 +522,6 @@ haiku)
|
|||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
linux="yes"
|
linux="yes"
|
||||||
vhost_user=${default_feature:-yes}
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -685,6 +655,7 @@ if test "$mingw32" = "yes" ; then
|
|||||||
CONFIGURE_CFLAGS="-mthreads $CONFIGURE_CFLAGS"
|
CONFIGURE_CFLAGS="-mthreads $CONFIGURE_CFLAGS"
|
||||||
write_c_skeleton;
|
write_c_skeleton;
|
||||||
prefix="/qemu"
|
prefix="/qemu"
|
||||||
|
bindir=""
|
||||||
qemu_suffix=""
|
qemu_suffix=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -693,6 +664,9 @@ werror=""
|
|||||||
. $source_path/scripts/meson-buildoptions.sh
|
. $source_path/scripts/meson-buildoptions.sh
|
||||||
|
|
||||||
meson_options=
|
meson_options=
|
||||||
|
meson_option_add() {
|
||||||
|
meson_options="$meson_options $(quote_sh "$1")"
|
||||||
|
}
|
||||||
meson_option_parse() {
|
meson_option_parse() {
|
||||||
meson_options="$meson_options $(_meson_option_parse "$@")"
|
meson_options="$meson_options $(_meson_option_parse "$@")"
|
||||||
if test $? -eq 1; then
|
if test $? -eq 1; then
|
||||||
@ -711,8 +685,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--prefix=*) prefix="$optarg"
|
--prefix=*) prefix="$optarg"
|
||||||
;;
|
;;
|
||||||
--interp-prefix=*) interp_prefix="$optarg"
|
|
||||||
;;
|
|
||||||
--cross-prefix=*)
|
--cross-prefix=*)
|
||||||
;;
|
;;
|
||||||
--cc=*)
|
--cc=*)
|
||||||
@ -721,8 +693,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--cxx=*)
|
--cxx=*)
|
||||||
;;
|
;;
|
||||||
--iasl=*) iasl="$optarg"
|
|
||||||
;;
|
|
||||||
--objcc=*) objcc="$optarg"
|
--objcc=*) objcc="$optarg"
|
||||||
;;
|
;;
|
||||||
--make=*) make="$optarg"
|
--make=*) make="$optarg"
|
||||||
@ -731,8 +701,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--python=*) python="$optarg" ; explicit_python=yes
|
--python=*) python="$optarg" ; explicit_python=yes
|
||||||
;;
|
;;
|
||||||
--sphinx-build=*) sphinx_build="$optarg"
|
|
||||||
;;
|
|
||||||
--skip-meson) skip_meson=yes
|
--skip-meson) skip_meson=yes
|
||||||
;;
|
;;
|
||||||
--meson=*) meson="$optarg"
|
--meson=*) meson="$optarg"
|
||||||
@ -751,9 +719,9 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--cross-cc-*)
|
--cross-cc-*)
|
||||||
;;
|
;;
|
||||||
--enable-debug-info) debug_info="yes"
|
--enable-debug-info) meson_option_add -Ddebug=true
|
||||||
;;
|
;;
|
||||||
--disable-debug-info) debug_info="no"
|
--disable-debug-info) meson_option_add -Ddebug=false
|
||||||
;;
|
;;
|
||||||
--enable-modules)
|
--enable-modules)
|
||||||
modules="yes"
|
modules="yes"
|
||||||
@ -773,11 +741,9 @@ for opt do
|
|||||||
error_exit "Can't mix --target-list-exclude with --target-list"
|
error_exit "Can't mix --target-list-exclude with --target-list"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
--with-trace-file=*) trace_file="$optarg"
|
--with-default-devices) meson_option_add -Ddefault_devices=true
|
||||||
;;
|
;;
|
||||||
--with-default-devices) default_devices="true"
|
--without-default-devices) meson_option_add -Ddefault_devices=false
|
||||||
;;
|
|
||||||
--without-default-devices) default_devices="false"
|
|
||||||
;;
|
;;
|
||||||
--with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
|
--with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
|
||||||
;;
|
;;
|
||||||
@ -793,36 +759,14 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--without-default-features) # processed above
|
--without-default-features) # processed above
|
||||||
;;
|
;;
|
||||||
--enable-gcov) gcov="yes"
|
|
||||||
;;
|
|
||||||
--static)
|
--static)
|
||||||
static="yes"
|
static="yes"
|
||||||
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
|
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
|
||||||
;;
|
;;
|
||||||
--mandir=*) mandir="$optarg"
|
|
||||||
;;
|
|
||||||
--bindir=*) bindir="$optarg"
|
--bindir=*) bindir="$optarg"
|
||||||
;;
|
;;
|
||||||
--libdir=*) libdir="$optarg"
|
|
||||||
;;
|
|
||||||
--libexecdir=*) libexecdir="$optarg"
|
|
||||||
;;
|
|
||||||
--includedir=*) includedir="$optarg"
|
|
||||||
;;
|
|
||||||
--datadir=*) datadir="$optarg"
|
|
||||||
;;
|
|
||||||
--with-suffix=*) qemu_suffix="$optarg"
|
--with-suffix=*) qemu_suffix="$optarg"
|
||||||
;;
|
;;
|
||||||
--docdir=*) docdir="$optarg"
|
|
||||||
;;
|
|
||||||
--localedir=*) localedir="$optarg"
|
|
||||||
;;
|
|
||||||
--sysconfdir=*) sysconfdir="$optarg"
|
|
||||||
;;
|
|
||||||
--localstatedir=*) local_statedir="$optarg"
|
|
||||||
;;
|
|
||||||
--firmwarepath=*) firmwarepath="$optarg"
|
|
||||||
;;
|
|
||||||
--host=*|--build=*|\
|
--host=*|--build=*|\
|
||||||
--disable-dependency-tracking|\
|
--disable-dependency-tracking|\
|
||||||
--sbindir=*|--sharedstatedir=*|\
|
--sbindir=*|--sharedstatedir=*|\
|
||||||
@ -833,12 +777,6 @@ for opt do
|
|||||||
# configure to be used by RPM and similar macros that set
|
# configure to be used by RPM and similar macros that set
|
||||||
# lots of directory switches by default.
|
# lots of directory switches by default.
|
||||||
;;
|
;;
|
||||||
--audio-drv-list=*) audio_drv_list="$optarg"
|
|
||||||
;;
|
|
||||||
--block-drv-rw-whitelist=*|--block-drv-whitelist=*) block_drv_rw_whitelist=$(echo "$optarg" | sed -e 's/,/ /g')
|
|
||||||
;;
|
|
||||||
--block-drv-ro-whitelist=*) block_drv_ro_whitelist=$(echo "$optarg" | sed -e 's/,/ /g')
|
|
||||||
;;
|
|
||||||
--enable-debug-tcg) debug_tcg="yes"
|
--enable-debug-tcg) debug_tcg="yes"
|
||||||
;;
|
;;
|
||||||
--disable-debug-tcg) debug_tcg="no"
|
--disable-debug-tcg) debug_tcg="no"
|
||||||
@ -847,7 +785,7 @@ for opt do
|
|||||||
# Enable debugging options that aren't excessively noisy
|
# Enable debugging options that aren't excessively noisy
|
||||||
debug_tcg="yes"
|
debug_tcg="yes"
|
||||||
meson_option_parse --enable-debug-mutex ""
|
meson_option_parse --enable-debug-mutex ""
|
||||||
debug="yes"
|
meson_option_add -Doptimization=0
|
||||||
fortify_source="no"
|
fortify_source="no"
|
||||||
;;
|
;;
|
||||||
--enable-sanitizers) sanitizers="yes"
|
--enable-sanitizers) sanitizers="yes"
|
||||||
@ -866,10 +804,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-slirp=*) slirp="$optarg"
|
--enable-slirp=*) slirp="$optarg"
|
||||||
;;
|
;;
|
||||||
--disable-xen) xen="disabled"
|
|
||||||
;;
|
|
||||||
--enable-xen) xen="enabled"
|
|
||||||
;;
|
|
||||||
--disable-tcg) tcg="disabled"
|
--disable-tcg) tcg="disabled"
|
||||||
plugins="no"
|
plugins="no"
|
||||||
;;
|
;;
|
||||||
@ -900,10 +834,6 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--disable-werror) werror="no"
|
--disable-werror) werror="no"
|
||||||
;;
|
;;
|
||||||
--enable-lto) lto="true"
|
|
||||||
;;
|
|
||||||
--disable-lto) lto="false"
|
|
||||||
;;
|
|
||||||
--enable-stack-protector) stack_protector="yes"
|
--enable-stack-protector) stack_protector="yes"
|
||||||
;;
|
;;
|
||||||
--disable-stack-protector) stack_protector="no"
|
--disable-stack-protector) stack_protector="no"
|
||||||
@ -914,7 +844,7 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-cfi)
|
--enable-cfi)
|
||||||
cfi="true";
|
cfi="true";
|
||||||
lto="true";
|
meson_option_add -Db_lto=true
|
||||||
;;
|
;;
|
||||||
--disable-cfi) cfi="false"
|
--disable-cfi) cfi="false"
|
||||||
;;
|
;;
|
||||||
@ -926,30 +856,8 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-fdt=*) fdt="$optarg"
|
--enable-fdt=*) fdt="$optarg"
|
||||||
;;
|
;;
|
||||||
--with-pkgversion=*) pkgversion="$optarg"
|
|
||||||
;;
|
|
||||||
--with-coroutine=*) coroutine="$optarg"
|
--with-coroutine=*) coroutine="$optarg"
|
||||||
;;
|
;;
|
||||||
--disable-vhost-net) vhost_net="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-net) vhost_net="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-crypto) vhost_crypto="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-crypto) vhost_crypto="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-scsi) vhost_scsi="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-scsi) vhost_scsi="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-vsock) vhost_vsock="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-vsock) vhost_vsock="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-user-fs) vhost_user_fs="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-user-fs) vhost_user_fs="yes"
|
|
||||||
;;
|
|
||||||
--disable-zlib-test)
|
--disable-zlib-test)
|
||||||
;;
|
;;
|
||||||
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
|
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
|
||||||
@ -961,20 +869,6 @@ for opt do
|
|||||||
--enable-uuid|--disable-uuid)
|
--enable-uuid|--disable-uuid)
|
||||||
echo "$0: $opt is obsolete, UUID support is always built" >&2
|
echo "$0: $opt is obsolete, UUID support is always built" >&2
|
||||||
;;
|
;;
|
||||||
--tls-priority=*) tls_priority="$optarg"
|
|
||||||
;;
|
|
||||||
--disable-vhost-user) vhost_user="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-user) vhost_user="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-vdpa) vhost_vdpa="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-vdpa) vhost_vdpa="yes"
|
|
||||||
;;
|
|
||||||
--disable-vhost-kernel) vhost_kernel="no"
|
|
||||||
;;
|
|
||||||
--enable-vhost-kernel) vhost_kernel="yes"
|
|
||||||
;;
|
|
||||||
--disable-capstone) capstone="disabled"
|
--disable-capstone) capstone="disabled"
|
||||||
;;
|
;;
|
||||||
--enable-capstone) capstone="enabled"
|
--enable-capstone) capstone="enabled"
|
||||||
@ -1012,12 +906,7 @@ for opt do
|
|||||||
--enable-jemalloc) meson_option_parse --enable-malloc=jemalloc jemalloc
|
--enable-jemalloc) meson_option_parse --enable-malloc=jemalloc jemalloc
|
||||||
;;
|
;;
|
||||||
# everything else has the same name in configure and meson
|
# everything else has the same name in configure and meson
|
||||||
--enable-* | --disable-*) meson_option_parse "$opt" "$optarg"
|
--*) meson_option_parse "$opt" "$optarg"
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "ERROR: unknown option $opt"
|
|
||||||
echo "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -1064,23 +953,6 @@ case $git_submodules_action in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
libdir="${libdir:-$prefix/lib}"
|
|
||||||
libexecdir="${libexecdir:-$prefix/libexec}"
|
|
||||||
includedir="${includedir:-$prefix/include}"
|
|
||||||
|
|
||||||
if test "$mingw32" = "yes" ; then
|
|
||||||
bindir="${bindir:-$prefix}"
|
|
||||||
else
|
|
||||||
bindir="${bindir:-$prefix/bin}"
|
|
||||||
fi
|
|
||||||
mandir="${mandir:-$prefix/share/man}"
|
|
||||||
datadir="${datadir:-$prefix/share}"
|
|
||||||
docdir="${docdir:-$prefix/share/doc}"
|
|
||||||
sysconfdir="${sysconfdir:-$prefix/etc}"
|
|
||||||
local_statedir="${local_statedir:-$prefix/var}"
|
|
||||||
firmwarepath="${firmwarepath:-$datadir/qemu-firmware}"
|
|
||||||
localedir="${localedir:-$datadir/locale}"
|
|
||||||
|
|
||||||
if eval test -z "\${cross_cc_$cpu}"; then
|
if eval test -z "\${cross_cc_$cpu}"; then
|
||||||
eval "cross_cc_${cpu}=\$cc"
|
eval "cross_cc_${cpu}=\$cc"
|
||||||
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
|
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
|
||||||
@ -1130,8 +1002,6 @@ Options: [defaults in brackets after descriptions]
|
|||||||
Standard options:
|
Standard options:
|
||||||
--help print this message
|
--help print this message
|
||||||
--prefix=PREFIX install in PREFIX [$prefix]
|
--prefix=PREFIX install in PREFIX [$prefix]
|
||||||
--interp-prefix=PREFIX where to find shared libraries, etc.
|
|
||||||
use %M for cpu name [$interp_prefix]
|
|
||||||
--target-list=LIST set target list (default: build all)
|
--target-list=LIST set target list (default: build all)
|
||||||
$(echo Available targets: $default_target_list | \
|
$(echo Available targets: $default_target_list | \
|
||||||
fold -s -w 53 | sed -e 's/^/ /')
|
fold -s -w 53 | sed -e 's/^/ /')
|
||||||
@ -1140,7 +1010,6 @@ $(echo Available targets: $default_target_list | \
|
|||||||
Advanced options (experts only):
|
Advanced options (experts only):
|
||||||
--cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
|
--cross-prefix=PREFIX use PREFIX for compile tools, PREFIX can be blank [$cross_prefix]
|
||||||
--cc=CC use C compiler CC [$cc]
|
--cc=CC use C compiler CC [$cc]
|
||||||
--iasl=IASL use ACPI compiler IASL [$iasl]
|
|
||||||
--host-cc=CC use C compiler CC [$host_cc] for code run at
|
--host-cc=CC use C compiler CC [$host_cc] for code run at
|
||||||
build time
|
build time
|
||||||
--cxx=CXX use C++ compiler CXX [$cxx]
|
--cxx=CXX use C++ compiler CXX [$cxx]
|
||||||
@ -1153,7 +1022,6 @@ Advanced options (experts only):
|
|||||||
--cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
|
--cross-cc-cflags-ARCH= use compiler flags when building ARCH guest tests
|
||||||
--make=MAKE use specified make [$make]
|
--make=MAKE use specified make [$make]
|
||||||
--python=PYTHON use specified python [$python]
|
--python=PYTHON use specified python [$python]
|
||||||
--sphinx-build=SPHINX use specified sphinx-build [$sphinx_build]
|
|
||||||
--meson=MESON use specified meson [$meson]
|
--meson=MESON use specified meson [$meson]
|
||||||
--ninja=NINJA use specified ninja [$ninja]
|
--ninja=NINJA use specified ninja [$ninja]
|
||||||
--smbd=SMBD use specified smbd [$smbd]
|
--smbd=SMBD use specified smbd [$smbd]
|
||||||
@ -1162,19 +1030,9 @@ Advanced options (experts only):
|
|||||||
--with-git-submodules=validate fail if git submodules are not up to date
|
--with-git-submodules=validate fail if git submodules are not up to date
|
||||||
--with-git-submodules=ignore do not update or check git submodules (default if no .git dir)
|
--with-git-submodules=ignore do not update or check git submodules (default if no .git dir)
|
||||||
--static enable static build [$static]
|
--static enable static build [$static]
|
||||||
--mandir=PATH install man pages in PATH
|
|
||||||
--datadir=PATH install firmware in PATH/$qemu_suffix
|
|
||||||
--localedir=PATH install translation in PATH/$qemu_suffix
|
|
||||||
--docdir=PATH install documentation in PATH/$qemu_suffix
|
|
||||||
--bindir=PATH install binaries in PATH
|
--bindir=PATH install binaries in PATH
|
||||||
--libdir=PATH install libraries in PATH
|
|
||||||
--libexecdir=PATH install helper binaries in PATH
|
|
||||||
--sysconfdir=PATH install config in PATH/$qemu_suffix
|
|
||||||
--localstatedir=PATH install local state in PATH (set at runtime on win32)
|
|
||||||
--firmwarepath=PATH search PATH for firmware files
|
|
||||||
--efi-aarch64=PATH PATH of efi file to use for aarch64 VMs.
|
--efi-aarch64=PATH PATH of efi file to use for aarch64 VMs.
|
||||||
--with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix]
|
--with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix]
|
||||||
--with-pkgversion=VERS use specified string as sub-version of the package
|
|
||||||
--without-default-features default all --enable-* options to "disabled"
|
--without-default-features default all --enable-* options to "disabled"
|
||||||
--without-default-devices do not include any device that is not needed to
|
--without-default-devices do not include any device that is not needed to
|
||||||
start the emulator (only use if you are including
|
start the emulator (only use if you are including
|
||||||
@ -1187,19 +1045,11 @@ Advanced options (experts only):
|
|||||||
--disable-stack-protector disable compiler-provided stack protection
|
--disable-stack-protector disable compiler-provided stack protection
|
||||||
--audio-drv-list=LIST set audio drivers to try if -audiodev is not used
|
--audio-drv-list=LIST set audio drivers to try if -audiodev is not used
|
||||||
--block-drv-whitelist=L Same as --block-drv-rw-whitelist=L
|
--block-drv-whitelist=L Same as --block-drv-rw-whitelist=L
|
||||||
--block-drv-rw-whitelist=L
|
|
||||||
set block driver read-write whitelist
|
|
||||||
(by default affects only QEMU, not tools like qemu-img)
|
|
||||||
--block-drv-ro-whitelist=L
|
|
||||||
set block driver read-only whitelist
|
|
||||||
(by default affects only QEMU, not tools like qemu-img)
|
|
||||||
--with-trace-file=NAME Full PATH,NAME of file to store traces
|
--with-trace-file=NAME Full PATH,NAME of file to store traces
|
||||||
Default:trace-<pid>
|
Default:trace-<pid>
|
||||||
--cpu=CPU Build for host CPU [$cpu]
|
--cpu=CPU Build for host CPU [$cpu]
|
||||||
--with-coroutine=BACKEND coroutine backend. Supported options:
|
--with-coroutine=BACKEND coroutine backend. Supported options:
|
||||||
ucontext, sigaltstack, windows
|
ucontext, sigaltstack, windows
|
||||||
--enable-gcov enable test coverage analysis with gcov
|
|
||||||
--tls-priority default TLS protocol/cipher priority string
|
|
||||||
--enable-plugins
|
--enable-plugins
|
||||||
enable plugins via shared library loading
|
enable plugins via shared library loading
|
||||||
--disable-containers don't use containers for cross-building
|
--disable-containers don't use containers for cross-building
|
||||||
@ -1215,16 +1065,8 @@ cat << EOF
|
|||||||
modules modules support (non-Windows)
|
modules modules support (non-Windows)
|
||||||
debug-tcg TCG debugging (default is disabled)
|
debug-tcg TCG debugging (default is disabled)
|
||||||
debug-info debugging information
|
debug-info debugging information
|
||||||
lto Enable Link-Time Optimization.
|
|
||||||
safe-stack SafeStack Stack Smash Protection. Depends on
|
safe-stack SafeStack Stack Smash Protection. Depends on
|
||||||
clang/llvm >= 3.7 and requires coroutine backend ucontext.
|
clang/llvm >= 3.7 and requires coroutine backend ucontext.
|
||||||
vhost-net vhost-net kernel acceleration support
|
|
||||||
vhost-vsock virtio sockets device support
|
|
||||||
vhost-scsi vhost-scsi kernel target support
|
|
||||||
vhost-crypto vhost-user-crypto backend support
|
|
||||||
vhost-kernel vhost kernel backend support
|
|
||||||
vhost-user vhost-user backend support
|
|
||||||
vhost-vdpa vhost-vdpa kernel backend support
|
|
||||||
|
|
||||||
NOTE: The object files are built at the place where configure is launched
|
NOTE: The object files are built at the place where configure is launched
|
||||||
EOF
|
EOF
|
||||||
@ -1638,58 +1480,6 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################################
|
|
||||||
# vhost interdependencies and host support
|
|
||||||
|
|
||||||
# vhost backends
|
|
||||||
if test "$vhost_user" = "yes" && test "$mingw32" = "yes"; then
|
|
||||||
error_exit "vhost-user is not available on Windows"
|
|
||||||
fi
|
|
||||||
test "$vhost_vdpa" = "" && vhost_vdpa=$linux
|
|
||||||
if test "$vhost_vdpa" = "yes" && test "$linux" != "yes"; then
|
|
||||||
error_exit "vhost-vdpa is only available on Linux"
|
|
||||||
fi
|
|
||||||
test "$vhost_kernel" = "" && vhost_kernel=$linux
|
|
||||||
if test "$vhost_kernel" = "yes" && test "$linux" != "yes"; then
|
|
||||||
error_exit "vhost-kernel is only available on Linux"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vhost-kernel devices
|
|
||||||
test "$vhost_scsi" = "" && vhost_scsi=$vhost_kernel
|
|
||||||
if test "$vhost_scsi" = "yes" && test "$vhost_kernel" != "yes"; then
|
|
||||||
error_exit "--enable-vhost-scsi requires --enable-vhost-kernel"
|
|
||||||
fi
|
|
||||||
test "$vhost_vsock" = "" && vhost_vsock=$vhost_kernel
|
|
||||||
if test "$vhost_vsock" = "yes" && test "$vhost_kernel" != "yes"; then
|
|
||||||
error_exit "--enable-vhost-vsock requires --enable-vhost-kernel"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# vhost-user backends
|
|
||||||
test "$vhost_net_user" = "" && vhost_net_user=$vhost_user
|
|
||||||
if test "$vhost_net_user" = "yes" && test "$vhost_user" = "no"; then
|
|
||||||
error_exit "--enable-vhost-net-user requires --enable-vhost-user"
|
|
||||||
fi
|
|
||||||
test "$vhost_crypto" = "" && vhost_crypto=$vhost_user
|
|
||||||
if test "$vhost_crypto" = "yes" && test "$vhost_user" = "no"; then
|
|
||||||
error_exit "--enable-vhost-crypto requires --enable-vhost-user"
|
|
||||||
fi
|
|
||||||
test "$vhost_user_fs" = "" && vhost_user_fs=$vhost_user
|
|
||||||
if test "$vhost_user_fs" = "yes" && test "$vhost_user" = "no"; then
|
|
||||||
error_exit "--enable-vhost-user-fs requires --enable-vhost-user"
|
|
||||||
fi
|
|
||||||
#vhost-vdpa backends
|
|
||||||
test "$vhost_net_vdpa" = "" && vhost_net_vdpa=$vhost_vdpa
|
|
||||||
if test "$vhost_net_vdpa" = "yes" && test "$vhost_vdpa" = "no"; then
|
|
||||||
error_exit "--enable-vhost-net-vdpa requires --enable-vhost-vdpa"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity
|
|
||||||
if test "$vhost_net" = ""; then
|
|
||||||
test "$vhost_net_user" = "yes" && vhost_net=yes
|
|
||||||
test "$vhost_net_vdpa" = "yes" && vhost_net=yes
|
|
||||||
test "$vhost_kernel" = "yes" && vhost_net=yes
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# pkg-config probe
|
# pkg-config probe
|
||||||
|
|
||||||
@ -1697,312 +1487,6 @@ if ! has "$pkg_config_exe"; then
|
|||||||
error_exit "pkg-config binary '$pkg_config_exe' not found"
|
error_exit "pkg-config binary '$pkg_config_exe' not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# xen probe
|
|
||||||
|
|
||||||
if test "$xen" != "disabled" ; then
|
|
||||||
# Check whether Xen library path is specified via --extra-ldflags to avoid
|
|
||||||
# overriding this setting with pkg-config output. If not, try pkg-config
|
|
||||||
# to obtain all needed flags.
|
|
||||||
|
|
||||||
if ! echo $EXTRA_LDFLAGS | grep tools/libxc > /dev/null && \
|
|
||||||
$pkg_config --exists xencontrol ; then
|
|
||||||
xen_ctrl_version="$(printf '%d%02d%02d' \
|
|
||||||
$($pkg_config --modversion xencontrol | sed 's/\./ /g') )"
|
|
||||||
xen=enabled
|
|
||||||
xen_pc="xencontrol xenstore xenforeignmemory xengnttab"
|
|
||||||
xen_pc="$xen_pc xenevtchn xendevicemodel"
|
|
||||||
if $pkg_config --exists xentoolcore; then
|
|
||||||
xen_pc="$xen_pc xentoolcore"
|
|
||||||
fi
|
|
||||||
xen_cflags="$($pkg_config --cflags $xen_pc)"
|
|
||||||
xen_libs="$($pkg_config --libs $xen_pc)"
|
|
||||||
else
|
|
||||||
|
|
||||||
xen_libs="-lxenstore -lxenctrl"
|
|
||||||
xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
|
|
||||||
|
|
||||||
# First we test whether Xen headers and libraries are available.
|
|
||||||
# If no, we are done and there is no Xen support.
|
|
||||||
# If yes, more tests are run to detect the Xen version.
|
|
||||||
|
|
||||||
# Xen (any)
|
|
||||||
cat > $TMPC <<EOF
|
|
||||||
#include <xenctrl.h>
|
|
||||||
int main(void) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
if ! compile_prog "" "$xen_libs" ; then
|
|
||||||
# Xen not found
|
|
||||||
if test "$xen" = "enabled" ; then
|
|
||||||
feature_not_found "xen" "Install xen devel"
|
|
||||||
fi
|
|
||||||
xen=disabled
|
|
||||||
|
|
||||||
# Xen unstable
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
|
||||||
#define __XEN_TOOLS__
|
|
||||||
#include <xendevicemodel.h>
|
|
||||||
#include <xenforeignmemory.h>
|
|
||||||
int main(void) {
|
|
||||||
xendevicemodel_handle *xd;
|
|
||||||
xenforeignmemory_handle *xfmem;
|
|
||||||
|
|
||||||
xd = xendevicemodel_open(0, 0);
|
|
||||||
xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
xfmem = xenforeignmemory_open(0, 0);
|
|
||||||
xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxentoolcore"
|
|
||||||
then
|
|
||||||
xen_stable_libs="-lxendevicemodel $xen_stable_libs -lxentoolcore"
|
|
||||||
xen_ctrl_version=41100
|
|
||||||
xen=enabled
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
|
||||||
#include <xenforeignmemory.h>
|
|
||||||
#include <xentoolcore.h>
|
|
||||||
int main(void) {
|
|
||||||
xenforeignmemory_handle *xfmem;
|
|
||||||
|
|
||||||
xfmem = xenforeignmemory_open(0, 0);
|
|
||||||
xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0);
|
|
||||||
xentoolcore_restrict_all(0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxentoolcore"
|
|
||||||
then
|
|
||||||
xen_stable_libs="-lxendevicemodel $xen_stable_libs -lxentoolcore"
|
|
||||||
xen_ctrl_version=41000
|
|
||||||
xen=enabled
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
|
||||||
#define __XEN_TOOLS__
|
|
||||||
#include <xendevicemodel.h>
|
|
||||||
int main(void) {
|
|
||||||
xendevicemodel_handle *xd;
|
|
||||||
|
|
||||||
xd = xendevicemodel_open(0, 0);
|
|
||||||
xendevicemodel_close(xd);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
|
|
||||||
then
|
|
||||||
xen_stable_libs="-lxendevicemodel $xen_stable_libs"
|
|
||||||
xen_ctrl_version=40900
|
|
||||||
xen=enabled
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
/*
|
|
||||||
* If we have stable libs the we don't want the libxc compat
|
|
||||||
* layers, regardless of what CFLAGS we may have been given.
|
|
||||||
*
|
|
||||||
* Also, check if xengnttab_grant_copy_segment_t is defined and
|
|
||||||
* grant copy operation is implemented.
|
|
||||||
*/
|
|
||||||
#undef XC_WANT_COMPAT_EVTCHN_API
|
|
||||||
#undef XC_WANT_COMPAT_GNTTAB_API
|
|
||||||
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
|
||||||
#include <xenctrl.h>
|
|
||||||
#include <xenstore.h>
|
|
||||||
#include <xenevtchn.h>
|
|
||||||
#include <xengnttab.h>
|
|
||||||
#include <xenforeignmemory.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <xen/hvm/hvm_info_table.h>
|
|
||||||
#if !defined(HVM_MAX_VCPUS)
|
|
||||||
# error HVM_MAX_VCPUS not defined
|
|
||||||
#endif
|
|
||||||
int main(void) {
|
|
||||||
xc_interface *xc = NULL;
|
|
||||||
xenforeignmemory_handle *xfmem;
|
|
||||||
xenevtchn_handle *xe;
|
|
||||||
xengnttab_handle *xg;
|
|
||||||
xengnttab_grant_copy_segment_t* seg = NULL;
|
|
||||||
|
|
||||||
xs_daemon_open();
|
|
||||||
|
|
||||||
xc = xc_interface_open(0, 0, 0);
|
|
||||||
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
|
||||||
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
|
||||||
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
|
||||||
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
|
||||||
|
|
||||||
xfmem = xenforeignmemory_open(0, 0);
|
|
||||||
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
xe = xenevtchn_open(0, 0);
|
|
||||||
xenevtchn_fd(xe);
|
|
||||||
|
|
||||||
xg = xengnttab_open(0, 0);
|
|
||||||
xengnttab_grant_copy(xg, 0, seg);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs $xen_stable_libs"
|
|
||||||
then
|
|
||||||
xen_ctrl_version=40800
|
|
||||||
xen=enabled
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
/*
|
|
||||||
* If we have stable libs the we don't want the libxc compat
|
|
||||||
* layers, regardless of what CFLAGS we may have been given.
|
|
||||||
*/
|
|
||||||
#undef XC_WANT_COMPAT_EVTCHN_API
|
|
||||||
#undef XC_WANT_COMPAT_GNTTAB_API
|
|
||||||
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
|
||||||
#include <xenctrl.h>
|
|
||||||
#include <xenstore.h>
|
|
||||||
#include <xenevtchn.h>
|
|
||||||
#include <xengnttab.h>
|
|
||||||
#include <xenforeignmemory.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <xen/hvm/hvm_info_table.h>
|
|
||||||
#if !defined(HVM_MAX_VCPUS)
|
|
||||||
# error HVM_MAX_VCPUS not defined
|
|
||||||
#endif
|
|
||||||
int main(void) {
|
|
||||||
xc_interface *xc = NULL;
|
|
||||||
xenforeignmemory_handle *xfmem;
|
|
||||||
xenevtchn_handle *xe;
|
|
||||||
xengnttab_handle *xg;
|
|
||||||
|
|
||||||
xs_daemon_open();
|
|
||||||
|
|
||||||
xc = xc_interface_open(0, 0, 0);
|
|
||||||
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
|
||||||
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
|
||||||
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
|
||||||
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
|
||||||
|
|
||||||
xfmem = xenforeignmemory_open(0, 0);
|
|
||||||
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
xe = xenevtchn_open(0, 0);
|
|
||||||
xenevtchn_fd(xe);
|
|
||||||
|
|
||||||
xg = xengnttab_open(0, 0);
|
|
||||||
xengnttab_map_grant_ref(xg, 0, 0, 0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs $xen_stable_libs"
|
|
||||||
then
|
|
||||||
xen_ctrl_version=40701
|
|
||||||
xen=enabled
|
|
||||||
|
|
||||||
# Xen 4.6
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#include <xenctrl.h>
|
|
||||||
#include <xenstore.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <xen/hvm/hvm_info_table.h>
|
|
||||||
#if !defined(HVM_MAX_VCPUS)
|
|
||||||
# error HVM_MAX_VCPUS not defined
|
|
||||||
#endif
|
|
||||||
int main(void) {
|
|
||||||
xc_interface *xc;
|
|
||||||
xs_daemon_open();
|
|
||||||
xc = xc_interface_open(0, 0, 0);
|
|
||||||
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
|
||||||
xc_gnttab_open(NULL, 0);
|
|
||||||
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
|
||||||
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
|
||||||
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
|
||||||
xc_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs"
|
|
||||||
then
|
|
||||||
xen_ctrl_version=40600
|
|
||||||
xen=enabled
|
|
||||||
|
|
||||||
# Xen 4.5
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#include <xenctrl.h>
|
|
||||||
#include <xenstore.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <xen/hvm/hvm_info_table.h>
|
|
||||||
#if !defined(HVM_MAX_VCPUS)
|
|
||||||
# error HVM_MAX_VCPUS not defined
|
|
||||||
#endif
|
|
||||||
int main(void) {
|
|
||||||
xc_interface *xc;
|
|
||||||
xs_daemon_open();
|
|
||||||
xc = xc_interface_open(0, 0, 0);
|
|
||||||
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
|
||||||
xc_gnttab_open(NULL, 0);
|
|
||||||
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
|
||||||
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
|
||||||
xc_hvm_create_ioreq_server(xc, 0, 0, NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs"
|
|
||||||
then
|
|
||||||
xen_ctrl_version=40500
|
|
||||||
xen=enabled
|
|
||||||
|
|
||||||
elif
|
|
||||||
cat > $TMPC <<EOF &&
|
|
||||||
#include <xenctrl.h>
|
|
||||||
#include <xenstore.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <xen/hvm/hvm_info_table.h>
|
|
||||||
#if !defined(HVM_MAX_VCPUS)
|
|
||||||
# error HVM_MAX_VCPUS not defined
|
|
||||||
#endif
|
|
||||||
int main(void) {
|
|
||||||
xc_interface *xc;
|
|
||||||
xs_daemon_open();
|
|
||||||
xc = xc_interface_open(0, 0, 0);
|
|
||||||
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
|
||||||
xc_gnttab_open(NULL, 0);
|
|
||||||
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
|
||||||
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
compile_prog "" "$xen_libs"
|
|
||||||
then
|
|
||||||
xen_ctrl_version=40200
|
|
||||||
xen=enabled
|
|
||||||
|
|
||||||
else
|
|
||||||
if test "$xen" = "enabled" ; then
|
|
||||||
feature_not_found "xen (unsupported version)" \
|
|
||||||
"Install a supported xen (xen 4.2 or newer)"
|
|
||||||
fi
|
|
||||||
xen=disabled
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$xen" = enabled; then
|
|
||||||
if test $xen_ctrl_version -ge 40701 ; then
|
|
||||||
xen_libs="$xen_libs $xen_stable_libs "
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# glib support probe
|
# glib support probe
|
||||||
|
|
||||||
@ -2074,21 +1558,6 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################
|
|
||||||
# SHA command probe for modules
|
|
||||||
if test "$modules" = yes; then
|
|
||||||
shacmd_probe="sha1sum sha1 shasum"
|
|
||||||
for c in $shacmd_probe; do
|
|
||||||
if has $c; then
|
|
||||||
shacmd="$c"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "$shacmd" = ""; then
|
|
||||||
error_exit "one of the checksum commands is required to enable modules: $shacmd_probe"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# fdt probe
|
# fdt probe
|
||||||
|
|
||||||
@ -2357,7 +1826,6 @@ write_c_skeleton
|
|||||||
|
|
||||||
if test "$fortify_source" = "yes" ; then
|
if test "$fortify_source" = "yes" ; then
|
||||||
QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
|
QEMU_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
|
||||||
debug=no
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
@ -2402,22 +1870,6 @@ if test "$solaris" = "no" && test "$tsan" = "no"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use ASLR, no-SEH and DEP if available
|
|
||||||
if test "$mingw32" = "yes" ; then
|
|
||||||
flags="--no-seh --nxcompat"
|
|
||||||
|
|
||||||
# Disable ASLR for debug builds to allow debugging with gdb
|
|
||||||
if test "$debug" = "no" ; then
|
|
||||||
flags="--dynamicbase $flags"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for flag in $flags; do
|
|
||||||
if ld_has $flag ; then
|
|
||||||
QEMU_LDFLAGS="-Wl,$flag $QEMU_LDFLAGS"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Guest agent Windows MSI package
|
# Guest agent Windows MSI package
|
||||||
|
|
||||||
if test "$QEMU_GA_MANUFACTURER" = ""; then
|
if test "$QEMU_GA_MANUFACTURER" = ""; then
|
||||||
@ -2540,59 +1992,12 @@ fi
|
|||||||
if test "$static" = "yes" ; then
|
if test "$static" = "yes" ; then
|
||||||
echo "CONFIG_STATIC=y" >> $config_host_mak
|
echo "CONFIG_STATIC=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
|
|
||||||
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
|
|
||||||
qemu_version=$(head $source_path/VERSION)
|
qemu_version=$(head $source_path/VERSION)
|
||||||
echo "PKGVERSION=$pkgversion" >>$config_host_mak
|
|
||||||
echo "SRC_PATH=$source_path" >> $config_host_mak
|
echo "SRC_PATH=$source_path" >> $config_host_mak
|
||||||
echo "TARGET_DIRS=$target_list" >> $config_host_mak
|
echo "TARGET_DIRS=$target_list" >> $config_host_mak
|
||||||
if test "$modules" = "yes"; then
|
if test "$modules" = "yes"; then
|
||||||
# $shacmd can generate a hash started with digit, which the compiler doesn't
|
|
||||||
# like as an symbol. So prefix it with an underscore
|
|
||||||
echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak
|
|
||||||
echo "CONFIG_MODULES=y" >> $config_host_mak
|
echo "CONFIG_MODULES=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
|
|
||||||
|
|
||||||
if test "$xen" = "enabled" ; then
|
|
||||||
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
|
|
||||||
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
|
|
||||||
echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
|
|
||||||
echo "XEN_LIBS=$xen_libs" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_scsi" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_net" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_NET=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_net_user" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_NET_USER=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_net_vdpa" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_NET_VDPA=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_crypto" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_CRYPTO=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_vsock" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_VSOCK=y" >> $config_host_mak
|
|
||||||
if test "$vhost_user" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_USER_VSOCK=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$vhost_kernel" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_KERNEL=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_user" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_USER=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_vdpa" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_VDPA=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
if test "$vhost_user_fs" = "yes" ; then
|
|
||||||
echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XXX: suppress that
|
# XXX: suppress that
|
||||||
if [ "$bsd" = "yes" ] ; then
|
if [ "$bsd" = "yes" ] ; then
|
||||||
@ -2688,7 +2093,6 @@ for target in $target_list; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "CONFIG_QEMU_INTERP_PREFIX=$interp_prefix" | sed 's/%M/@0@/' >> $config_host_mak
|
|
||||||
if test "$default_targets" = "yes"; then
|
if test "$default_targets" = "yes"; then
|
||||||
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
|
echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
@ -2786,6 +2190,7 @@ if test "$skip_meson" = no; then
|
|||||||
echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
|
echo "sdl2-config = [$(meson_quote $sdl2_config)]" >> $cross
|
||||||
fi
|
fi
|
||||||
echo "strip = [$(meson_quote $strip)]" >> $cross
|
echo "strip = [$(meson_quote $strip)]" >> $cross
|
||||||
|
echo "widl = [$(meson_quote $widl)]" >> $cross
|
||||||
echo "windres = [$(meson_quote $windres)]" >> $cross
|
echo "windres = [$(meson_quote $windres)]" >> $cross
|
||||||
if test "$cross_compile" = "yes"; then
|
if test "$cross_compile" = "yes"; then
|
||||||
cross_arg="--cross-file config-meson.cross"
|
cross_arg="--cross-file config-meson.cross"
|
||||||
@ -2811,37 +2216,24 @@ if test "$skip_meson" = no; then
|
|||||||
mv $cross config-meson.cross
|
mv $cross config-meson.cross
|
||||||
|
|
||||||
rm -rf meson-private meson-info meson-logs
|
rm -rf meson-private meson-info meson-logs
|
||||||
|
|
||||||
|
# Built-in options
|
||||||
|
test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
|
||||||
|
test "$default_feature" = no && meson_option_add -Dauto_features=disabled
|
||||||
|
test "$pie" = no && meson_option_add -Db_pie=false
|
||||||
|
test "$werror" = yes && meson_option_add -Dwerror=true
|
||||||
|
|
||||||
|
# QEMU options
|
||||||
|
test "$capstone" != auto && meson_option_add "-Dcapstone=$capstone"
|
||||||
|
test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
|
||||||
|
test "$fdt" != auto && meson_option_add "-Dfdt=$fdt"
|
||||||
|
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
|
||||||
|
test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
|
||||||
|
test "$slirp" != auto && meson_option_add "-Dslirp=$slirp"
|
||||||
|
test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd"
|
||||||
|
test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
|
||||||
run_meson() {
|
run_meson() {
|
||||||
NINJA=$ninja $meson setup \
|
NINJA=$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD" "$source_path"
|
||||||
--prefix "$prefix" \
|
|
||||||
--libdir "$libdir" \
|
|
||||||
--libexecdir "$libexecdir" \
|
|
||||||
--bindir "$bindir" \
|
|
||||||
--includedir "$includedir" \
|
|
||||||
--datadir "$datadir" \
|
|
||||||
--mandir "$mandir" \
|
|
||||||
--sysconfdir "$sysconfdir" \
|
|
||||||
--localedir "$localedir" \
|
|
||||||
--localstatedir "$local_statedir" \
|
|
||||||
-Daudio_drv_list=$audio_drv_list \
|
|
||||||
-Ddefault_devices=$default_devices \
|
|
||||||
-Ddocdir="$docdir" \
|
|
||||||
-Diasl="$($iasl -h >/dev/null 2>&1 && printf %s "$iasl")" \
|
|
||||||
-Dqemu_firmwarepath="$firmwarepath" \
|
|
||||||
-Dqemu_suffix="$qemu_suffix" \
|
|
||||||
-Dsmbd="$smbd" \
|
|
||||||
-Dsphinx_build="$sphinx_build" \
|
|
||||||
-Dtrace_file="$trace_file" \
|
|
||||||
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
|
|
||||||
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
|
|
||||||
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
|
|
||||||
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
|
|
||||||
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
|
|
||||||
-Db_lto=$lto -Dcfi=$cfi -Dtcg=$tcg -Dxen=$xen \
|
|
||||||
-Dcapstone=$capstone -Dfdt=$fdt -Dslirp=$slirp \
|
|
||||||
$(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=$LIB_FUZZING_ENGINE") \
|
|
||||||
$(if test "$default_feature" = no; then echo "-Dauto_features=disabled"; fi) \
|
|
||||||
"$@" $cross_arg "$PWD" "$source_path"
|
|
||||||
}
|
}
|
||||||
eval run_meson $meson_options
|
eval run_meson $meson_options
|
||||||
if test "$?" -ne 0 ; then
|
if test "$?" -ne 0 ; then
|
||||||
@ -2907,6 +2299,7 @@ preserve_env PYTHON
|
|||||||
preserve_env SDL2_CONFIG
|
preserve_env SDL2_CONFIG
|
||||||
preserve_env SMBD
|
preserve_env SMBD
|
||||||
preserve_env STRIP
|
preserve_env STRIP
|
||||||
|
preserve_env WIDL
|
||||||
preserve_env WINDRES
|
preserve_env WINDRES
|
||||||
|
|
||||||
printf "exec" >>config.status
|
printf "exec" >>config.status
|
||||||
|
@ -35,7 +35,7 @@ if sphinx_build.found()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if build_docs
|
if build_docs
|
||||||
SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + config_host['PKGVERSION']]
|
SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' + get_option('pkgversion')]
|
||||||
|
|
||||||
man_pages = {
|
man_pages = {
|
||||||
'qemu-ga.8': (have_ga ? 'man8' : ''),
|
'qemu-ga.8': (have_ga ? 'man8' : ''),
|
||||||
|
@ -245,18 +245,8 @@ static const TypeInfo pcspk_info = {
|
|||||||
.class_init = pcspk_class_initfn,
|
.class_init = pcspk_class_initfn,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int pcspk_audio_init_soundhw(ISABus *bus)
|
|
||||||
{
|
|
||||||
PCSpkState *s = pcspk_state;
|
|
||||||
|
|
||||||
warn_report("'-soundhw pcspk' is deprecated, "
|
|
||||||
"please set a backend using '-machine pcspk-audiodev=<name>' instead");
|
|
||||||
return pcspk_audio_init(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void pcspk_register(void)
|
static void pcspk_register(void)
|
||||||
{
|
{
|
||||||
type_register_static(&pcspk_info);
|
type_register_static(&pcspk_info);
|
||||||
isa_register_soundhw("pcspk", "PC speaker", pcspk_audio_init_soundhw);
|
|
||||||
}
|
}
|
||||||
type_init(pcspk_register)
|
type_init(pcspk_register)
|
||||||
|
@ -36,26 +36,12 @@ struct soundhw {
|
|||||||
const char *typename;
|
const char *typename;
|
||||||
int enabled;
|
int enabled;
|
||||||
int isa;
|
int isa;
|
||||||
union {
|
|
||||||
int (*init_isa) (ISABus *bus);
|
|
||||||
int (*init_pci) (PCIBus *bus);
|
int (*init_pci) (PCIBus *bus);
|
||||||
} init;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct soundhw soundhw[9];
|
static struct soundhw soundhw[9];
|
||||||
static int soundhw_count;
|
static int soundhw_count;
|
||||||
|
|
||||||
void isa_register_soundhw(const char *name, const char *descr,
|
|
||||||
int (*init_isa)(ISABus *bus))
|
|
||||||
{
|
|
||||||
assert(soundhw_count < ARRAY_SIZE(soundhw) - 1);
|
|
||||||
soundhw[soundhw_count].name = name;
|
|
||||||
soundhw[soundhw_count].descr = descr;
|
|
||||||
soundhw[soundhw_count].isa = 1;
|
|
||||||
soundhw[soundhw_count].init.init_isa = init_isa;
|
|
||||||
soundhw_count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void pci_register_soundhw(const char *name, const char *descr,
|
void pci_register_soundhw(const char *name, const char *descr,
|
||||||
int (*init_pci)(PCIBus *bus))
|
int (*init_pci)(PCIBus *bus))
|
||||||
{
|
{
|
||||||
@ -63,7 +49,7 @@ void pci_register_soundhw(const char *name, const char *descr,
|
|||||||
soundhw[soundhw_count].name = name;
|
soundhw[soundhw_count].name = name;
|
||||||
soundhw[soundhw_count].descr = descr;
|
soundhw[soundhw_count].descr = descr;
|
||||||
soundhw[soundhw_count].isa = 0;
|
soundhw[soundhw_count].isa = 0;
|
||||||
soundhw[soundhw_count].init.init_pci = init_pci;
|
soundhw[soundhw_count].init_pci = init_pci;
|
||||||
soundhw_count++;
|
soundhw_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,18 +144,13 @@ void soundhw_init(void)
|
|||||||
} else {
|
} else {
|
||||||
pci_create_simple(pci_bus, -1, c->typename);
|
pci_create_simple(pci_bus, -1, c->typename);
|
||||||
}
|
}
|
||||||
} else if (c->isa) {
|
|
||||||
if (!isa_bus) {
|
|
||||||
error_report("ISA bus not available for %s", c->name);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
c->init.init_isa(isa_bus);
|
|
||||||
} else {
|
} else {
|
||||||
|
assert(!c->isa);
|
||||||
if (!pci_bus) {
|
if (!pci_bus) {
|
||||||
error_report("PCI bus not available for %s", c->name);
|
error_report("PCI bus not available for %s", c->name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
c->init.init_pci(pci_bus);
|
c->init_pci(pci_bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,8 +46,12 @@ specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: files('xilinx_ethlite.c'
|
|||||||
softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c'))
|
softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c'))
|
||||||
specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c'))
|
specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c'))
|
||||||
|
|
||||||
softmmu_ss.add(when: ['CONFIG_VIRTIO_NET', 'CONFIG_VHOST_NET'], if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c'))
|
if have_vhost_net
|
||||||
|
softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost_net.c'), if_false: files('vhost_net-stub.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c'))
|
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c'))
|
||||||
|
else
|
||||||
|
softmmu_ss.add(files('vhost_net-stub.c'))
|
||||||
|
endif
|
||||||
|
|
||||||
softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files(
|
softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files(
|
||||||
'fsl_etsec/etsec.c',
|
'fsl_etsec/etsec.c',
|
||||||
|
@ -48,6 +48,11 @@ config VIRTIO_SCSI
|
|||||||
depends on VIRTIO
|
depends on VIRTIO
|
||||||
select SCSI
|
select SCSI
|
||||||
|
|
||||||
|
config VHOST_SCSI
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on VIRTIO && VHOST_KERNEL
|
||||||
|
|
||||||
config VHOST_USER_SCSI
|
config VHOST_USER_SCSI
|
||||||
bool
|
bool
|
||||||
# Only PCI devices are provided for now
|
# Only PCI devices are provided for now
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
config VHOST
|
|
||||||
bool
|
|
||||||
|
|
||||||
config VIRTIO
|
config VIRTIO
|
||||||
bool
|
bool
|
||||||
|
|
||||||
@ -59,6 +56,16 @@ config VIRTIO_MEM
|
|||||||
depends on VIRTIO_MEM_SUPPORTED
|
depends on VIRTIO_MEM_SUPPORTED
|
||||||
select MEM_DEVICE
|
select MEM_DEVICE
|
||||||
|
|
||||||
|
config VHOST_VSOCK
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on VIRTIO && VHOST_KERNEL
|
||||||
|
|
||||||
|
config VHOST_USER_VSOCK
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on VIRTIO && VHOST_USER
|
||||||
|
|
||||||
config VHOST_USER_I2C
|
config VHOST_USER_I2C
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
@ -68,3 +75,8 @@ config VHOST_USER_RNG
|
|||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
depends on VIRTIO && VHOST_USER
|
depends on VIRTIO && VHOST_USER
|
||||||
|
|
||||||
|
config VHOST_USER_FS
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
depends on VIRTIO && VHOST_USER
|
||||||
|
@ -2,23 +2,25 @@ softmmu_virtio_ss = ss.source_set()
|
|||||||
softmmu_virtio_ss.add(files('virtio-bus.c'))
|
softmmu_virtio_ss.add(files('virtio-bus.c'))
|
||||||
softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
|
softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
|
||||||
softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
|
softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
|
||||||
softmmu_virtio_ss.add(when: 'CONFIG_VHOST', if_false: files('vhost-stub.c'))
|
|
||||||
|
|
||||||
softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
|
|
||||||
softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
|
|
||||||
|
|
||||||
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
|
|
||||||
|
|
||||||
virtio_ss = ss.source_set()
|
virtio_ss = ss.source_set()
|
||||||
virtio_ss.add(files('virtio.c'))
|
virtio_ss.add(files('virtio.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST', if_true: files('vhost.c', 'vhost-backend.c', 'vhost-iova-tree.c'))
|
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c'))
|
if have_vhost
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-shadow-virtqueue.c', 'vhost-vdpa.c'))
|
virtio_ss.add(files('vhost.c', 'vhost-backend.c', 'vhost-iova-tree.c'))
|
||||||
|
if have_vhost_user
|
||||||
|
virtio_ss.add(files('vhost-user.c'))
|
||||||
|
endif
|
||||||
|
if have_vhost_vdpa
|
||||||
|
virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c'))
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
softmmu_virtio_ss.add(files('vhost-stub.c'))
|
||||||
|
endif
|
||||||
|
|
||||||
virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c'))
|
virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
|
virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
|
||||||
virtio_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-crypto-pci.c'))
|
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c'))
|
virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c'))
|
||||||
virtio_ss.add(when: ['CONFIG_VHOST_USER_FS', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-fs-pci.c'))
|
|
||||||
virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c'))
|
virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', 'vhost-vsock-common.c'))
|
virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', 'vhost-vsock-common.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c', 'vhost-vsock-common.c'))
|
virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c', 'vhost-vsock-common.c'))
|
||||||
@ -26,17 +28,20 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c'))
|
|||||||
virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
|
virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c'))
|
virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c'))
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c'))
|
virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c'))
|
||||||
virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], if_true: files('vhost-user-i2c-pci.c'))
|
|
||||||
virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c'))
|
virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c'))
|
||||||
virtio_ss.add(when: ['CONFIG_VHOST_USER_RNG', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-rng-pci.c'))
|
|
||||||
|
|
||||||
virtio_pci_ss = ss.source_set()
|
virtio_pci_ss = ss.source_set()
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c'))
|
||||||
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input-pci.c'))
|
||||||
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c'))
|
||||||
|
virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-pci.c'))
|
||||||
|
|
||||||
|
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c'))
|
||||||
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c'))
|
virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c'))
|
||||||
@ -53,3 +58,6 @@ virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem-pci.c'))
|
|||||||
virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
|
virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
|
||||||
|
|
||||||
specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss)
|
specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss)
|
||||||
|
softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss)
|
||||||
|
softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
|
||||||
|
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c'))
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
#ifndef HW_SOUNDHW_H
|
#ifndef HW_SOUNDHW_H
|
||||||
#define HW_SOUNDHW_H
|
#define HW_SOUNDHW_H
|
||||||
|
|
||||||
void isa_register_soundhw(const char *name, const char *descr,
|
|
||||||
int (*init_isa)(ISABus *bus));
|
|
||||||
|
|
||||||
void pci_register_soundhw(const char *name, const char *descr,
|
void pci_register_soundhw(const char *name, const char *descr,
|
||||||
int (*init_pci)(PCIBus *bus));
|
int (*init_pci)(PCIBus *bus));
|
||||||
void deprecated_register_soundhw(const char *name, const char *descr,
|
void deprecated_register_soundhw(const char *name, const char *descr,
|
||||||
|
@ -55,10 +55,8 @@ struct VirtIOSCSIConf {
|
|||||||
bool seg_max_adjust;
|
bool seg_max_adjust;
|
||||||
uint32_t max_sectors;
|
uint32_t max_sectors;
|
||||||
uint32_t cmd_per_lun;
|
uint32_t cmd_per_lun;
|
||||||
#ifdef CONFIG_VHOST_SCSI
|
|
||||||
char *vhostfd;
|
char *vhostfd;
|
||||||
char *wwpn;
|
char *wwpn;
|
||||||
#endif
|
|
||||||
CharBackend chardev;
|
CharBackend chardev;
|
||||||
uint32_t boot_tpgt;
|
uint32_t boot_tpgt;
|
||||||
IOThread *iothread;
|
IOThread *iothread;
|
||||||
|
256
meson.build
256
meson.build
@ -1,6 +1,6 @@
|
|||||||
project('qemu', ['c'], meson_version: '>=0.59.3',
|
project('qemu', ['c'], meson_version: '>=0.59.3',
|
||||||
default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto',
|
default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto',
|
||||||
'b_staticpic=false', 'stdsplit=false'],
|
'b_staticpic=false', 'stdsplit=false', 'optimization=2', 'b_pie=true'],
|
||||||
version: files('VERSION'))
|
version: files('VERSION'))
|
||||||
|
|
||||||
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
|
add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
|
||||||
@ -167,6 +167,12 @@ if 'dtrace' in get_option('trace_backends')
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('iasl') == ''
|
||||||
|
iasl = find_program('iasl', required: false)
|
||||||
|
else
|
||||||
|
iasl = find_program(get_option('iasl'), required: true)
|
||||||
|
endif
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Compiler flags #
|
# Compiler flags #
|
||||||
##################
|
##################
|
||||||
@ -176,6 +182,14 @@ qemu_cxxflags = config_host['QEMU_CXXFLAGS'].split()
|
|||||||
qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
|
qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
|
||||||
qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
|
qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
|
||||||
|
|
||||||
|
if targetos == 'windows'
|
||||||
|
qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
|
||||||
|
# Disable ASLR for debug builds to allow debugging with gdb
|
||||||
|
if get_option('optimization') == '0'
|
||||||
|
qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('gprof')
|
if get_option('gprof')
|
||||||
qemu_cflags += ['-p']
|
qemu_cflags += ['-p']
|
||||||
qemu_cxxflags += ['-p']
|
qemu_cxxflags += ['-p']
|
||||||
@ -298,6 +312,28 @@ have_tpm = get_option('tpm') \
|
|||||||
.require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
|
.require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
|
||||||
.allowed()
|
.allowed()
|
||||||
|
|
||||||
|
# vhost
|
||||||
|
have_vhost_user = get_option('vhost_user') \
|
||||||
|
.disable_auto_if(targetos != 'linux') \
|
||||||
|
.require(targetos != 'windows',
|
||||||
|
error_message: 'vhost-user is not available on Windows').allowed()
|
||||||
|
have_vhost_vdpa = get_option('vhost_vdpa') \
|
||||||
|
.require(targetos == 'linux',
|
||||||
|
error_message: 'vhost-vdpa is only available on Linux').allowed()
|
||||||
|
have_vhost_kernel = get_option('vhost_kernel') \
|
||||||
|
.require(targetos == 'linux',
|
||||||
|
error_message: 'vhost-kernel is only available on Linux').allowed()
|
||||||
|
have_vhost_user_crypto = get_option('vhost_crypto') \
|
||||||
|
.require(have_vhost_user,
|
||||||
|
error_message: 'vhost-crypto requires vhost-user to be enabled').allowed()
|
||||||
|
|
||||||
|
have_vhost = have_vhost_user or have_vhost_vdpa or have_vhost_kernel
|
||||||
|
|
||||||
|
have_vhost_net_user = have_vhost_user and get_option('vhost_net').allowed()
|
||||||
|
have_vhost_net_vdpa = have_vhost_vdpa and get_option('vhost_net').allowed()
|
||||||
|
have_vhost_net_kernel = have_vhost_kernel and get_option('vhost_net').allowed()
|
||||||
|
have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_vdpa
|
||||||
|
|
||||||
# Target-specific libraries and flags
|
# Target-specific libraries and flags
|
||||||
libm = cc.find_library('m', required: false)
|
libm = cc.find_library('m', required: false)
|
||||||
threads = dependency('threads')
|
threads = dependency('threads')
|
||||||
@ -348,12 +384,6 @@ accelerators = []
|
|||||||
if get_option('kvm').allowed() and targetos == 'linux'
|
if get_option('kvm').allowed() and targetos == 'linux'
|
||||||
accelerators += 'CONFIG_KVM'
|
accelerators += 'CONFIG_KVM'
|
||||||
endif
|
endif
|
||||||
if get_option('xen').allowed() and 'CONFIG_XEN_BACKEND' in config_host
|
|
||||||
accelerators += 'CONFIG_XEN'
|
|
||||||
have_xen_pci_passthrough = get_option('xen_pci_passthrough').allowed() and targetos == 'linux'
|
|
||||||
else
|
|
||||||
have_xen_pci_passthrough = false
|
|
||||||
endif
|
|
||||||
if get_option('whpx').allowed() and targetos == 'windows'
|
if get_option('whpx').allowed() and targetos == 'windows'
|
||||||
if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64'
|
if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64'
|
||||||
error('WHPX requires 64-bit host')
|
error('WHPX requires 64-bit host')
|
||||||
@ -425,13 +455,6 @@ endif
|
|||||||
if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled()
|
if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled()
|
||||||
error('WHPX not available on this platform')
|
error('WHPX not available on this platform')
|
||||||
endif
|
endif
|
||||||
if not have_xen_pci_passthrough and get_option('xen_pci_passthrough').enabled()
|
|
||||||
if 'CONFIG_XEN' in accelerators
|
|
||||||
error('Xen PCI passthrough not available on this platform')
|
|
||||||
else
|
|
||||||
error('Xen PCI passthrough requested but Xen not enabled')
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# Dependencies #
|
# Dependencies #
|
||||||
@ -1257,10 +1280,86 @@ if not get_option('rdma').auto() or have_system
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
xen = not_found
|
xen = not_found
|
||||||
if 'CONFIG_XEN_BACKEND' in config_host
|
if get_option('xen').enabled() or (get_option('xen').auto() and have_system)
|
||||||
xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
|
xencontrol = dependency('xencontrol', required: false,
|
||||||
link_args: config_host['XEN_LIBS'].split())
|
method: 'pkg-config', kwargs: static_kwargs)
|
||||||
|
if xencontrol.found()
|
||||||
|
xen_pc = declare_dependency(version: xencontrol.version(),
|
||||||
|
dependencies: [
|
||||||
|
xencontrol,
|
||||||
|
# disabler: true makes xen_pc.found() return false if any is not found
|
||||||
|
dependency('xenstore', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs,
|
||||||
|
disabler: true),
|
||||||
|
dependency('xenforeignmemory', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs,
|
||||||
|
disabler: true),
|
||||||
|
dependency('xengnttab', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs,
|
||||||
|
disabler: true),
|
||||||
|
dependency('xenevtchn', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs,
|
||||||
|
disabler: true),
|
||||||
|
dependency('xendevicemodel', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs,
|
||||||
|
disabler: true),
|
||||||
|
# optional, no "disabler: true"
|
||||||
|
dependency('xentoolcore', required: false,
|
||||||
|
method: 'pkg-config', kwargs: static_kwargs)])
|
||||||
|
if xen_pc.found()
|
||||||
|
xen = xen_pc
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
if not xen.found()
|
||||||
|
xen_tests = [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1', '4.6.0', '4.5.0', '4.2.0' ]
|
||||||
|
xen_libs = {
|
||||||
|
'4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
|
||||||
|
'4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
|
||||||
|
'4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
|
||||||
|
'4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
|
||||||
|
'4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
|
||||||
|
'4.6.0': [ 'xenstore', 'xenctrl' ],
|
||||||
|
'4.5.0': [ 'xenstore', 'xenctrl' ],
|
||||||
|
'4.2.0': [ 'xenstore', 'xenctrl' ],
|
||||||
|
}
|
||||||
|
xen_deps = {}
|
||||||
|
foreach ver: xen_tests
|
||||||
|
# cache the various library tests to avoid polluting the logs
|
||||||
|
xen_test_deps = []
|
||||||
|
foreach l: xen_libs[ver]
|
||||||
|
if l not in xen_deps
|
||||||
|
xen_deps += { l: cc.find_library(l, required: false) }
|
||||||
|
endif
|
||||||
|
xen_test_deps += xen_deps[l]
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
# Use -D to pick just one of the test programs in scripts/xen-detect.c
|
||||||
|
xen_version = ver.split('.')
|
||||||
|
xen_ctrl_version = xen_version[0] + \
|
||||||
|
('0' + xen_version[1]).substring(-2) + \
|
||||||
|
('0' + xen_version[2]).substring(-2)
|
||||||
|
if cc.links(files('scripts/xen-detect.c'),
|
||||||
|
args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
|
||||||
|
dependencies: xen_test_deps)
|
||||||
|
xen = declare_dependency(version: ver, dependencies: xen_test_deps)
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
if xen.found()
|
||||||
|
accelerators += 'CONFIG_XEN'
|
||||||
|
elif get_option('xen').enabled()
|
||||||
|
error('could not compile and link Xen test program')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
have_xen_pci_passthrough = get_option('xen_pci_passthrough') \
|
||||||
|
.require(xen.found(),
|
||||||
|
error_message: 'Xen PCI passthrough requested but Xen not enabled') \
|
||||||
|
.require(targetos == 'linux',
|
||||||
|
error_message: 'Xen PCI passthrough not available on this platform') \
|
||||||
|
.allowed()
|
||||||
|
|
||||||
|
|
||||||
cacard = not_found
|
cacard = not_found
|
||||||
if not get_option('smartcard').auto() or have_system
|
if not get_option('smartcard').auto() or have_system
|
||||||
cacard = dependency('libcacard', required: get_option('smartcard'),
|
cacard = dependency('libcacard', required: get_option('smartcard'),
|
||||||
@ -1365,7 +1464,7 @@ has_statx_mnt_id = cc.links(statx_mnt_id_test)
|
|||||||
have_vhost_user_blk_server = get_option('vhost_user_blk_server') \
|
have_vhost_user_blk_server = get_option('vhost_user_blk_server') \
|
||||||
.require(targetos == 'linux',
|
.require(targetos == 'linux',
|
||||||
error_message: 'vhost_user_blk_server requires linux') \
|
error_message: 'vhost_user_blk_server requires linux') \
|
||||||
.require('CONFIG_VHOST_USER' in config_host,
|
.require(have_vhost_user,
|
||||||
error_message: 'vhost_user_blk_server requires vhost-user support') \
|
error_message: 'vhost_user_blk_server requires vhost-user support') \
|
||||||
.disable_auto_if(not have_system) \
|
.disable_auto_if(not have_system) \
|
||||||
.allowed()
|
.allowed()
|
||||||
@ -1517,19 +1616,33 @@ have_virtfs = get_option('virtfs') \
|
|||||||
|
|
||||||
have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools
|
have_virtfs_proxy_helper = targetos != 'darwin' and have_virtfs and have_tools
|
||||||
|
|
||||||
|
if get_option('block_drv_ro_whitelist') == ''
|
||||||
|
config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '')
|
||||||
|
else
|
||||||
|
config_host_data.set('CONFIG_BDRV_RO_WHITELIST',
|
||||||
|
'"' + get_option('block_drv_ro_whitelist').replace(',', '", "') + '", ')
|
||||||
|
endif
|
||||||
|
if get_option('block_drv_rw_whitelist') == ''
|
||||||
|
config_host_data.set('CONFIG_BDRV_RW_WHITELIST', '')
|
||||||
|
else
|
||||||
|
config_host_data.set('CONFIG_BDRV_RW_WHITELIST',
|
||||||
|
'"' + get_option('block_drv_rw_whitelist').replace(',', '", "') + '", ')
|
||||||
|
endif
|
||||||
|
|
||||||
foreach k : get_option('trace_backends')
|
foreach k : get_option('trace_backends')
|
||||||
config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true)
|
config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true)
|
||||||
endforeach
|
endforeach
|
||||||
config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file'))
|
config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file'))
|
||||||
if get_option('iasl') != ''
|
config_host_data.set_quoted('CONFIG_TLS_PRIORITY', get_option('tls_priority'))
|
||||||
config_host_data.set_quoted('CONFIG_IASL', get_option('iasl'))
|
if iasl.found()
|
||||||
|
config_host_data.set_quoted('CONFIG_IASL', iasl.full_path())
|
||||||
endif
|
endif
|
||||||
config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir'))
|
config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_option('bindir'))
|
||||||
config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix'))
|
config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix'))
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir)
|
config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / qemu_confdir)
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_DATADIR', get_option('prefix') / qemu_datadir)
|
config_host_data.set_quoted('CONFIG_QEMU_DATADIR', get_option('prefix') / qemu_datadir)
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix') / qemu_desktopdir)
|
config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix') / qemu_desktopdir)
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_firmwarepath'))
|
config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('prefix') / get_option('qemu_firmwarepath'))
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') / get_option('libexecdir'))
|
config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') / get_option('libexecdir'))
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / qemu_icondir)
|
config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / qemu_icondir)
|
||||||
config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||||
@ -1537,6 +1650,14 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') /
|
|||||||
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
|
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
|
||||||
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
|
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
|
||||||
|
|
||||||
|
if config_host.has_key('CONFIG_MODULES')
|
||||||
|
config_host_data.set('CONFIG_STAMP', run_command(
|
||||||
|
meson.current_source_dir() / 'scripts/qemu-stamp.py',
|
||||||
|
meson.project_version(), get_option('pkgversion'), '--',
|
||||||
|
meson.current_source_dir() / 'configure',
|
||||||
|
capture: true, check: true).stdout().strip())
|
||||||
|
endif
|
||||||
|
|
||||||
have_slirp_smbd = get_option('slirp_smbd') \
|
have_slirp_smbd = get_option('slirp_smbd') \
|
||||||
.require(targetos != 'windows', error_message: 'Host smbd not supported on this platform.') \
|
.require(targetos != 'windows', error_message: 'Host smbd not supported on this platform.') \
|
||||||
.allowed()
|
.allowed()
|
||||||
@ -1602,6 +1723,13 @@ config_host_data.set('CONFIG_SNAPPY', snappy.found())
|
|||||||
config_host_data.set('CONFIG_TPM', have_tpm)
|
config_host_data.set('CONFIG_TPM', have_tpm)
|
||||||
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
|
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
|
||||||
config_host_data.set('CONFIG_VDE', vde.found())
|
config_host_data.set('CONFIG_VDE', vde.found())
|
||||||
|
config_host_data.set('CONFIG_VHOST_NET', have_vhost_net)
|
||||||
|
config_host_data.set('CONFIG_VHOST_NET_USER', have_vhost_net_user)
|
||||||
|
config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa)
|
||||||
|
config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel)
|
||||||
|
config_host_data.set('CONFIG_VHOST_USER', have_vhost_user)
|
||||||
|
config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto)
|
||||||
|
config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa)
|
||||||
config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
|
config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
|
||||||
config_host_data.set('CONFIG_PNG', png.found())
|
config_host_data.set('CONFIG_PNG', png.found())
|
||||||
config_host_data.set('CONFIG_VNC', vnc.found())
|
config_host_data.set('CONFIG_VNC', vnc.found())
|
||||||
@ -1634,6 +1762,15 @@ config_host_data.set('CONFIG_X11', x11.found())
|
|||||||
config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display)
|
config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display)
|
||||||
config_host_data.set('CONFIG_CFI', get_option('cfi'))
|
config_host_data.set('CONFIG_CFI', get_option('cfi'))
|
||||||
config_host_data.set('CONFIG_SELINUX', selinux.found())
|
config_host_data.set('CONFIG_SELINUX', selinux.found())
|
||||||
|
config_host_data.set('CONFIG_XEN_BACKEND', xen.found())
|
||||||
|
if xen.found()
|
||||||
|
# protect from xen.version() having less than three components
|
||||||
|
xen_version = xen.version().split('.') + ['0', '0']
|
||||||
|
xen_ctrl_version = xen_version[0] + \
|
||||||
|
('0' + xen_version[1]).substring(-2) + \
|
||||||
|
('0' + xen_version[2]).substring(-2)
|
||||||
|
config_host_data.set('CONFIG_XEN_CTRL_INTERFACE_VERSION', xen_ctrl_version)
|
||||||
|
endif
|
||||||
config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
|
config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
|
||||||
config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
|
config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
|
||||||
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
|
config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
|
||||||
@ -2120,18 +2257,8 @@ if targetos == 'windows' and link_language == 'cpp'
|
|||||||
endif
|
endif
|
||||||
config_host_data.set('HAVE_VSS_SDK', have_vss_sdk)
|
config_host_data.set('HAVE_VSS_SDK', have_vss_sdk)
|
||||||
|
|
||||||
ignored = ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target
|
|
||||||
'HAVE_GDB_BIN']
|
|
||||||
arrays = ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
|
|
||||||
foreach k, v: config_host
|
foreach k, v: config_host
|
||||||
if ignored.contains(k)
|
if k.startswith('CONFIG_')
|
||||||
# do nothing
|
|
||||||
elif arrays.contains(k)
|
|
||||||
if v != ''
|
|
||||||
v = '"' + '", "'.join(v.split()) + '", '
|
|
||||||
endif
|
|
||||||
config_host_data.set(k, v)
|
|
||||||
elif k.startswith('CONFIG_')
|
|
||||||
config_host_data.set(k, v == 'y' ? 1 : v)
|
config_host_data.set(k, v == 'y' ? 1 : v)
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
@ -2199,9 +2326,9 @@ host_kconfig = \
|
|||||||
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
|
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
|
||||||
(opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \
|
(opengl.found() ? ['CONFIG_OPENGL=y'] : []) + \
|
||||||
(x11.found() ? ['CONFIG_X11=y'] : []) + \
|
(x11.found() ? ['CONFIG_X11=y'] : []) + \
|
||||||
('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=y'] : []) + \
|
(have_vhost_user ? ['CONFIG_VHOST_USER=y'] : []) + \
|
||||||
('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=y'] : []) + \
|
(have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=y'] : []) + \
|
||||||
('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=y'] : []) + \
|
(have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=y'] : []) + \
|
||||||
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
|
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
|
||||||
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
|
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
|
||||||
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
|
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
|
||||||
@ -2237,7 +2364,7 @@ foreach target : target_dirs
|
|||||||
config_target += {
|
config_target += {
|
||||||
'CONFIG_USER_ONLY': 'y',
|
'CONFIG_USER_ONLY': 'y',
|
||||||
'CONFIG_QEMU_INTERP_PREFIX':
|
'CONFIG_QEMU_INTERP_PREFIX':
|
||||||
config_host['CONFIG_QEMU_INTERP_PREFIX'].format(config_target['TARGET_NAME'])
|
get_option('interp_prefix').replace('%M', config_target['TARGET_NAME'])
|
||||||
}
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -2359,7 +2486,7 @@ config_all += config_all_devices
|
|||||||
config_all += config_host
|
config_all += config_host
|
||||||
config_all += config_all_disas
|
config_all += config_all_disas
|
||||||
config_all += {
|
config_all += {
|
||||||
'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'),
|
'CONFIG_XEN': xen.found(),
|
||||||
'CONFIG_SOFTMMU': have_system,
|
'CONFIG_SOFTMMU': have_system,
|
||||||
'CONFIG_USER_ONLY': have_user,
|
'CONFIG_USER_ONLY': have_user,
|
||||||
'CONFIG_ALL': true,
|
'CONFIG_ALL': true,
|
||||||
@ -2707,7 +2834,7 @@ tracetool_depends = files(
|
|||||||
|
|
||||||
qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
|
qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
|
||||||
meson.current_source_dir(),
|
meson.current_source_dir(),
|
||||||
config_host['PKGVERSION'], meson.project_version()]
|
get_option('pkgversion'), meson.project_version()]
|
||||||
qemu_version = custom_target('qemu-version.h',
|
qemu_version = custom_target('qemu-version.h',
|
||||||
output: 'qemu-version.h',
|
output: 'qemu-version.h',
|
||||||
command: qemu_version_cmd,
|
command: qemu_version_cmd,
|
||||||
@ -2883,7 +3010,7 @@ if have_system or have_user
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
vhost_user = not_found
|
vhost_user = not_found
|
||||||
if targetos == 'linux' and 'CONFIG_VHOST_USER' in config_host
|
if targetos == 'linux' and have_vhost_user
|
||||||
libvhost_user = subproject('libvhost-user')
|
libvhost_user = subproject('libvhost-user')
|
||||||
vhost_user = libvhost_user.get_variable('vhost_user_dep')
|
vhost_user = libvhost_user.get_variable('vhost_user_dep')
|
||||||
endif
|
endif
|
||||||
@ -3464,7 +3591,7 @@ if have_tools
|
|||||||
dependencies: qemuutil,
|
dependencies: qemuutil,
|
||||||
install: true)
|
install: true)
|
||||||
|
|
||||||
if 'CONFIG_VHOST_USER' in config_host
|
if have_vhost_user
|
||||||
subdir('contrib/vhost-user-blk')
|
subdir('contrib/vhost-user-blk')
|
||||||
subdir('contrib/vhost-user-gpu')
|
subdir('contrib/vhost-user-gpu')
|
||||||
subdir('contrib/vhost-user-input')
|
subdir('contrib/vhost-user-input')
|
||||||
@ -3531,20 +3658,20 @@ endif
|
|||||||
summary_info = {}
|
summary_info = {}
|
||||||
summary_info += {'Install prefix': get_option('prefix')}
|
summary_info += {'Install prefix': get_option('prefix')}
|
||||||
summary_info += {'BIOS directory': qemu_datadir}
|
summary_info += {'BIOS directory': qemu_datadir}
|
||||||
summary_info += {'firmware path': get_option('qemu_firmwarepath')}
|
summary_info += {'firmware path': get_option('prefix') / get_option('qemu_firmwarepath')}
|
||||||
summary_info += {'binary directory': get_option('bindir')}
|
summary_info += {'binary directory': get_option('prefix') / get_option('bindir')}
|
||||||
summary_info += {'library directory': get_option('libdir')}
|
summary_info += {'library directory': get_option('prefix') / get_option('libdir')}
|
||||||
summary_info += {'module directory': qemu_moddir}
|
summary_info += {'module directory': qemu_moddir}
|
||||||
summary_info += {'libexec directory': get_option('libexecdir')}
|
summary_info += {'libexec directory': get_option('prefix') / get_option('libexecdir')}
|
||||||
summary_info += {'include directory': get_option('includedir')}
|
summary_info += {'include directory': get_option('prefix') / get_option('includedir')}
|
||||||
summary_info += {'config directory': get_option('sysconfdir')}
|
summary_info += {'config directory': get_option('prefix') / get_option('sysconfdir')}
|
||||||
if targetos != 'windows'
|
if targetos != 'windows'
|
||||||
summary_info += {'local state directory': get_option('localstatedir')}
|
summary_info += {'local state directory': get_option('prefix') / get_option('localstatedir')}
|
||||||
summary_info += {'Manual directory': get_option('mandir')}
|
summary_info += {'Manual directory': get_option('prefix') / get_option('mandir')}
|
||||||
else
|
else
|
||||||
summary_info += {'local state directory': 'queried at runtime'}
|
summary_info += {'local state directory': 'queried at runtime'}
|
||||||
endif
|
endif
|
||||||
summary_info += {'Doc directory': get_option('docdir')}
|
summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
|
||||||
summary_info += {'Build directory': meson.current_build_dir()}
|
summary_info += {'Build directory': meson.current_build_dir()}
|
||||||
summary_info += {'Source path': meson.current_source_dir()}
|
summary_info += {'Source path': meson.current_source_dir()}
|
||||||
summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
|
summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
|
||||||
@ -3559,11 +3686,7 @@ summary_info += {'sphinx-build': sphinx_build}
|
|||||||
if config_host.has_key('HAVE_GDB_BIN')
|
if config_host.has_key('HAVE_GDB_BIN')
|
||||||
summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
|
summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
|
||||||
endif
|
endif
|
||||||
if get_option('iasl') != ''
|
summary_info += {'iasl': iasl}
|
||||||
summary_info += {'iasl': get_option('iasl')}
|
|
||||||
else
|
|
||||||
summary_info += {'iasl': false}
|
|
||||||
endif
|
|
||||||
summary_info += {'genisoimage': config_host['GENISOIMAGE']}
|
summary_info += {'genisoimage': config_host['GENISOIMAGE']}
|
||||||
if targetos == 'windows' and have_ga
|
if targetos == 'windows' and have_ga
|
||||||
summary_info += {'wixl': wixl}
|
summary_info += {'wixl': wixl}
|
||||||
@ -3594,15 +3717,12 @@ if 'simple' in get_option('trace_backends')
|
|||||||
endif
|
endif
|
||||||
summary_info += {'D-Bus display': dbus_display}
|
summary_info += {'D-Bus display': dbus_display}
|
||||||
summary_info += {'QOM debugging': get_option('qom_cast_debug')}
|
summary_info += {'QOM debugging': get_option('qom_cast_debug')}
|
||||||
summary_info += {'vhost-kernel support': config_host.has_key('CONFIG_VHOST_KERNEL')}
|
summary_info += {'vhost-kernel support': have_vhost_kernel}
|
||||||
summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')}
|
summary_info += {'vhost-net support': have_vhost_net}
|
||||||
summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')}
|
summary_info += {'vhost-user support': have_vhost_user}
|
||||||
summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')}
|
summary_info += {'vhost-user-crypto support': have_vhost_user_crypto}
|
||||||
summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')}
|
|
||||||
summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_USER')}
|
|
||||||
summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
|
summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
|
||||||
summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')}
|
summary_info += {'vhost-vdpa support': have_vhost_vdpa}
|
||||||
summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')}
|
|
||||||
summary_info += {'build guest agent': have_ga}
|
summary_info += {'build guest agent': have_ga}
|
||||||
summary(summary_info, bool_yn: true, section: 'Configurable features')
|
summary(summary_info, bool_yn: true, section: 'Configurable features')
|
||||||
|
|
||||||
@ -3690,9 +3810,9 @@ if have_system
|
|||||||
summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}
|
summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}
|
||||||
summary_info += {'WHPX support': config_all.has_key('CONFIG_WHPX')}
|
summary_info += {'WHPX support': config_all.has_key('CONFIG_WHPX')}
|
||||||
summary_info += {'NVMM support': config_all.has_key('CONFIG_NVMM')}
|
summary_info += {'NVMM support': config_all.has_key('CONFIG_NVMM')}
|
||||||
summary_info += {'Xen support': config_host.has_key('CONFIG_XEN_BACKEND')}
|
summary_info += {'Xen support': xen.found()}
|
||||||
if config_host.has_key('CONFIG_XEN_BACKEND')
|
if xen.found()
|
||||||
summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}
|
summary_info += {'xen ctrl version': xen.version()}
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
summary_info += {'TCG support': config_all.has_key('CONFIG_TCG')}
|
summary_info += {'TCG support': config_all.has_key('CONFIG_TCG')}
|
||||||
@ -3717,8 +3837,8 @@ summary_info = {}
|
|||||||
summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']}
|
summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']}
|
||||||
summary_info += {'coroutine pool': have_coroutine_pool}
|
summary_info += {'coroutine pool': have_coroutine_pool}
|
||||||
if have_block
|
if have_block
|
||||||
summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']}
|
summary_info += {'Block whitelist (rw)': get_option('block_drv_rw_whitelist')}
|
||||||
summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']}
|
summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')}
|
||||||
summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')}
|
summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')}
|
||||||
summary_info += {'VirtFS support': have_virtfs}
|
summary_info += {'VirtFS support': have_virtfs}
|
||||||
summary_info += {'build virtiofs daemon': have_virtiofsd}
|
summary_info += {'build virtiofs daemon': have_virtiofsd}
|
||||||
@ -3738,7 +3858,7 @@ summary(summary_info, bool_yn: true, section: 'Block layer support')
|
|||||||
|
|
||||||
# Crypto
|
# Crypto
|
||||||
summary_info = {}
|
summary_info = {}
|
||||||
summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']}
|
summary_info += {'TLS priority': get_option('tls_priority')}
|
||||||
summary_info += {'GNUTLS support': gnutls}
|
summary_info += {'GNUTLS support': gnutls}
|
||||||
if gnutls.found()
|
if gnutls.found()
|
||||||
summary_info += {' GNUTLS crypto': gnutls_crypto.found()}
|
summary_info += {' GNUTLS crypto': gnutls_crypto.found()}
|
||||||
|
@ -4,21 +4,31 @@
|
|||||||
|
|
||||||
option('qemu_suffix', type : 'string', value: 'qemu',
|
option('qemu_suffix', type : 'string', value: 'qemu',
|
||||||
description: 'Suffix for QEMU data/modules/config directories (can be empty)')
|
description: 'Suffix for QEMU data/modules/config directories (can be empty)')
|
||||||
option('docdir', type : 'string', value : 'doc',
|
option('docdir', type : 'string', value : 'share/doc',
|
||||||
description: 'Base directory for documentation installation (can be empty)')
|
description: 'Base directory for documentation installation (can be empty)')
|
||||||
option('qemu_firmwarepath', type : 'string', value : '',
|
option('qemu_firmwarepath', type : 'string', value : 'qemu-firmware',
|
||||||
description: 'search PATH for firmware files')
|
description: 'search PATH for firmware files')
|
||||||
|
option('pkgversion', type : 'string', value : '',
|
||||||
|
description: 'use specified string as sub-version of the package')
|
||||||
option('smbd', type : 'string', value : '',
|
option('smbd', type : 'string', value : '',
|
||||||
description: 'Path to smbd for slirp networking')
|
description: 'Path to smbd for slirp networking')
|
||||||
option('sphinx_build', type : 'string', value : '',
|
option('sphinx_build', type : 'string', value : '',
|
||||||
description: 'Use specified sphinx-build [$sphinx_build] for building document (default to be empty)')
|
description: 'Use specified sphinx-build for building document')
|
||||||
option('iasl', type : 'string', value : '',
|
option('iasl', type : 'string', value : '',
|
||||||
description: 'Path to ACPI disassembler')
|
description: 'Path to ACPI disassembler')
|
||||||
|
option('tls_priority', type : 'string', value : 'NORMAL',
|
||||||
|
description: 'Default TLS protocol/cipher priority string')
|
||||||
option('default_devices', type : 'boolean', value : true,
|
option('default_devices', type : 'boolean', value : true,
|
||||||
description: 'Include a default selection of devices in emulators')
|
description: 'Include a default selection of devices in emulators')
|
||||||
option('audio_drv_list', type: 'array', value: ['default'],
|
option('audio_drv_list', type: 'array', value: ['default'],
|
||||||
choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl'],
|
choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', 'pa', 'sdl'],
|
||||||
description: 'Set audio driver list')
|
description: 'Set audio driver list')
|
||||||
|
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)')
|
||||||
|
option('interp_prefix', type : 'string', value : '/usr/gnemul/qemu-%M',
|
||||||
|
description: 'where to find shared libraries etc., use %M for cpu name')
|
||||||
option('fuzzing_engine', type : 'string', value : '',
|
option('fuzzing_engine', type : 'string', value : '',
|
||||||
description: 'fuzzing engine library for OSS-Fuzz')
|
description: 'fuzzing engine library for OSS-Fuzz')
|
||||||
option('trace_file', type: 'string', value: 'trace',
|
option('trace_file', type: 'string', value: 'trace',
|
||||||
@ -68,7 +78,7 @@ option('xen', type: 'feature', value: 'auto',
|
|||||||
description: 'Xen backend support')
|
description: 'Xen backend support')
|
||||||
option('xen_pci_passthrough', type: 'feature', value: 'auto',
|
option('xen_pci_passthrough', type: 'feature', value: 'auto',
|
||||||
description: 'Xen PCI passthrough support')
|
description: 'Xen PCI passthrough support')
|
||||||
option('tcg', type: 'feature', value: 'auto',
|
option('tcg', type: 'feature', value: 'enabled',
|
||||||
description: 'TCG support')
|
description: 'TCG support')
|
||||||
option('tcg_interpreter', type: 'boolean', value: false,
|
option('tcg_interpreter', type: 'boolean', value: false,
|
||||||
description: 'TCG with bytecode interpreter (slow)')
|
description: 'TCG with bytecode interpreter (slow)')
|
||||||
@ -225,6 +235,16 @@ option('oss', type: 'feature', value: 'auto',
|
|||||||
option('pa', type: 'feature', value: 'auto',
|
option('pa', type: 'feature', value: 'auto',
|
||||||
description: 'PulseAudio sound support')
|
description: 'PulseAudio sound support')
|
||||||
|
|
||||||
|
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')
|
||||||
option('vhost_user_blk_server', type: 'feature', value: 'auto',
|
option('vhost_user_blk_server', type: 'feature', value: 'auto',
|
||||||
description: 'build vhost-user-blk server')
|
description: 'build vhost-user-blk server')
|
||||||
option('virtfs', type: 'feature', value: 'auto',
|
option('virtfs', type: 'feature', value: 'auto',
|
||||||
|
@ -26,10 +26,10 @@ softmmu_ss.add(when: vde, if_true: files('vde.c'))
|
|||||||
if have_netmap
|
if have_netmap
|
||||||
softmmu_ss.add(files('netmap.c'))
|
softmmu_ss.add(files('netmap.c'))
|
||||||
endif
|
endif
|
||||||
vhost_user_ss = ss.source_set()
|
if have_vhost_net_user
|
||||||
vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
|
softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
|
||||||
softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss)
|
|
||||||
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
|
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
|
||||||
|
endif
|
||||||
|
|
||||||
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
|
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
|
softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
|
||||||
@ -40,6 +40,8 @@ if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_B
|
|||||||
endif
|
endif
|
||||||
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
|
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
|
||||||
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
|
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
|
||||||
softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c'))
|
if have_vhost_net_vdpa
|
||||||
|
softmmu_ss.add(files('vhost-vdpa.c'))
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('can')
|
subdir('can')
|
||||||
|
@ -23,8 +23,6 @@ qga_vss = shared_module(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
all_qga += qga_vss
|
|
||||||
|
|
||||||
if midl.found()
|
if midl.found()
|
||||||
gen_tlb = custom_target('gen-tlb',
|
gen_tlb = custom_target('gen-tlb',
|
||||||
input: 'qga-vss.idl',
|
input: 'qga-vss.idl',
|
||||||
@ -36,3 +34,5 @@ else
|
|||||||
output: 'qga-vss.tlb',
|
output: 'qga-vss.tlb',
|
||||||
command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@'])
|
command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@'])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
all_qga += [ qga_vss, gen_tlb ]
|
||||||
|
@ -132,11 +132,9 @@
|
|||||||
--disable-vhost-crypto \
|
--disable-vhost-crypto \
|
||||||
--disable-vhost-kernel \
|
--disable-vhost-kernel \
|
||||||
--disable-vhost-net \
|
--disable-vhost-net \
|
||||||
--disable-vhost-scsi \
|
|
||||||
--disable-vhost-user \
|
--disable-vhost-user \
|
||||||
--disable-vhost-user-blk-server \
|
--disable-vhost-user-blk-server \
|
||||||
--disable-vhost-vdpa \
|
--disable-vhost-vdpa \
|
||||||
--disable-vhost-vsock \
|
|
||||||
--disable-virglrenderer \
|
--disable-virglrenderer \
|
||||||
--disable-virtfs \
|
--disable-virtfs \
|
||||||
--disable-virtiofsd \
|
--disable-virtiofsd \
|
||||||
@ -198,7 +196,6 @@
|
|||||||
--enable-vhost-user \
|
--enable-vhost-user \
|
||||||
--enable-vhost-user-blk-server \
|
--enable-vhost-user-blk-server \
|
||||||
--enable-vhost-vdpa \
|
--enable-vhost-vdpa \
|
||||||
--enable-vhost-vsock \
|
|
||||||
--enable-vnc \
|
--enable-vnc \
|
||||||
--enable-png \
|
--enable-png \
|
||||||
--enable-vnc-sasl \
|
--enable-vnc-sasl \
|
||||||
|
@ -26,20 +26,34 @@ import shlex
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
SKIP_OPTIONS = {
|
SKIP_OPTIONS = {
|
||||||
"audio_drv_list",
|
|
||||||
"default_devices",
|
"default_devices",
|
||||||
"docdir",
|
|
||||||
"fuzzing_engine",
|
"fuzzing_engine",
|
||||||
"iasl",
|
|
||||||
"qemu_firmwarepath",
|
|
||||||
"qemu_suffix",
|
"qemu_suffix",
|
||||||
"smbd",
|
"smbd",
|
||||||
"sphinx_build",
|
}
|
||||||
"trace_file",
|
|
||||||
|
OPTION_NAMES = {
|
||||||
|
"b_coverage": "gcov",
|
||||||
|
"b_lto": "lto",
|
||||||
|
"malloc": "enable-malloc",
|
||||||
|
"pkgversion": "with-pkgversion",
|
||||||
|
"qemu_firmwarepath": "firmwarepath",
|
||||||
|
"trace_backends": "enable-trace-backends",
|
||||||
|
"trace_file": "with-trace-file",
|
||||||
}
|
}
|
||||||
|
|
||||||
BUILTIN_OPTIONS = {
|
BUILTIN_OPTIONS = {
|
||||||
|
"b_coverage",
|
||||||
|
"b_lto",
|
||||||
|
"datadir",
|
||||||
|
"includedir",
|
||||||
|
"libdir",
|
||||||
|
"libexecdir",
|
||||||
|
"localedir",
|
||||||
|
"localstatedir",
|
||||||
|
"mandir",
|
||||||
"strip",
|
"strip",
|
||||||
|
"sysconfdir",
|
||||||
}
|
}
|
||||||
|
|
||||||
LINE_WIDTH = 76
|
LINE_WIDTH = 76
|
||||||
@ -75,7 +89,7 @@ def help_line(left, opt, indent, long):
|
|||||||
right = f'{opt["description"]}'
|
right = f'{opt["description"]}'
|
||||||
if long:
|
if long:
|
||||||
value = value_to_help(opt["value"])
|
value = value_to_help(opt["value"])
|
||||||
if value != "auto":
|
if value != "auto" and value != "":
|
||||||
right += f" [{value}]"
|
right += f" [{value}]"
|
||||||
if "choices" in opt and long:
|
if "choices" in opt and long:
|
||||||
choices = "/".join(sorted(opt["choices"]))
|
choices = "/".join(sorted(opt["choices"]))
|
||||||
@ -96,6 +110,18 @@ def allow_arg(opt):
|
|||||||
return not (set(opt["choices"]) <= {"auto", "disabled", "enabled"})
|
return not (set(opt["choices"]) <= {"auto", "disabled", "enabled"})
|
||||||
|
|
||||||
|
|
||||||
|
# Return whether the option (a dictionary) can be used without
|
||||||
|
# arguments. Booleans can only be used without arguments;
|
||||||
|
# combos require an argument if they accept neither "enabled"
|
||||||
|
# nor "disabled"
|
||||||
|
def require_arg(opt):
|
||||||
|
if opt["type"] == "boolean":
|
||||||
|
return False
|
||||||
|
if opt["type"] != "combo":
|
||||||
|
return True
|
||||||
|
return not ({"enabled", "disabled"}.intersection(opt["choices"]))
|
||||||
|
|
||||||
|
|
||||||
def filter_options(json):
|
def filter_options(json):
|
||||||
if ":" in json["name"]:
|
if ":" in json["name"]:
|
||||||
return False
|
return False
|
||||||
@ -110,20 +136,48 @@ def load_options(json):
|
|||||||
return sorted(json, key=lambda x: x["name"])
|
return sorted(json, key=lambda x: x["name"])
|
||||||
|
|
||||||
|
|
||||||
|
def cli_option(opt):
|
||||||
|
name = opt["name"]
|
||||||
|
if name in OPTION_NAMES:
|
||||||
|
return OPTION_NAMES[name]
|
||||||
|
return name.replace("_", "-")
|
||||||
|
|
||||||
|
|
||||||
|
def cli_help_key(opt):
|
||||||
|
key = cli_option(opt)
|
||||||
|
if require_arg(opt):
|
||||||
|
return key
|
||||||
|
if opt["type"] == "boolean" and opt["value"]:
|
||||||
|
return f"disable-{key}"
|
||||||
|
return f"enable-{key}"
|
||||||
|
|
||||||
|
|
||||||
|
def cli_metavar(opt):
|
||||||
|
if opt["type"] == "string":
|
||||||
|
return "VALUE"
|
||||||
|
if opt["type"] == "array":
|
||||||
|
return "CHOICES"
|
||||||
|
return "CHOICE"
|
||||||
|
|
||||||
|
|
||||||
def print_help(options):
|
def print_help(options):
|
||||||
print("meson_options_help() {")
|
print("meson_options_help() {")
|
||||||
for opt in options:
|
for opt in sorted(options, key=cli_help_key):
|
||||||
key = opt["name"].replace("_", "-")
|
key = cli_help_key(opt)
|
||||||
# The first section includes options that have an arguments,
|
# The first section includes options that have an arguments,
|
||||||
# and booleans (i.e., only one of enable/disable makes sense)
|
# and booleans (i.e., only one of enable/disable makes sense)
|
||||||
if opt["type"] == "boolean":
|
if require_arg(opt):
|
||||||
left = f"--disable-{key}" if opt["value"] else f"--enable-{key}"
|
metavar = cli_metavar(opt)
|
||||||
|
left = f"--{key}={metavar}"
|
||||||
|
help_line(left, opt, 27, True)
|
||||||
|
elif opt["type"] == "boolean":
|
||||||
|
left = f"--{key}"
|
||||||
help_line(left, opt, 27, False)
|
help_line(left, opt, 27, False)
|
||||||
elif allow_arg(opt):
|
elif allow_arg(opt):
|
||||||
if opt["type"] == "combo" and "enabled" in opt["choices"]:
|
if opt["type"] == "combo" and "enabled" in opt["choices"]:
|
||||||
left = f"--enable-{key}[=CHOICE]"
|
left = f"--{key}[=CHOICE]"
|
||||||
else:
|
else:
|
||||||
left = f"--enable-{key}=CHOICE"
|
left = f"--{key}=CHOICE"
|
||||||
help_line(left, opt, 27, True)
|
help_line(left, opt, 27, True)
|
||||||
|
|
||||||
sh_print()
|
sh_print()
|
||||||
@ -142,9 +196,11 @@ def print_parse(options):
|
|||||||
print("_meson_option_parse() {")
|
print("_meson_option_parse() {")
|
||||||
print(" case $1 in")
|
print(" case $1 in")
|
||||||
for opt in options:
|
for opt in options:
|
||||||
key = opt["name"].replace("_", "-")
|
key = cli_option(opt)
|
||||||
name = opt["name"]
|
name = opt["name"]
|
||||||
if opt["type"] == "boolean":
|
if require_arg(opt):
|
||||||
|
print(f' --{key}=*) quote_sh "-D{name}=$2" ;;')
|
||||||
|
elif opt["type"] == "boolean":
|
||||||
print(f' --enable-{key}) printf "%s" -D{name}=true ;;')
|
print(f' --enable-{key}) printf "%s" -D{name}=true ;;')
|
||||||
print(f' --disable-{key}) printf "%s" -D{name}=false ;;')
|
print(f' --disable-{key}) printf "%s" -D{name}=false ;;')
|
||||||
else:
|
else:
|
||||||
|
@ -1,5 +1,18 @@
|
|||||||
# This file is generated by meson-buildoptions.py, do not edit!
|
# This file is generated by meson-buildoptions.py, do not edit!
|
||||||
meson_options_help() {
|
meson_options_help() {
|
||||||
|
printf "%s\n" ' --audio-drv-list=CHOICES Set audio driver list [default] (choices:'
|
||||||
|
printf "%s\n" ' alsa/coreaudio/default/dsound/jack/oss/pa/sdl)'
|
||||||
|
printf "%s\n" ' --block-drv-ro-whitelist=VALUE'
|
||||||
|
printf "%s\n" ' set block driver read-only whitelist (by default'
|
||||||
|
printf "%s\n" ' affects only QEMU, not tools like qemu-img)'
|
||||||
|
printf "%s\n" ' --block-drv-rw-whitelist=VALUE'
|
||||||
|
printf "%s\n" ' set block driver read-write whitelist (by default'
|
||||||
|
printf "%s\n" ' affects only QEMU, not tools like qemu-img)'
|
||||||
|
printf "%s\n" ' --datadir=VALUE Data file directory [share]'
|
||||||
|
printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better performance)'
|
||||||
|
printf "%s\n" ' --disable-install-blobs install provided firmware blobs'
|
||||||
|
printf "%s\n" ' --docdir=VALUE Base directory for documentation installation'
|
||||||
|
printf "%s\n" ' (can be empty) [share/doc]'
|
||||||
printf "%s\n" ' --enable-block-drv-whitelist-in-tools'
|
printf "%s\n" ' --enable-block-drv-whitelist-in-tools'
|
||||||
printf "%s\n" ' use block whitelist also in tools instead of only'
|
printf "%s\n" ' use block whitelist also in tools instead of only'
|
||||||
printf "%s\n" ' QEMU'
|
printf "%s\n" ' QEMU'
|
||||||
@ -8,15 +21,15 @@ meson_options_help() {
|
|||||||
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
||||||
printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)'
|
printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)'
|
||||||
printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI violation'
|
printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI violation'
|
||||||
printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better performance)'
|
|
||||||
printf "%s\n" ' --enable-debug-mutex mutex debugging support'
|
printf "%s\n" ' --enable-debug-mutex mutex debugging support'
|
||||||
printf "%s\n" ' --enable-debug-stack-usage'
|
printf "%s\n" ' --enable-debug-stack-usage'
|
||||||
printf "%s\n" ' measure coroutine stack usage'
|
printf "%s\n" ' measure coroutine stack usage'
|
||||||
printf "%s\n" ' --enable-fdt[=CHOICE] Whether and how to find the libfdt library'
|
printf "%s\n" ' --enable-fdt[=CHOICE] Whether and how to find the libfdt library'
|
||||||
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
||||||
printf "%s\n" ' --enable-fuzzing build fuzzing targets'
|
printf "%s\n" ' --enable-fuzzing build fuzzing targets'
|
||||||
|
printf "%s\n" ' --enable-gcov Enable coverage tracking.'
|
||||||
printf "%s\n" ' --enable-gprof QEMU profiling with gprof'
|
printf "%s\n" ' --enable-gprof QEMU profiling with gprof'
|
||||||
printf "%s\n" ' --disable-install-blobs install provided firmware blobs'
|
printf "%s\n" ' --enable-lto Use link time optimization'
|
||||||
printf "%s\n" ' --enable-malloc=CHOICE choose memory allocator to use [system] (choices:'
|
printf "%s\n" ' --enable-malloc=CHOICE choose memory allocator to use [system] (choices:'
|
||||||
printf "%s\n" ' jemalloc/system/tcmalloc)'
|
printf "%s\n" ' jemalloc/system/tcmalloc)'
|
||||||
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
|
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
|
||||||
@ -29,9 +42,26 @@ meson_options_help() {
|
|||||||
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
|
||||||
printf "%s\n" ' --enable-strip Strip targets on install'
|
printf "%s\n" ' --enable-strip Strip targets on install'
|
||||||
printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)'
|
printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)'
|
||||||
printf "%s\n" ' --enable-trace-backends=CHOICE'
|
printf "%s\n" ' --enable-trace-backends=CHOICES'
|
||||||
printf "%s\n" ' Set available tracing backends [log] (choices:'
|
printf "%s\n" ' Set available tracing backends [log] (choices:'
|
||||||
printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)'
|
printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)'
|
||||||
|
printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [qemu-firmware]'
|
||||||
|
printf "%s\n" ' --iasl=VALUE Path to ACPI disassembler'
|
||||||
|
printf "%s\n" ' --includedir=VALUE Header file directory [include]'
|
||||||
|
printf "%s\n" ' --interp-prefix=VALUE where to find shared libraries etc., use %M for'
|
||||||
|
printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]'
|
||||||
|
printf "%s\n" ' --libdir=VALUE Library directory [lib64]'
|
||||||
|
printf "%s\n" ' --libexecdir=VALUE Library executable directory [libexec]'
|
||||||
|
printf "%s\n" ' --localedir=VALUE Locale data directory [share/locale]'
|
||||||
|
printf "%s\n" ' --localstatedir=VALUE Localstate data directory [/var/local]'
|
||||||
|
printf "%s\n" ' --mandir=VALUE Manual page directory [share/man]'
|
||||||
|
printf "%s\n" ' --sphinx-build=VALUE Use specified sphinx-build for building document'
|
||||||
|
printf "%s\n" ' --sysconfdir=VALUE Sysconf data directory [etc]'
|
||||||
|
printf "%s\n" ' --tls-priority=VALUE Default TLS protocol/cipher priority string'
|
||||||
|
printf "%s\n" ' [NORMAL]'
|
||||||
|
printf "%s\n" ' --with-pkgversion=VALUE use specified string as sub-version of the'
|
||||||
|
printf "%s\n" ' package'
|
||||||
|
printf "%s\n" ' --with-trace-file=VALUE Trace file prefix for simple backend [trace]'
|
||||||
printf "%s\n" ''
|
printf "%s\n" ''
|
||||||
printf "%s\n" 'Optional features, enabled with --enable-FEATURE and'
|
printf "%s\n" 'Optional features, enabled with --enable-FEATURE and'
|
||||||
printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if available'
|
printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if available'
|
||||||
@ -124,8 +154,13 @@ meson_options_help() {
|
|||||||
printf "%s\n" ' usb-redir libusbredir support'
|
printf "%s\n" ' usb-redir libusbredir support'
|
||||||
printf "%s\n" ' vde vde network backend support'
|
printf "%s\n" ' vde vde network backend support'
|
||||||
printf "%s\n" ' vdi vdi image format support'
|
printf "%s\n" ' vdi vdi image format support'
|
||||||
|
printf "%s\n" ' vhost-crypto vhost-user crypto backend support'
|
||||||
|
printf "%s\n" ' vhost-kernel vhost kernel backend support'
|
||||||
|
printf "%s\n" ' vhost-net vhost-net kernel acceleration support'
|
||||||
|
printf "%s\n" ' vhost-user vhost-user backend support'
|
||||||
printf "%s\n" ' vhost-user-blk-server'
|
printf "%s\n" ' vhost-user-blk-server'
|
||||||
printf "%s\n" ' build vhost-user-blk server'
|
printf "%s\n" ' build vhost-user-blk server'
|
||||||
|
printf "%s\n" ' vhost-vdpa vhost-vdpa kernel backend support'
|
||||||
printf "%s\n" ' virglrenderer virgl rendering support'
|
printf "%s\n" ' virglrenderer virgl rendering support'
|
||||||
printf "%s\n" ' virtfs virtio-9p support'
|
printf "%s\n" ' virtfs virtio-9p support'
|
||||||
printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)'
|
printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)'
|
||||||
@ -147,12 +182,19 @@ _meson_option_parse() {
|
|||||||
--disable-alsa) printf "%s" -Dalsa=disabled ;;
|
--disable-alsa) printf "%s" -Dalsa=disabled ;;
|
||||||
--enable-attr) printf "%s" -Dattr=enabled ;;
|
--enable-attr) printf "%s" -Dattr=enabled ;;
|
||||||
--disable-attr) printf "%s" -Dattr=disabled ;;
|
--disable-attr) printf "%s" -Dattr=disabled ;;
|
||||||
|
--audio-drv-list=*) quote_sh "-Daudio_drv_list=$2" ;;
|
||||||
--enable-auth-pam) printf "%s" -Dauth_pam=enabled ;;
|
--enable-auth-pam) printf "%s" -Dauth_pam=enabled ;;
|
||||||
--disable-auth-pam) printf "%s" -Dauth_pam=disabled ;;
|
--disable-auth-pam) printf "%s" -Dauth_pam=disabled ;;
|
||||||
--enable-avx2) printf "%s" -Davx2=enabled ;;
|
--enable-avx2) printf "%s" -Davx2=enabled ;;
|
||||||
--disable-avx2) printf "%s" -Davx2=disabled ;;
|
--disable-avx2) printf "%s" -Davx2=disabled ;;
|
||||||
--enable-avx512f) printf "%s" -Davx512f=enabled ;;
|
--enable-avx512f) printf "%s" -Davx512f=enabled ;;
|
||||||
--disable-avx512f) printf "%s" -Davx512f=disabled ;;
|
--disable-avx512f) printf "%s" -Davx512f=disabled ;;
|
||||||
|
--enable-gcov) printf "%s" -Db_coverage=true ;;
|
||||||
|
--disable-gcov) printf "%s" -Db_coverage=false ;;
|
||||||
|
--enable-lto) printf "%s" -Db_lto=true ;;
|
||||||
|
--disable-lto) printf "%s" -Db_lto=false ;;
|
||||||
|
--block-drv-ro-whitelist=*) quote_sh "-Dblock_drv_ro_whitelist=$2" ;;
|
||||||
|
--block-drv-rw-whitelist=*) quote_sh "-Dblock_drv_rw_whitelist=$2" ;;
|
||||||
--enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitelist_in_tools=true ;;
|
--enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitelist_in_tools=true ;;
|
||||||
--disable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitelist_in_tools=false ;;
|
--disable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitelist_in_tools=false ;;
|
||||||
--enable-bochs) printf "%s" -Dbochs=enabled ;;
|
--enable-bochs) printf "%s" -Dbochs=enabled ;;
|
||||||
@ -186,6 +228,7 @@ _meson_option_parse() {
|
|||||||
--disable-curl) printf "%s" -Dcurl=disabled ;;
|
--disable-curl) printf "%s" -Dcurl=disabled ;;
|
||||||
--enable-curses) printf "%s" -Dcurses=enabled ;;
|
--enable-curses) printf "%s" -Dcurses=enabled ;;
|
||||||
--disable-curses) printf "%s" -Dcurses=disabled ;;
|
--disable-curses) printf "%s" -Dcurses=disabled ;;
|
||||||
|
--datadir=*) quote_sh "-Ddatadir=$2" ;;
|
||||||
--enable-dbus-display) printf "%s" -Ddbus_display=enabled ;;
|
--enable-dbus-display) printf "%s" -Ddbus_display=enabled ;;
|
||||||
--disable-dbus-display) printf "%s" -Ddbus_display=disabled ;;
|
--disable-dbus-display) printf "%s" -Ddbus_display=disabled ;;
|
||||||
--enable-debug-mutex) printf "%s" -Ddebug_mutex=true ;;
|
--enable-debug-mutex) printf "%s" -Ddebug_mutex=true ;;
|
||||||
@ -194,6 +237,7 @@ _meson_option_parse() {
|
|||||||
--disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;;
|
--disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;;
|
||||||
--enable-dmg) printf "%s" -Ddmg=enabled ;;
|
--enable-dmg) printf "%s" -Ddmg=enabled ;;
|
||||||
--disable-dmg) printf "%s" -Ddmg=disabled ;;
|
--disable-dmg) printf "%s" -Ddmg=disabled ;;
|
||||||
|
--docdir=*) quote_sh "-Ddocdir=$2" ;;
|
||||||
--enable-docs) printf "%s" -Ddocs=enabled ;;
|
--enable-docs) printf "%s" -Ddocs=enabled ;;
|
||||||
--disable-docs) printf "%s" -Ddocs=disabled ;;
|
--disable-docs) printf "%s" -Ddocs=disabled ;;
|
||||||
--enable-dsound) printf "%s" -Ddsound=enabled ;;
|
--enable-dsound) printf "%s" -Ddsound=enabled ;;
|
||||||
@ -229,10 +273,13 @@ _meson_option_parse() {
|
|||||||
--disable-hax) printf "%s" -Dhax=disabled ;;
|
--disable-hax) printf "%s" -Dhax=disabled ;;
|
||||||
--enable-hvf) printf "%s" -Dhvf=enabled ;;
|
--enable-hvf) printf "%s" -Dhvf=enabled ;;
|
||||||
--disable-hvf) printf "%s" -Dhvf=disabled ;;
|
--disable-hvf) printf "%s" -Dhvf=disabled ;;
|
||||||
|
--iasl=*) quote_sh "-Diasl=$2" ;;
|
||||||
--enable-iconv) printf "%s" -Diconv=enabled ;;
|
--enable-iconv) printf "%s" -Diconv=enabled ;;
|
||||||
--disable-iconv) printf "%s" -Diconv=disabled ;;
|
--disable-iconv) printf "%s" -Diconv=disabled ;;
|
||||||
|
--includedir=*) quote_sh "-Dincludedir=$2" ;;
|
||||||
--enable-install-blobs) printf "%s" -Dinstall_blobs=true ;;
|
--enable-install-blobs) printf "%s" -Dinstall_blobs=true ;;
|
||||||
--disable-install-blobs) printf "%s" -Dinstall_blobs=false ;;
|
--disable-install-blobs) printf "%s" -Dinstall_blobs=false ;;
|
||||||
|
--interp-prefix=*) quote_sh "-Dinterp_prefix=$2" ;;
|
||||||
--enable-jack) printf "%s" -Djack=enabled ;;
|
--enable-jack) printf "%s" -Djack=enabled ;;
|
||||||
--disable-jack) printf "%s" -Djack=disabled ;;
|
--disable-jack) printf "%s" -Djack=disabled ;;
|
||||||
--enable-keyring) printf "%s" -Dkeyring=enabled ;;
|
--enable-keyring) printf "%s" -Dkeyring=enabled ;;
|
||||||
@ -243,6 +290,8 @@ _meson_option_parse() {
|
|||||||
--disable-l2tpv3) printf "%s" -Dl2tpv3=disabled ;;
|
--disable-l2tpv3) printf "%s" -Dl2tpv3=disabled ;;
|
||||||
--enable-libdaxctl) printf "%s" -Dlibdaxctl=enabled ;;
|
--enable-libdaxctl) printf "%s" -Dlibdaxctl=enabled ;;
|
||||||
--disable-libdaxctl) printf "%s" -Dlibdaxctl=disabled ;;
|
--disable-libdaxctl) printf "%s" -Dlibdaxctl=disabled ;;
|
||||||
|
--libdir=*) quote_sh "-Dlibdir=$2" ;;
|
||||||
|
--libexecdir=*) quote_sh "-Dlibexecdir=$2" ;;
|
||||||
--enable-libiscsi) printf "%s" -Dlibiscsi=enabled ;;
|
--enable-libiscsi) printf "%s" -Dlibiscsi=enabled ;;
|
||||||
--disable-libiscsi) printf "%s" -Dlibiscsi=disabled ;;
|
--disable-libiscsi) printf "%s" -Dlibiscsi=disabled ;;
|
||||||
--enable-libnfs) printf "%s" -Dlibnfs=enabled ;;
|
--enable-libnfs) printf "%s" -Dlibnfs=enabled ;;
|
||||||
@ -261,6 +310,8 @@ _meson_option_parse() {
|
|||||||
--disable-linux-io-uring) printf "%s" -Dlinux_io_uring=disabled ;;
|
--disable-linux-io-uring) printf "%s" -Dlinux_io_uring=disabled ;;
|
||||||
--enable-live-block-migration) printf "%s" -Dlive_block_migration=enabled ;;
|
--enable-live-block-migration) printf "%s" -Dlive_block_migration=enabled ;;
|
||||||
--disable-live-block-migration) printf "%s" -Dlive_block_migration=disabled ;;
|
--disable-live-block-migration) printf "%s" -Dlive_block_migration=disabled ;;
|
||||||
|
--localedir=*) quote_sh "-Dlocaledir=$2" ;;
|
||||||
|
--localstatedir=*) quote_sh "-Dlocalstatedir=$2" ;;
|
||||||
--enable-lzfse) printf "%s" -Dlzfse=enabled ;;
|
--enable-lzfse) printf "%s" -Dlzfse=enabled ;;
|
||||||
--disable-lzfse) printf "%s" -Dlzfse=disabled ;;
|
--disable-lzfse) printf "%s" -Dlzfse=disabled ;;
|
||||||
--enable-lzo) printf "%s" -Dlzo=enabled ;;
|
--enable-lzo) printf "%s" -Dlzo=enabled ;;
|
||||||
@ -268,6 +319,7 @@ _meson_option_parse() {
|
|||||||
--enable-malloc=*) quote_sh "-Dmalloc=$2" ;;
|
--enable-malloc=*) quote_sh "-Dmalloc=$2" ;;
|
||||||
--enable-malloc-trim) printf "%s" -Dmalloc_trim=enabled ;;
|
--enable-malloc-trim) printf "%s" -Dmalloc_trim=enabled ;;
|
||||||
--disable-malloc-trim) printf "%s" -Dmalloc_trim=disabled ;;
|
--disable-malloc-trim) printf "%s" -Dmalloc_trim=disabled ;;
|
||||||
|
--mandir=*) quote_sh "-Dmandir=$2" ;;
|
||||||
--enable-membarrier) printf "%s" -Dmembarrier=enabled ;;
|
--enable-membarrier) printf "%s" -Dmembarrier=enabled ;;
|
||||||
--disable-membarrier) printf "%s" -Dmembarrier=disabled ;;
|
--disable-membarrier) printf "%s" -Dmembarrier=disabled ;;
|
||||||
--enable-module-upgrades) printf "%s" -Dmodule_upgrades=true ;;
|
--enable-module-upgrades) printf "%s" -Dmodule_upgrades=true ;;
|
||||||
@ -292,6 +344,7 @@ _meson_option_parse() {
|
|||||||
--disable-pa) printf "%s" -Dpa=disabled ;;
|
--disable-pa) printf "%s" -Dpa=disabled ;;
|
||||||
--enable-parallels) printf "%s" -Dparallels=enabled ;;
|
--enable-parallels) printf "%s" -Dparallels=enabled ;;
|
||||||
--disable-parallels) printf "%s" -Dparallels=disabled ;;
|
--disable-parallels) printf "%s" -Dparallels=disabled ;;
|
||||||
|
--with-pkgversion=*) quote_sh "-Dpkgversion=$2" ;;
|
||||||
--enable-png) printf "%s" -Dpng=enabled ;;
|
--enable-png) printf "%s" -Dpng=enabled ;;
|
||||||
--disable-png) printf "%s" -Dpng=disabled ;;
|
--disable-png) printf "%s" -Dpng=disabled ;;
|
||||||
--enable-profiler) printf "%s" -Dprofiler=true ;;
|
--enable-profiler) printf "%s" -Dprofiler=true ;;
|
||||||
@ -302,6 +355,7 @@ _meson_option_parse() {
|
|||||||
--disable-qcow1) printf "%s" -Dqcow1=disabled ;;
|
--disable-qcow1) printf "%s" -Dqcow1=disabled ;;
|
||||||
--enable-qed) printf "%s" -Dqed=enabled ;;
|
--enable-qed) printf "%s" -Dqed=enabled ;;
|
||||||
--disable-qed) printf "%s" -Dqed=disabled ;;
|
--disable-qed) printf "%s" -Dqed=disabled ;;
|
||||||
|
--firmwarepath=*) quote_sh "-Dqemu_firmwarepath=$2" ;;
|
||||||
--enable-qga-vss) printf "%s" -Dqga_vss=enabled ;;
|
--enable-qga-vss) printf "%s" -Dqga_vss=enabled ;;
|
||||||
--disable-qga-vss) printf "%s" -Dqga_vss=disabled ;;
|
--disable-qga-vss) printf "%s" -Dqga_vss=disabled ;;
|
||||||
--enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=true ;;
|
--enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=true ;;
|
||||||
@ -333,21 +387,25 @@ _meson_option_parse() {
|
|||||||
--disable-snappy) printf "%s" -Dsnappy=disabled ;;
|
--disable-snappy) printf "%s" -Dsnappy=disabled ;;
|
||||||
--enable-sparse) printf "%s" -Dsparse=enabled ;;
|
--enable-sparse) printf "%s" -Dsparse=enabled ;;
|
||||||
--disable-sparse) printf "%s" -Dsparse=disabled ;;
|
--disable-sparse) printf "%s" -Dsparse=disabled ;;
|
||||||
|
--sphinx-build=*) quote_sh "-Dsphinx_build=$2" ;;
|
||||||
--enable-spice) printf "%s" -Dspice=enabled ;;
|
--enable-spice) printf "%s" -Dspice=enabled ;;
|
||||||
--disable-spice) printf "%s" -Dspice=disabled ;;
|
--disable-spice) printf "%s" -Dspice=disabled ;;
|
||||||
--enable-spice-protocol) printf "%s" -Dspice_protocol=enabled ;;
|
--enable-spice-protocol) printf "%s" -Dspice_protocol=enabled ;;
|
||||||
--disable-spice-protocol) printf "%s" -Dspice_protocol=disabled ;;
|
--disable-spice-protocol) printf "%s" -Dspice_protocol=disabled ;;
|
||||||
--enable-strip) printf "%s" -Dstrip=true ;;
|
--enable-strip) printf "%s" -Dstrip=true ;;
|
||||||
--disable-strip) printf "%s" -Dstrip=false ;;
|
--disable-strip) printf "%s" -Dstrip=false ;;
|
||||||
|
--sysconfdir=*) quote_sh "-Dsysconfdir=$2" ;;
|
||||||
--enable-tcg) printf "%s" -Dtcg=enabled ;;
|
--enable-tcg) printf "%s" -Dtcg=enabled ;;
|
||||||
--disable-tcg) printf "%s" -Dtcg=disabled ;;
|
--disable-tcg) printf "%s" -Dtcg=disabled ;;
|
||||||
--enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
|
--enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
|
||||||
--disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=false ;;
|
--disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=false ;;
|
||||||
|
--tls-priority=*) quote_sh "-Dtls_priority=$2" ;;
|
||||||
--enable-tools) printf "%s" -Dtools=enabled ;;
|
--enable-tools) printf "%s" -Dtools=enabled ;;
|
||||||
--disable-tools) printf "%s" -Dtools=disabled ;;
|
--disable-tools) printf "%s" -Dtools=disabled ;;
|
||||||
--enable-tpm) printf "%s" -Dtpm=enabled ;;
|
--enable-tpm) printf "%s" -Dtpm=enabled ;;
|
||||||
--disable-tpm) printf "%s" -Dtpm=disabled ;;
|
--disable-tpm) printf "%s" -Dtpm=disabled ;;
|
||||||
--enable-trace-backends=*) quote_sh "-Dtrace_backends=$2" ;;
|
--enable-trace-backends=*) quote_sh "-Dtrace_backends=$2" ;;
|
||||||
|
--with-trace-file=*) quote_sh "-Dtrace_file=$2" ;;
|
||||||
--enable-u2f) printf "%s" -Du2f=enabled ;;
|
--enable-u2f) printf "%s" -Du2f=enabled ;;
|
||||||
--disable-u2f) printf "%s" -Du2f=disabled ;;
|
--disable-u2f) printf "%s" -Du2f=disabled ;;
|
||||||
--enable-usb-redir) printf "%s" -Dusb_redir=enabled ;;
|
--enable-usb-redir) printf "%s" -Dusb_redir=enabled ;;
|
||||||
@ -356,8 +414,18 @@ _meson_option_parse() {
|
|||||||
--disable-vde) printf "%s" -Dvde=disabled ;;
|
--disable-vde) printf "%s" -Dvde=disabled ;;
|
||||||
--enable-vdi) printf "%s" -Dvdi=enabled ;;
|
--enable-vdi) printf "%s" -Dvdi=enabled ;;
|
||||||
--disable-vdi) printf "%s" -Dvdi=disabled ;;
|
--disable-vdi) printf "%s" -Dvdi=disabled ;;
|
||||||
|
--enable-vhost-crypto) printf "%s" -Dvhost_crypto=enabled ;;
|
||||||
|
--disable-vhost-crypto) printf "%s" -Dvhost_crypto=disabled ;;
|
||||||
|
--enable-vhost-kernel) printf "%s" -Dvhost_kernel=enabled ;;
|
||||||
|
--disable-vhost-kernel) printf "%s" -Dvhost_kernel=disabled ;;
|
||||||
|
--enable-vhost-net) printf "%s" -Dvhost_net=enabled ;;
|
||||||
|
--disable-vhost-net) printf "%s" -Dvhost_net=disabled ;;
|
||||||
|
--enable-vhost-user) printf "%s" -Dvhost_user=enabled ;;
|
||||||
|
--disable-vhost-user) printf "%s" -Dvhost_user=disabled ;;
|
||||||
--enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=enabled ;;
|
--enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=enabled ;;
|
||||||
--disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=disabled ;;
|
--disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=disabled ;;
|
||||||
|
--enable-vhost-vdpa) printf "%s" -Dvhost_vdpa=enabled ;;
|
||||||
|
--disable-vhost-vdpa) printf "%s" -Dvhost_vdpa=disabled ;;
|
||||||
--enable-virglrenderer) printf "%s" -Dvirglrenderer=enabled ;;
|
--enable-virglrenderer) printf "%s" -Dvirglrenderer=enabled ;;
|
||||||
--disable-virglrenderer) printf "%s" -Dvirglrenderer=disabled ;;
|
--disable-virglrenderer) printf "%s" -Dvirglrenderer=disabled ;;
|
||||||
--enable-virtfs) printf "%s" -Dvirtfs=enabled ;;
|
--enable-virtfs) printf "%s" -Dvirtfs=enabled ;;
|
||||||
|
24
scripts/qemu-stamp.py
Normal file
24
scripts/qemu-stamp.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
# Usage: scripts/qemu-stamp.py STRING1 STRING2... -- FILE1 FILE2...
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sha = hashlib.sha1()
|
||||||
|
is_file = False
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if arg == '--':
|
||||||
|
is_file = True
|
||||||
|
continue
|
||||||
|
if is_file:
|
||||||
|
with open(arg, 'rb') as f:
|
||||||
|
for chunk in iter(lambda: f.read(65536), b''):
|
||||||
|
sha.update(chunk)
|
||||||
|
else:
|
||||||
|
sha.update(os.fsencode(arg))
|
||||||
|
sha.update(b'\n')
|
||||||
|
|
||||||
|
# The hash can start with a digit, which the compiler doesn't
|
||||||
|
# like as an symbol. So prefix it with an underscore
|
||||||
|
print("_" + sha.hexdigest())
|
203
scripts/xen-detect.c
Normal file
203
scripts/xen-detect.c
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
/* Test programs for various Xen versions that QEMU supports. */
|
||||||
|
#if CONFIG_XEN_CTRL_INTERFACE_VERSION == 41100
|
||||||
|
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
||||||
|
#define __XEN_TOOLS__
|
||||||
|
#include <xendevicemodel.h>
|
||||||
|
#include <xenforeignmemory.h>
|
||||||
|
int main(void) {
|
||||||
|
xendevicemodel_handle *xd;
|
||||||
|
xenforeignmemory_handle *xfmem;
|
||||||
|
|
||||||
|
xd = xendevicemodel_open(0, 0);
|
||||||
|
xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
xfmem = xenforeignmemory_open(0, 0);
|
||||||
|
xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 41000
|
||||||
|
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
||||||
|
#include <xenforeignmemory.h>
|
||||||
|
#include <xentoolcore.h>
|
||||||
|
int main(void) {
|
||||||
|
xenforeignmemory_handle *xfmem;
|
||||||
|
|
||||||
|
xfmem = xenforeignmemory_open(0, 0);
|
||||||
|
xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
xentoolcore_restrict_all(0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40900
|
||||||
|
#undef XC_WANT_COMPAT_DEVICEMODEL_API
|
||||||
|
#define __XEN_TOOLS__
|
||||||
|
#include <xendevicemodel.h>
|
||||||
|
int main(void) {
|
||||||
|
xendevicemodel_handle *xd;
|
||||||
|
|
||||||
|
xd = xendevicemodel_open(0, 0);
|
||||||
|
xendevicemodel_close(xd);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40800
|
||||||
|
/*
|
||||||
|
* If we have stable libs the we don't want the libxc compat
|
||||||
|
* layers, regardless of what CFLAGS we may have been given.
|
||||||
|
*
|
||||||
|
* Also, check if xengnttab_grant_copy_segment_t is defined and
|
||||||
|
* grant copy operation is implemented.
|
||||||
|
*/
|
||||||
|
#undef XC_WANT_COMPAT_EVTCHN_API
|
||||||
|
#undef XC_WANT_COMPAT_GNTTAB_API
|
||||||
|
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
||||||
|
#include <xenctrl.h>
|
||||||
|
#include <xenstore.h>
|
||||||
|
#include <xenevtchn.h>
|
||||||
|
#include <xengnttab.h>
|
||||||
|
#include <xenforeignmemory.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <xen/hvm/hvm_info_table.h>
|
||||||
|
#if !defined(HVM_MAX_VCPUS)
|
||||||
|
# error HVM_MAX_VCPUS not defined
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
xc_interface *xc = NULL;
|
||||||
|
xenforeignmemory_handle *xfmem;
|
||||||
|
xenevtchn_handle *xe;
|
||||||
|
xengnttab_handle *xg;
|
||||||
|
xengnttab_grant_copy_segment_t* seg = NULL;
|
||||||
|
|
||||||
|
xs_daemon_open();
|
||||||
|
|
||||||
|
xc = xc_interface_open(0, 0, 0);
|
||||||
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
||||||
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
||||||
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
||||||
|
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
||||||
|
|
||||||
|
xfmem = xenforeignmemory_open(0, 0);
|
||||||
|
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
xe = xenevtchn_open(0, 0);
|
||||||
|
xenevtchn_fd(xe);
|
||||||
|
|
||||||
|
xg = xengnttab_open(0, 0);
|
||||||
|
xengnttab_grant_copy(xg, 0, seg);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40701
|
||||||
|
/*
|
||||||
|
* If we have stable libs the we don't want the libxc compat
|
||||||
|
* layers, regardless of what CFLAGS we may have been given.
|
||||||
|
*/
|
||||||
|
#undef XC_WANT_COMPAT_EVTCHN_API
|
||||||
|
#undef XC_WANT_COMPAT_GNTTAB_API
|
||||||
|
#undef XC_WANT_COMPAT_MAP_FOREIGN_API
|
||||||
|
#include <xenctrl.h>
|
||||||
|
#include <xenstore.h>
|
||||||
|
#include <xenevtchn.h>
|
||||||
|
#include <xengnttab.h>
|
||||||
|
#include <xenforeignmemory.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <xen/hvm/hvm_info_table.h>
|
||||||
|
#if !defined(HVM_MAX_VCPUS)
|
||||||
|
# error HVM_MAX_VCPUS not defined
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
xc_interface *xc = NULL;
|
||||||
|
xenforeignmemory_handle *xfmem;
|
||||||
|
xenevtchn_handle *xe;
|
||||||
|
xengnttab_handle *xg;
|
||||||
|
|
||||||
|
xs_daemon_open();
|
||||||
|
|
||||||
|
xc = xc_interface_open(0, 0, 0);
|
||||||
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
||||||
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
||||||
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
||||||
|
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
||||||
|
|
||||||
|
xfmem = xenforeignmemory_open(0, 0);
|
||||||
|
xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
xe = xenevtchn_open(0, 0);
|
||||||
|
xenevtchn_fd(xe);
|
||||||
|
|
||||||
|
xg = xengnttab_open(0, 0);
|
||||||
|
xengnttab_map_grant_ref(xg, 0, 0, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40600
|
||||||
|
#include <xenctrl.h>
|
||||||
|
#include <xenstore.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <xen/hvm/hvm_info_table.h>
|
||||||
|
#if !defined(HVM_MAX_VCPUS)
|
||||||
|
# error HVM_MAX_VCPUS not defined
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
xc_interface *xc;
|
||||||
|
xs_daemon_open();
|
||||||
|
xc = xc_interface_open(0, 0, 0);
|
||||||
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
||||||
|
xc_gnttab_open(NULL, 0);
|
||||||
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
||||||
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
||||||
|
xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
|
||||||
|
xc_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40500
|
||||||
|
#include <xenctrl.h>
|
||||||
|
#include <xenstore.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <xen/hvm/hvm_info_table.h>
|
||||||
|
#if !defined(HVM_MAX_VCPUS)
|
||||||
|
# error HVM_MAX_VCPUS not defined
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
xc_interface *xc;
|
||||||
|
xs_daemon_open();
|
||||||
|
xc = xc_interface_open(0, 0, 0);
|
||||||
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
||||||
|
xc_gnttab_open(NULL, 0);
|
||||||
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
||||||
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
||||||
|
xc_hvm_create_ioreq_server(xc, 0, 0, NULL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#elif CONFIG_XEN_CTRL_INTERFACE_VERSION == 40200
|
||||||
|
#include <xenctrl.h>
|
||||||
|
#include <xenstore.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <xen/hvm/hvm_info_table.h>
|
||||||
|
#if !defined(HVM_MAX_VCPUS)
|
||||||
|
# error HVM_MAX_VCPUS not defined
|
||||||
|
#endif
|
||||||
|
int main(void) {
|
||||||
|
xc_interface *xc;
|
||||||
|
xs_daemon_open();
|
||||||
|
xc = xc_interface_open(0, 0, 0);
|
||||||
|
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
|
||||||
|
xc_gnttab_open(NULL, 0);
|
||||||
|
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
|
||||||
|
xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error invalid CONFIG_XEN_CTRL_INTERFACE_VERSION
|
||||||
|
#endif
|
@ -246,9 +246,15 @@ static bool whpx_allowed;
|
|||||||
static bool whp_dispatch_initialized;
|
static bool whp_dispatch_initialized;
|
||||||
static HMODULE hWinHvPlatform, hWinHvEmulation;
|
static HMODULE hWinHvPlatform, hWinHvEmulation;
|
||||||
static uint32_t max_vcpu_index;
|
static uint32_t max_vcpu_index;
|
||||||
|
static WHV_PROCESSOR_XSAVE_FEATURES whpx_xsave_cap;
|
||||||
|
|
||||||
struct whpx_state whpx_global;
|
struct whpx_state whpx_global;
|
||||||
struct WHPDispatch whp_dispatch;
|
struct WHPDispatch whp_dispatch;
|
||||||
|
|
||||||
|
static bool whpx_has_xsave(void)
|
||||||
|
{
|
||||||
|
return whpx_xsave_cap.XsaveSupport;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VP support
|
* VP support
|
||||||
@ -300,6 +306,28 @@ static SegmentCache whpx_seg_h2q(const WHV_X64_SEGMENT_REGISTER *hs)
|
|||||||
return qs;
|
return qs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* X64 Extended Control Registers */
|
||||||
|
static void whpx_set_xcrs(CPUState *cpu)
|
||||||
|
{
|
||||||
|
CPUX86State *env = cpu->env_ptr;
|
||||||
|
HRESULT hr;
|
||||||
|
struct whpx_state *whpx = &whpx_global;
|
||||||
|
WHV_REGISTER_VALUE xcr0;
|
||||||
|
WHV_REGISTER_NAME xcr0_name = WHvX64RegisterXCr0;
|
||||||
|
|
||||||
|
if (!whpx_has_xsave()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Only xcr0 is supported by the hypervisor currently */
|
||||||
|
xcr0.Reg64 = env->xcr0;
|
||||||
|
hr = whp_dispatch.WHvSetVirtualProcessorRegisters(
|
||||||
|
whpx->partition, cpu->cpu_index, &xcr0_name, 1, &xcr0);
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
error_report("WHPX: Failed to set register xcr0, hr=%08lx", hr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int whpx_set_tsc(CPUState *cpu)
|
static int whpx_set_tsc(CPUState *cpu)
|
||||||
{
|
{
|
||||||
CPUX86State *env = cpu->env_ptr;
|
CPUX86State *env = cpu->env_ptr;
|
||||||
@ -435,6 +463,12 @@ static void whpx_set_registers(CPUState *cpu, int level)
|
|||||||
|
|
||||||
/* 8 Debug Registers - Skipped */
|
/* 8 Debug Registers - Skipped */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extended control registers needs to be handled separately depending
|
||||||
|
* on whether xsave is supported/enabled or not.
|
||||||
|
*/
|
||||||
|
whpx_set_xcrs(cpu);
|
||||||
|
|
||||||
/* 16 XMM registers */
|
/* 16 XMM registers */
|
||||||
assert(whpx_register_names[idx] == WHvX64RegisterXmm0);
|
assert(whpx_register_names[idx] == WHvX64RegisterXmm0);
|
||||||
idx_next = idx + 16;
|
idx_next = idx + 16;
|
||||||
@ -541,6 +575,30 @@ static int whpx_get_tsc(CPUState *cpu)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* X64 Extended Control Registers */
|
||||||
|
static void whpx_get_xcrs(CPUState *cpu)
|
||||||
|
{
|
||||||
|
CPUX86State *env = cpu->env_ptr;
|
||||||
|
HRESULT hr;
|
||||||
|
struct whpx_state *whpx = &whpx_global;
|
||||||
|
WHV_REGISTER_VALUE xcr0;
|
||||||
|
WHV_REGISTER_NAME xcr0_name = WHvX64RegisterXCr0;
|
||||||
|
|
||||||
|
if (!whpx_has_xsave()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Only xcr0 is supported by the hypervisor currently */
|
||||||
|
hr = whp_dispatch.WHvGetVirtualProcessorRegisters(
|
||||||
|
whpx->partition, cpu->cpu_index, &xcr0_name, 1, &xcr0);
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
error_report("WHPX: Failed to get register xcr0, hr=%08lx", hr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
env->xcr0 = xcr0.Reg64;
|
||||||
|
}
|
||||||
|
|
||||||
static void whpx_get_registers(CPUState *cpu)
|
static void whpx_get_registers(CPUState *cpu)
|
||||||
{
|
{
|
||||||
struct whpx_state *whpx = &whpx_global;
|
struct whpx_state *whpx = &whpx_global;
|
||||||
@ -634,6 +692,12 @@ static void whpx_get_registers(CPUState *cpu)
|
|||||||
|
|
||||||
/* 8 Debug Registers - Skipped */
|
/* 8 Debug Registers - Skipped */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extended control registers needs to be handled separately depending
|
||||||
|
* on whether xsave is supported/enabled or not.
|
||||||
|
*/
|
||||||
|
whpx_get_xcrs(cpu);
|
||||||
|
|
||||||
/* 16 XMM registers */
|
/* 16 XMM registers */
|
||||||
assert(whpx_register_names[idx] == WHvX64RegisterXmm0);
|
assert(whpx_register_names[idx] == WHvX64RegisterXmm0);
|
||||||
idx_next = idx + 16;
|
idx_next = idx + 16;
|
||||||
@ -2513,6 +2577,29 @@ static int whpx_accel_init(MachineState *ms)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Query the XSAVE capability of the partition. Any error here is not
|
||||||
|
* considered fatal.
|
||||||
|
*/
|
||||||
|
hr = whp_dispatch.WHvGetPartitionProperty(
|
||||||
|
whpx->partition,
|
||||||
|
WHvPartitionPropertyCodeProcessorXsaveFeatures,
|
||||||
|
&whpx_xsave_cap,
|
||||||
|
sizeof(whpx_xsave_cap),
|
||||||
|
&whpx_cap_size);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Windows version which don't support this property will return with the
|
||||||
|
* specific error code.
|
||||||
|
*/
|
||||||
|
if (FAILED(hr) && hr != WHV_E_UNKNOWN_PROPERTY) {
|
||||||
|
error_report("WHPX: Failed to query XSAVE capability, hr=%08lx", hr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!whpx_has_xsave()) {
|
||||||
|
printf("WHPX: Partition is not XSAVE capable\n");
|
||||||
|
}
|
||||||
|
|
||||||
memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY));
|
memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY));
|
||||||
prop.ProcessorCount = ms->smp.cpus;
|
prop.ProcessorCount = ms->smp.cpus;
|
||||||
hr = whp_dispatch.WHvSetPartitionProperty(
|
hr = whp_dispatch.WHvSetPartitionProperty(
|
||||||
|
@ -48,6 +48,9 @@ void whpx_apic_get(DeviceState *s);
|
|||||||
|
|
||||||
#define WHV_E_UNKNOWN_CAPABILITY 0x80370300L
|
#define WHV_E_UNKNOWN_CAPABILITY 0x80370300L
|
||||||
|
|
||||||
|
/* This should eventually come from the Windows SDK */
|
||||||
|
#define WHV_E_UNKNOWN_PROPERTY 0x80370302
|
||||||
|
|
||||||
#define LIST_WINHVPLATFORM_FUNCTIONS(X) \
|
#define LIST_WINHVPLATFORM_FUNCTIONS(X) \
|
||||||
X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeInBytes)) \
|
X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeInBytes)) \
|
||||||
X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \
|
X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \
|
||||||
|
@ -68,7 +68,7 @@ test_deps = {
|
|||||||
'test-qht-par': qht_bench,
|
'test-qht-par': qht_bench,
|
||||||
}
|
}
|
||||||
|
|
||||||
if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host
|
if have_tools and have_vhost_user and 'CONFIG_LINUX' in config_host
|
||||||
executable('vhost-user-bridge',
|
executable('vhost-user-bridge',
|
||||||
sources: files('vhost-user-bridge.c'),
|
sources: files('vhost-user-bridge.c'),
|
||||||
dependencies: [qemuutil, vhost_user])
|
dependencies: [qemuutil, vhost_user])
|
||||||
|
@ -264,7 +264,9 @@ qos_test_ss.add(
|
|||||||
if have_virtfs
|
if have_virtfs
|
||||||
qos_test_ss.add(files('virtio-9p-test.c'))
|
qos_test_ss.add(files('virtio-9p-test.c'))
|
||||||
endif
|
endif
|
||||||
qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test.c'))
|
if have_vhost_user
|
||||||
|
qos_test_ss.add(files('vhost-user-test.c'))
|
||||||
|
endif
|
||||||
if have_tools and have_vhost_user_blk_server
|
if have_tools and have_vhost_user_blk_server
|
||||||
qos_test_ss.add(files('vhost-user-blk-test.c'))
|
qos_test_ss.add(files('vhost-user-blk-test.c'))
|
||||||
endif
|
endif
|
||||||
|
@ -3,7 +3,7 @@ have_virtiofsd = get_option('virtiofsd') \
|
|||||||
error_message: 'virtiofsd requires Linux') \
|
error_message: 'virtiofsd requires Linux') \
|
||||||
.require(seccomp.found() and libcap_ng.found(),
|
.require(seccomp.found() and libcap_ng.found(),
|
||||||
error_message: 'virtiofsd requires libcap-ng-devel and seccomp-devel') \
|
error_message: 'virtiofsd requires libcap-ng-devel and seccomp-devel') \
|
||||||
.require('CONFIG_VHOST_USER' in config_host,
|
.require(have_vhost_user,
|
||||||
error_message: 'virtiofsd needs vhost-user-support') \
|
error_message: 'virtiofsd needs vhost-user-support') \
|
||||||
.disable_auto_if(not have_tools and not have_system) \
|
.disable_auto_if(not have_tools and not have_system) \
|
||||||
.allowed()
|
.allowed()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user