Build system and KVM changes for 2021-12-23
Subsystems (4)
The following changes since commit afe33262585565b64df706c62b4b0f6e0ad30c71:
Merge tag 'pull-riscv-to-apply-20220108' of github.com:alistair23/qemu into staging (2022-01-07 22:09:24 -0800)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to fb714a07243a88c41002c23a24e174c5d9d40d57:
meson: reenable filemonitor-inotify compilation (2022-01-09 17:45:02 +0100)
----------------------------------------------------------------
* configure and meson cleanups
* KVM_GET/SET_SREGS2 support for x86
----------------------------------------------------------------
Maxim Levitsky (1):
KVM: use KVM_{GET|SET}_SREGS2 when supported.
Paolo Bonzini (14):
meson: reuse common_user_inc when building files specific to user-mode emulators
user: move common-user includes to a subdirectory of {bsd,linux}-user/
meson: cleanup common-user/ build
configure: simplify creation of plugin symbol list
configure: do not set bsd_user/linux_user early
configure, makefile: remove traces of really old files
configure: parse --enable/--disable-strip automatically, flip default
configure: move non-command-line variables away from command-line parsing section
meson: build contrib/ executables after generated headers configure, meson: move config-poison.h to meson
meson: add comments in the target-specific flags section
KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS
configure: do not create roms/seabios/config.mak if SeaBIOS not present
meson: build all modules by default
Philippe Mathieu-Daudé (1):
tests/tcg: Fix target-specific Makefile variables path for user-mode
Thomas Huth (1):
block/file-posix: Simplify the XFS_IOC_DIOINFO handling
Volker Rümelin (1):
meson: reenable filemonitor-inotify compilation
Makefile | 11 +-
block/file-posix.c | 37 ++--
bsd-user/{ => include}/special-errno.h | 0
bsd-user/meson.build | 2 +-
common-user/meson.build | 2 +-
configure | 189 ++++-----------------
contrib/elf2dmp/meson.build | 2 +-
contrib/ivshmem-client/meson.build | 2 +-
contrib/ivshmem-server/meson.build | 2 +-
contrib/rdmacm-mux/meson.build | 2 +-
.../{ => include}/host/aarch64/host-signal.h | 0
linux-user/{ => include}/host/alpha/host-signal.h | 0
linux-user/{ => include}/host/arm/host-signal.h | 0
linux-user/{ => include}/host/i386/host-signal.h | 0
.../{ => include}/host/loongarch64/host-signal.h | 0
linux-user/{ => include}/host/mips/host-signal.h | 0
linux-user/{ => include}/host/ppc/host-signal.h | 0
linux-user/{ => include}/host/ppc64/host-signal.h | 0
linux-user/{ => include}/host/riscv/host-signal.h | 0
linux-user/{ => include}/host/s390/host-signal.h | 0
linux-user/{ => include}/host/s390x/host-signal.h | 0
linux-user/{ => include}/host/sparc/host-signal.h | 0
.../{ => include}/host/sparc64/host-signal.h | 0
linux-user/{ => include}/host/x32/host-signal.h | 0
linux-user/{ => include}/host/x86_64/host-signal.h | 0
linux-user/{ => include}/special-errno.h | 0
linux-user/meson.build | 4 +-
meson.build | 37 ++--
pc-bios/s390-ccw/Makefile | 2 -
plugins/meson.build | 13 +-
scripts/make-config-poison.sh | 16 ++
scripts/meson-buildoptions.py | 21 ++-
scripts/meson-buildoptions.sh | 3 +
target/i386/cpu.h | 3 +
target/i386/kvm/kvm.c | 130 ++++++++++++--
target/i386/machine.c | 29 ++++
tests/qtest/meson.build | 3 +-
tests/tcg/Makefile.target | 2 +-
tests/unit/meson.build | 2 +-
util/meson.build | 7 +-
40 files changed, 275 insertions(+), 246 deletions(-)
rename bsd-user/{ => include}/special-errno.h (100%)
rename linux-user/{ => include}/host/aarch64/host-signal.h (100%)
rename linux-user/{ => include}/host/alpha/host-signal.h (100%)
rename linux-user/{ => include}/host/arm/host-signal.h (100%)
rename linux-user/{ => include}/host/i386/host-signal.h (100%)
rename linux-user/{ => include}/host/loongarch64/host-signal.h (100%)
rename linux-user/{ => include}/host/mips/host-signal.h (100%)
rename linux-user/{ => include}/host/ppc/host-signal.h (100%)
rename linux-user/{ => include}/host/ppc64/host-signal.h (100%)
rename linux-user/{ => include}/host/riscv/host-signal.h (100%)
rename linux-user/{ => include}/host/s390/host-signal.h (100%)
rename linux-user/{ => include}/host/s390x/host-signal.h (100%)
rename linux-user/{ => include}/host/sparc/host-signal.h (100%)
rename linux-user/{ => include}/host/sparc64/host-signal.h (100%)
rename linux-user/{ => include}/host/x32/host-signal.h (100%)
rename linux-user/{ => include}/host/x86_64/host-signal.h (100%)
rename linux-user/{ => include}/special-errno.h (100%)
create mode 100755 scripts/make-config-poison.shSignature · 1 line
2.33.1
[PULL 05/18] configure: simplify creation of plugin symbol list
--dynamic-list is present on all supported ELF (not Windows or Darwin) platforms, since it dates back to 2006; -exported_symbols_list is likewise present on all supported versions of macOS. Do not bother doing a functional test in configure.
Remove the file creation from configure as well: for Darwin, move the the creation of the Darwin-formatted symbols to meson; for ELF, use the file in the source path directly and switch from -Wl, to -Xlinker to not break weird paths that include a comma.
--- configure | 81 +-------------------------------------------- plugins/meson.build | 13 +++++--- 2 files changed, 10 insertions(+), 84 deletions(-)
configure +1 -80
@@ -78,7 +78,6 @@ TMPC="${TMPDIR1}/${TMPB}.c" TMPO="${TMPDIR1}/${TMPB}.o" TMPCXX="${TMPDIR1}/${TMPB}.cxx" TMPE="${TMPDIR1}/${TMPB}.exe" -TMPTXT="${TMPDIR1}/${TMPB}.txt" rm -f config.log
@@ -1696,6 +1695,7 @@ if test "$static" = "yes" ; then plugins="no" fi fi +test "$plugins" = "" && plugins=yes cat > $TMPC << EOF
@@ -2317,69 +2317,6 @@ EOF fi fi -########################################## -# plugin linker support probe - -if test "$plugins" != "no"; then - - ######################################### - # See if --dynamic-list is supported by the linker - - ld_dynamic_list="no" - cat > $TMPTXT <<EOF -{ - foo; -}; -EOF - - cat > $TMPC <<EOF -#include <stdio.h> -void foo(void); - -void foo(void) -{ - printf("foo\n"); -} - -int main(void) -{ - foo(); - return 0; -} -EOF - - if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then - ld_dynamic_list="yes" - fi - - ######################################### - # See if -exported_symbols_list is supported by the linker - - ld_exported_symbols_list="no" - cat > $TMPTXT <<EOF - _foo -EOF - - if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then - ld_exported_symbols_list="yes" - fi - - if test "$ld_dynamic_list" = "no" && - test "$ld_exported_symbols_list" = "no" ; then - if test "$plugins" = "yes"; then - error_exit \ - "Plugin support requires dynamic linking and specifying a set of symbols " \ - "that are exported to plugins. Unfortunately your linker doesn't " \ - "support the flag (--dynamic-list or -exported_symbols_list) used " \ - "for this purpose." - else - plugins="no" - fi - else - plugins="yes" - fi -fi - ########################################## # glib support probe
@@ -3614,22 +3551,6 @@ fi if test "$plugins" = "yes" ; then echo "CONFIG_PLUGIN=y" >> $config_host_mak - # Copy the export object list to the build dir - if test "$ld_dynamic_list" = "yes" ; then - echo "CONFIG_HAS_LD_DYNAMIC_LIST=yes" >> $config_host_mak - ld_symbols=qemu-plugins-ld.symbols - cp "$source_path/plugins/qemu-plugins.symbols" $ld_symbols - elif test "$ld_exported_symbols_list" = "yes" ; then - echo "CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST=yes" >> $config_host_mak - ld64_symbols=qemu-plugins-ld64.symbols - echo "# Automatically generated by configure - do not modify" > $ld64_symbols - grep 'qemu_' "$source_path/plugins/qemu-plugins.symbols" | sed 's/;//g' | \ - sed -E 's/^[[:space:]]*(.*)/_\1/' >> $ld64_symbols - else - error_exit \ - "If \$plugins=yes, either \$ld_dynamic_list or " \ - "\$ld_exported_symbols_list should have been set to 'yes'." - fi fi if test -n "$gdb_bin"; then
plugins/meson.build +9 -4
@@ -1,10 +1,15 @@ plugin_ldflags = [] # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules - if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host - plugin_ldflags = ['-Wl,--dynamic-list=qemu-plugins-ld.symbols'] - elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags = ['-Wl,-exported_symbols_list,qemu-plugins-ld64.symbols'] + if targetos == 'darwin' + qemu_plugins_symbols_list = configure_file( + input: files('qemu-plugins.symbols'), + output: 'qemu-plugins-ld64.symbols', + capture: true, + command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@']) + plugin_ldflags = ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols'] + else + plugin_ldflags = ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')] endif endif
Signature · 1 line
2.33.1
[PULL 10/18] meson: build contrib/ executables after generated headers
In reply to Paolo BonziniThis will be needed as soon as config-poison.h moves from configure to a meson custom_target (which is built at "ninja" time).
--- contrib/elf2dmp/meson.build | 2 +- contrib/ivshmem-client/meson.build | 2 +- contrib/ivshmem-server/meson.build | 2 +- contrib/rdmacm-mux/meson.build | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
contrib/elf2dmp/meson.build +1 -1
@@ -1,5 +1,5 @@ if curl.found() - executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'), + executable('elf2dmp', files('main.c', 'addrspace.c', 'download.c', 'pdb.c', 'qemu_elf.c'), genh, dependencies: [glib, curl], install: true) endif
contrib/ivshmem-client/meson.build +1 -1
@@ -1,4 +1,4 @@ -executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), +executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), genh, dependencies: glib, build_by_default: targetos == 'linux', install: false)
contrib/ivshmem-server/meson.build +1 -1
@@ -1,4 +1,4 @@ -executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), +executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), genh, dependencies: [qemuutil, rt], build_by_default: targetos == 'linux', install: false)
contrib/rdmacm-mux/meson.build +1 -1
@@ -2,7 +2,7 @@ if 'CONFIG_PVRDMA' in config_host # if not found, CONFIG_PVRDMA should not be set # FIXME: broken on big endian architectures libumad = cc.find_library('ibumad', required: true) - executable('rdmacm-mux', files('main.c'), + executable('rdmacm-mux', files('main.c'), genh, dependencies: [glib, libumad], build_by_default: false, install: false)
Signature · 1 line
2.33.1
[PULL 06/18] configure: do not set bsd_user/linux_user early
In reply to Paolo BonziniSimilar to other optional features, leave the variables empty and compute the actual value later. Use the existence of include or source directories to detect whether an OS or CPU supports respectively bsd-user and linux-user.
For now, BSD user-mode emulation is buildable even on TCI-only architectures. This probably will change once safe signals are brought over from linux-user.
--- configure | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
configure +17 -11
@@ -320,8 +320,8 @@ linux="no" solaris="no" profiler="no" softmmu="yes" -linux_user="no" -bsd_user="no" +linux_user="" +bsd_user="" pkgversion="" pie="" qom_cast_debug="yes"
@@ -538,7 +538,6 @@ gnu/kfreebsd) ;; freebsd) bsd="yes" - bsd_user="yes" make="${MAKE-gmake}" # needed for kinfo_getvmmap(3) in libutil.h ;;
@@ -583,7 +582,6 @@ haiku) ;; linux) linux="yes" - linux_user="yes" vhost_user=${default_feature:-yes} ;; esac
@@ -1259,18 +1257,26 @@ if eval test -z "\${cross_cc_$cpu}"; then cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" fi -# For user-mode emulation the host arch has to be one we explicitly -# support, even if we're using TCI. -if [ "$ARCH" = "unknown" ]; then - bsd_user="no" - linux_user="no" -fi - default_target_list="" deprecated_targets_list=ppc64abi32-linux-user deprecated_features="" mak_wilds="" +if [ "$linux_user" != no ]; then + if [ "$targetos" = linux ] && [ -d $source_path/linux-user/include/host/$cpu ]; then + linux_user=yes + elif [ "$linux_user" = yes ]; then + error_exit "linux-user not supported on this architecture" + fi +fi +if [ "$bsd_user" != no ]; then + if [ "$bsd_user" = "" ]; then + test $targetos = freebsd && bsd_user=yes + fi + if [ "$bsd_user" = yes ] && ! [ -d $source_path/bsd-user/$targetos ]; then + error_exit "bsd-user not supported on this host OS" + fi +fi if [ "$softmmu" = "yes" ]; then mak_wilds="${mak_wilds} $source_path/configs/targets/*-softmmu.mak" fi
Signature · 1 line
2.33.1
[PULL 16/18] configure: do not create roms/seabios/config.mak if SeaBIOS not present
In reply to Paolo BonziniIf roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails.
The easiest thing to do is to not create the file, since it will not be used.
--- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
configure +4 -2
@@ -3704,7 +3704,8 @@ export target_list source_path use_containers cpu $source_path/tests/tcg/configure.sh) # temporary config to build submodules -for rom in seabios; do +if test -f $source_path/roms/seabios/Makefile; then + for rom in seabios; do config_mak=roms/$rom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
@@ -3717,7 +3718,8 @@ for rom in seabios; do echo "IASL=$iasl" >> $config_mak echo "LD=$ld" >> $config_mak echo "RANLIB=$ranlib" >> $config_mak -done + done +fi config_mak=pc-bios/optionrom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak
Signature · 1 line
2.33.1
[PULL 07/18] configure, makefile: remove traces of really old files
In reply to Paolo BonziniThese files have been removed for more than year in the best case, or for more than ten years for some really old TCG files. Remove any traces of it.
--- Makefile | 11 ++++------- configure | 9 --------- 2 files changed, 4 insertions(+), 16 deletions(-)
Makefile +4 -7
@@ -206,14 +206,11 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS)) clean: recurse-clean -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || : -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || : -# avoid old build problems by removing potentially incorrect old files - rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ -exec rm {} + - rm -f TAGS cscope.* *.pod *~ */*~ - rm -f fsdev/*.pod scsi/*.pod + rm -f TAGS cscope.* *~ */*~ VERSION = $(shell cat $(SRC_PATH)/VERSION)
@@ -224,10 +221,10 @@ qemu-%.tar.bz2: distclean: clean -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || : - rm -f config-host.mak config-host.h* config-poison.h + rm -f config-host.mak config-poison.h rm -f tests/tcg/config-*.mak - rm -f config-all-disas.mak config.status - rm -f roms/seabios/config.mak roms/vgabios/config.mak + rm -f config.status + rm -f roms/seabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols rm -f *-config-target.h *-config-devices.mak *-config-devices.h rm -rf meson-private meson-logs meson-info compile_commands.json
configure +0 -9
@@ -3672,9 +3672,6 @@ fi # so the build tree will be missing the link back to the new file, and # tests might fail. Prefer to keep the relevant files in their own # directory and symlink the directory instead. -# UNLINK is used to remove symlinks from older development versions -# that might get into the way when doing "git update" without doing -# a "make distclean" in between. LINKS="Makefile" LINKS="$LINKS tests/tcg/Makefile.target" LINKS="$LINKS pc-bios/optionrom/Makefile"
@@ -3686,7 +3683,6 @@ LINKS="$LINKS tests/avocado tests/data" LINKS="$LINKS tests/qemu-iotests/check" LINKS="$LINKS python" LINKS="$LINKS contrib/plugins/Makefile " -UNLINK="pc-bios/keymaps" for bios_file in \ $source_path/pc-bios/*.bin \ $source_path/pc-bios/*.elf \
@@ -3708,11 +3704,6 @@ for f in $LINKS ; do symlink "$source_path/$f" "$f" fi done -for f in $UNLINK ; do - if [ -L "$f" ]; then - rm -f "$f" - fi -done (for i in $cross_cc_vars; do export $i
Signature · 1 line
2.33.1
[PULL 17/18] meson: build all modules by default
In reply to Paolo BonziniWith more recent versions of Meson, the build.ninja file is more selective as to what is built by default, and not building the modules results in test failures.
Mark the modules as built-by-default and, to make the dependencies more precise, also require them to be up-to-date before running tests.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/801
--- meson.build | 4 +++- tests/qtest/meson.build | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-)
meson.build +3 -1
@@ -2866,8 +2866,10 @@ common_ss.add(hwcore) # Targets # ########### +emulator_modules = [] foreach m : block_mods + softmmu_mods - shared_module(m.name(), + emulator_modules += shared_module(m.name(), + build_by_default: true, name_prefix: '', link_whole: m, install: true,
tests/qtest/meson.build +1 -2
@@ -335,10 +335,9 @@ foreach dir : target_dirs test: executable(test, src, dependencies: deps) } endif - # FIXME: missing dependency on the emulator binary and qemu-img test('qtest-@0@/@1@'.format(target_base, test), qtest_executables[test], - depends: [test_deps, qtest_emulator], + depends: [test_deps, qtest_emulator, emulator_modules], env: qtest_env, args: ['--tap', '-k'], protocol: 'tap',
Signature · 1 line
2.33.1
[PULL 01/18] meson: reuse common_user_inc when building files specific to user-mode emulators
In reply to Paolo Bonzini--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -2919,6 +2919,7 @@ foreach target : target_dirs else abi = config_target['TARGET_ABI_DIR'] target_type='user' + target_inc += common_user_inc qemu_target_name = 'qemu-' + target_name if target_base_arch in target_user_arch t = target_user_arch[target_base_arch].apply(config_target, strict: false)
@@ -2927,7 +2928,6 @@ foreach target : target_dirs endif if 'CONFIG_LINUX_USER' in config_target base_dir = 'linux-user' - target_inc += include_directories('linux-user/host/' / host_arch) endif if 'CONFIG_BSD_USER' in config_target base_dir = 'bsd-user'
Signature · 1 line
2.33.1
[PULL 02/18] user: move common-user includes to a subdirectory of {bsd, linux}-user/
In reply to Paolo BonziniAvoid polluting the compilation of common-user/ with local include files; making an include file available to common-user/ should be a deliberate decision in order to keep a clear interface that can be used by both bsd-user/ and linux-user/.
---
bsd-user/{ => include}/special-errno.h | 0
bsd-user/meson.build | 2 +-
linux-user/{ => include}/host/aarch64/host-signal.h | 0
linux-user/{ => include}/host/alpha/host-signal.h | 0
linux-user/{ => include}/host/arm/host-signal.h | 0
linux-user/{ => include}/host/i386/host-signal.h | 0
linux-user/{ => include}/host/loongarch64/host-signal.h | 0
linux-user/{ => include}/host/mips/host-signal.h | 0
linux-user/{ => include}/host/ppc/host-signal.h | 0
linux-user/{ => include}/host/ppc64/host-signal.h | 0
linux-user/{ => include}/host/riscv/host-signal.h | 0
linux-user/{ => include}/host/s390/host-signal.h | 0
linux-user/{ => include}/host/s390x/host-signal.h | 0
linux-user/{ => include}/host/sparc/host-signal.h | 0
linux-user/{ => include}/host/sparc64/host-signal.h | 0
linux-user/{ => include}/host/x32/host-signal.h | 0
linux-user/{ => include}/host/x86_64/host-signal.h | 0
linux-user/{ => include}/special-errno.h | 0
linux-user/meson.build | 4 ++--
19 files changed, 3 insertions(+), 3 deletions(-)
rename bsd-user/{ => include}/special-errno.h (100%)
rename linux-user/{ => include}/host/aarch64/host-signal.h (100%)
rename linux-user/{ => include}/host/alpha/host-signal.h (100%)
rename linux-user/{ => include}/host/arm/host-signal.h (100%)
rename linux-user/{ => include}/host/i386/host-signal.h (100%)
rename linux-user/{ => include}/host/loongarch64/host-signal.h (100%)
rename linux-user/{ => include}/host/mips/host-signal.h (100%)
rename linux-user/{ => include}/host/ppc/host-signal.h (100%)
rename linux-user/{ => include}/host/ppc64/host-signal.h (100%)
rename linux-user/{ => include}/host/riscv/host-signal.h (100%)
rename linux-user/{ => include}/host/s390/host-signal.h (100%)
rename linux-user/{ => include}/host/s390x/host-signal.h (100%)
rename linux-user/{ => include}/host/sparc/host-signal.h (100%)
rename linux-user/{ => include}/host/sparc64/host-signal.h (100%)
rename linux-user/{ => include}/host/x32/host-signal.h (100%)
rename linux-user/{ => include}/host/x86_64/host-signal.h (100%)
rename linux-user/{ => include}/special-errno.h (100%)bsd-user/include/special-errno.h renamed from bsd-user/special-errno.h +0 -0
bsd-user/meson.build +1 -1
@@ -4,7 +4,7 @@ endif bsd_user_ss = ss.source_set() -common_user_inc += include_directories('.') +common_user_inc += include_directories('include') bsd_user_ss.add(files( 'bsdload.c',
linux-user/include/host/aarch64/host-signal.h renamed from linux-user/host/aarch64/host-signal.h +0 -0
linux-user/include/host/alpha/host-signal.h renamed from linux-user/host/alpha/host-signal.h +0 -0
linux-user/include/host/arm/host-signal.h renamed from linux-user/host/arm/host-signal.h +0 -0
linux-user/include/host/i386/host-signal.h renamed from linux-user/host/i386/host-signal.h +0 -0
linux-user/include/host/loongarch64/host-signal.h renamed from linux-user/host/loongarch64/host-signal.h +0 -0
linux-user/include/host/mips/host-signal.h renamed from linux-user/host/mips/host-signal.h +0 -0
linux-user/include/host/ppc/host-signal.h renamed from linux-user/host/ppc/host-signal.h +0 -0
linux-user/include/host/ppc64/host-signal.h renamed from linux-user/host/ppc64/host-signal.h +0 -0
linux-user/include/host/riscv/host-signal.h renamed from linux-user/host/riscv/host-signal.h +0 -0
linux-user/include/host/s390/host-signal.h renamed from linux-user/host/s390/host-signal.h +0 -0
linux-user/include/host/s390x/host-signal.h renamed from linux-user/host/s390x/host-signal.h +0 -0
linux-user/include/host/sparc/host-signal.h renamed from linux-user/host/sparc/host-signal.h +0 -0
linux-user/include/host/sparc64/host-signal.h renamed from linux-user/host/sparc64/host-signal.h +0 -0
linux-user/include/host/x32/host-signal.h renamed from linux-user/host/x32/host-signal.h +0 -0
linux-user/include/host/x86_64/host-signal.h renamed from linux-user/host/x86_64/host-signal.h +0 -0
linux-user/include/special-errno.h renamed from linux-user/special-errno.h +0 -0
linux-user/meson.build +2 -2
@@ -4,8 +4,8 @@ endif linux_user_ss = ss.source_set() -common_user_inc += include_directories('host/' / host_arch) -common_user_inc += include_directories('.') +common_user_inc += include_directories('include/host/' / host_arch) +common_user_inc += include_directories('include') linux_user_ss.add(files( 'elfload.c',
Signature · 1 line
2.33.1
[PULL 03/18] meson: cleanup common-user/ build
In reply to Paolo BonziniIt is not necessary to have a separate static_library just for common_user files; using the one that already covers the rest of common_ss is enough unless you need to reuse some source files between emulators and tests. Just place common files for all user-mode emulators in common_ss, similar to what is already done for softmmu_ss in full system emulators.
The only disadvantage is that the include_directories under bsd-user/include/ and linux-user/include/ are now enabled for all targets rather than only user mode emulators. This however is not different from how include/sysemu/ is available when building user mode emulators.
--- common-user/meson.build | 2 +- meson.build | 13 +------------ 2 files changed, 2 insertions(+), 13 deletions(-)
common-user/meson.build +1 -1
@@ -1,6 +1,6 @@ common_user_inc += include_directories('host/' / host_arch) -common_user_ss.add(files( +user_ss.add(files( 'safe-syscall.S', 'safe-syscall-error.c', ))
meson.build +1 -12
@@ -2399,7 +2399,6 @@ blockdev_ss = ss.source_set() block_ss = ss.source_set() chardev_ss = ss.source_set() common_ss = ss.source_set() -common_user_ss = ss.source_set() crypto_ss = ss.source_set() hwcore_ss = ss.source_set() io_ss = ss.source_set()
@@ -2651,17 +2650,6 @@ subdir('common-user') subdir('bsd-user') subdir('linux-user') -common_user_ss = common_user_ss.apply(config_all, strict: false) -common_user = static_library('common-user', - sources: common_user_ss.sources(), - dependencies: common_user_ss.dependencies(), - include_directories: common_user_inc, - name_suffix: 'fa', - build_by_default: false) -common_user = declare_dependency(link_with: common_user) - -user_ss.add(common_user) - # needed for fuzzing binaries subdir('tests/qtest/libqos') subdir('tests/qtest/fuzz')
@@ -2879,6 +2867,7 @@ common_all = common_ss.apply(config_all, strict: false) common_all = static_library('common', build_by_default: false, sources: common_all.sources() + genh, + include_directories: common_user_inc, implicit_include_directories: false, dependencies: common_all.dependencies(), name_suffix: 'fa')
Signature · 1 line
2.33.1
[PULL 04/18] block/file-posix: Simplify the XFS_IOC_DIOINFO handling
In reply to Paolo BonziniFrom: Thomas Huth <[email protected]>
The handling for the XFS_IOC_DIOINFO ioctl is currently quite excessive:
This is not a "real" feature like the other features that we provide with the "--enable-xxx" and "--disable-xxx" switches for the configure script, since this does not influence lots of code (it's only about one call to xfsctl() in file-posix.c), so people don't gain much with the ability to disable this with "--disable-xfsctl".
It's also unfortunate that the ioctl will be disabled on Linux in case the user did not install the right xfsprogs-devel package before running configure. Thus let's simplify this by providing the ioctl definition on our own, so we can completely get rid of the header dependency and thus the related code in the configure script.
Message-Id: <[email protected]>
--- block/file-posix.c | 37 ++++++++++++++++--------------------- configure | 31 ------------------------------- meson.build | 1 - 3 files changed, 16 insertions(+), 53 deletions(-)
block/file-posix.c +16 -21
@@ -106,10 +106,6 @@#include <sys/diskslice.h> #endif -#ifdef CONFIG_XFS -#include <xfs/xfs.h> -#endif -/* OS X does not have O_DSYNC */ #ifndef O_DSYNC #ifdef O_SYNC
@@ -156,9 +152,6 @@ typedef struct BDRVRawState {int perm_change_flags;BDRVReopenState *reopen_state; -#ifdef CONFIG_XFS - bool is_xfs:1; -#endif bool has_discard:1; bool has_write_zeroes:1; bool discard_zeroes:1;
@@ -409,14 +402,22 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)if (probe_logical_blocksize (fd, &bs->bl.request_alignment) <0 ) { bs->bl.request_alignment =0 ; } -#ifdef CONFIG_XFS -if (s->is_xfs) { -struct dioattr da; -if (xfsctl (NULL , fd,XFS_IOC_DIOINFO , &da) >=0 ) { - bs->bl.request_alignment = da.d_miniosz; -/* The kernel returns wrong information for d_mem */ -/* s->buf_align = da.d_mem; */ - } + +#ifdef __linux__ +/* +* The XFS ioctl definitions are shipped in extra packages that might +* not always be available. Since we just need the XFS_IOC_DIOINFO ioctl +* here, we simply use our own definition instead: +*/ +struct xfs_dioattr { +uint32_t d_mem; +uint32_t d_miniosz; +uint32_t d_maxiosz; + } da; + if (ioctl(fd, _IOR('X', 30, struct xfs_dioattr), &da) >= 0) { + bs->bl.request_alignment = da.d_miniosz; +/* The kernel returns wrong information for d_mem */ +/* s->buf_align = da.d_mem; */ }#endif
@@ -798,12 +799,6 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,#endif s->needs_alignment =raw_needs_alignment (bs); -#ifdef CONFIG_XFS -if (platform_test_xfs_fd (s->fd)) { - s->is_xfs = true; - } -#endif - bs->supported_zero_flags =BDRV_REQ_MAY_UNMAP |BDRV_REQ_NO_FALLBACK ;if (S_ISREG (st.st_mode)) {/* When extending regular files, we get zeros from the OS */
configure +0 -31
@@ -291,7 +291,6 @@ EXTRA_CXXFLAGS="" EXTRA_LDFLAGS="" xen_ctrl_version="$default_feature" -xfs="$default_feature" membarrier="$default_feature" vhost_kernel="$default_feature" vhost_net="$default_feature"
@@ -1021,10 +1020,6 @@ for opt do ;; --enable-opengl) opengl="yes" ;; - --disable-xfsctl) xfs="no" - ;; - --enable-xfsctl) xfs="yes" - ;; --disable-zlib-test) ;; --enable-guest-agent) guest_agent="yes"
@@ -1431,7 +1426,6 @@ cat << EOF avx512f AVX512F optimization support replication replication support opengl opengl support - xfsctl xfsctl support qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools bochs bochs image format support
@@ -2323,28 +2317,6 @@ EOF fi fi -########################################## -# xfsctl() probe, used for file-posix.c -if test "$xfs" != "no" ; then - cat > $TMPC << EOF -#include <stddef.h> /* NULL */ -#include <xfs/xfs.h> -int main(void) -{ - xfsctl(NULL, 0, 0, NULL); - return 0; -} -EOF - if compile_prog "" "" ; then - xfs="yes" - else - if test "$xfs" = "yes" ; then - feature_not_found "xfs" "Install xfsprogs/xfslibs devel" - fi - xfs=no - fi -fi - ########################################## # plugin linker support probe
@@ -3456,9 +3428,6 @@ echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak if test "$block_drv_whitelist_tools" = "yes" ; then echo "CONFIG_BDRV_WHITELIST_TOOLS=y" >> $config_host_mak fi -if test "$xfs" = "yes" ; then - echo "CONFIG_XFS=y" >> $config_host_mak -fi qemu_version=$(head $source_path/VERSION) echo "PKGVERSION=$pkgversion" >>$config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak
meson.build +0 -1
@@ -3445,7 +3445,6 @@ if spice_protocol.found() summary_info += {' spice server support': spice} endif summary_info += {'rbd support': rbd} -summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')} summary_info += {'smartcard support': cacard} summary_info += {'U2F support': u2f} summary_info += {'libusb': libusb}
Signature · 1 line
2.33.1
[PULL 09/18] configure: move non-command-line variables away from command-line parsing section
In reply to Paolo BonziniThis makes it easier to identify candidates for moving to Meson.
--- configure | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
configure +6 -7
@@ -307,16 +307,12 @@ debug="no" sanitizers="no" tsan="no" fortify_source="$default_feature" -mingw32="no" gcov="no" EXESUF="" modules="no" module_upgrades="no" prefix="/usr/local" qemu_suffix="qemu" -bsd="no" -linux="no" -solaris="no" profiler="no" softmmu="yes" linux_user=""
@@ -330,8 +326,6 @@ opengl="$default_feature" cpuid_h="no" avx2_opt="$default_feature" guest_agent="$default_feature" -guest_agent_with_vss="no" -guest_agent_ntddscsi="no" vss_win32_sdk="$default_feature" win_sdk="no" want_tools="$default_feature"
@@ -526,6 +520,10 @@ fi # OS specific +mingw32="no" +bsd="no" +linux="no" +solaris="no" case $targetos in windows) mingw32="yes"
@@ -2549,6 +2547,7 @@ fi ########################################## # check if we have VSS SDK headers for win +guest_agent_with_vss="no" if test "$mingw32" = "yes" && test "$guest_agent" != "no" && \ test "$vss_win32_sdk" != "no" ; then case "$vss_win32_sdk" in
@@ -2579,7 +2578,6 @@ EOF echo "ERROR: The headers are extracted in the directory \`inc'." feature_not_found "VSS support" fi - guest_agent_with_vss="no" fi fi
@@ -2606,6 +2604,7 @@ fi ########################################## # check if mingw environment provides a recent ntddscsi.h +guest_agent_ntddscsi="no" if test "$mingw32" = "yes" && test "$guest_agent" != "no"; then cat > $TMPC << EOF #include <windows.h>
Signature · 1 line
2.33.1
[PULL 08/18] configure: parse --enable/--disable-strip automatically, flip default
In reply to Paolo BonziniAlways include the STRIP variable in config-host.mak (it's only used by the s390-ccw firmware build, and it adds a default if configure omitted it), and use meson-buildoptions.sh to turn --enable/--disable-strip into -Dstrip.
The default is now not to strip the binaries like for almost every other package that has a configure script.
--- configure | 10 +--------- pc-bios/s390-ccw/Makefile | 2 -- scripts/meson-buildoptions.py | 21 ++++++++++++++------- scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 18 insertions(+), 18 deletions(-)
configure +1 -9
@@ -307,7 +307,6 @@ debug="no" sanitizers="no" tsan="no" fortify_source="$default_feature" -strip_opt="yes" mingw32="no" gcov="no" EXESUF=""
@@ -892,7 +891,6 @@ for opt do debug_tcg="yes" debug_mutex="yes" debug="yes" - strip_opt="no" fortify_source="no" ;; --enable-sanitizers) sanitizers="yes"
@@ -903,8 +901,6 @@ for opt do ;; --disable-tsan) tsan="no" ;; - --disable-strip) strip_opt="no" - ;; --disable-slirp) slirp="disabled" ;; --enable-slirp) slirp="enabled"
@@ -1367,7 +1363,6 @@ Advanced options (experts only): --enable-debug enable common debug build options --enable-sanitizers enable default sanitizers --enable-tsan enable thread sanitizer - --disable-strip disable stripping binaries --disable-werror disable compilation abort on warning --disable-stack-protector disable compiler-provided stack protection --audio-drv-list=LIST set audio drivers to try if -audiodev is not used
@@ -3315,9 +3310,6 @@ echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak if test "$debug_tcg" = "yes" ; then echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak fi -if test "$strip_opt" = "yes" ; then - echo "STRIP=${strip}" >> $config_host_mak -fi if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=y" >> $config_host_mak if test "$guest_agent_with_vss" = "yes" ; then
@@ -3595,6 +3587,7 @@ echo "GLIB_LIBS=$glib_libs" >> $config_host_mak echo "GLIB_VERSION=$(pkg-config --modversion glib-2.0)" >> $config_host_mak echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak +echo "STRIP=$strip" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak echo "LIBS_QGA=$libs_qga" >> $config_host_mak
@@ -3812,7 +3805,6 @@ if test "$skip_meson" = no; then -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) \ - -Dstrip=$(if test "$strip_opt" = 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 \
pc-bios/s390-ccw/Makefile +0 -2
@@ -44,8 +44,6 @@ build-all: s390-ccw.img s390-netboot.img s390-ccw.elf: $(OBJECTS) $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@") -STRIP ?= strip - s390-ccw.img: s390-ccw.elf $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
scripts/meson-buildoptions.py +14 -7
@@ -36,6 +36,10 @@ "trace_file", } +BUILTIN_OPTIONS = { + "strip", +} + LINE_WIDTH = 76
@@ -90,14 +94,17 @@ def allow_arg(opt): return not (set(opt["choices"]) <= {"auto", "disabled", "enabled"}) +def filter_options(json): + if ":" in json["name"]: + return False + if json["section"] == "user": + return json["name"] not in SKIP_OPTIONS + else: + return json["name"] in BUILTIN_OPTIONS + + def load_options(json): - json = [ - x - for x in json - if x["section"] == "user" - and ":" not in x["name"] - and x["name"] not in SKIP_OPTIONS - ] + json = [x for x in json if filter_options(x)] return sorted(json, key=lambda x: x["name"])
scripts/meson-buildoptions.sh +3 -0
@@ -13,6 +13,7 @@ meson_options_help() { printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-slirp[=CHOICE] Whether and how to find the slirp library' printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)' + printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)' printf "%s\n" ' --enable-trace-backends=CHOICE' printf "%s\n" ' Set available tracing backends [log] (choices:'
@@ -237,6 +238,8 @@ _meson_option_parse() { --disable-spice) printf "%s" -Dspice=disabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=enabled ;; --disable-spice-protocol) printf "%s" -Dspice_protocol=disabled ;; + --enable-strip) printf "%s" -Dstrip=true ;; + --disable-strip) printf "%s" -Dstrip=false ;; --enable-tcg) printf "%s" -Dtcg=enabled ;; --disable-tcg) printf "%s" -Dtcg=disabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;;
Signature · 1 line
2.33.1
[PULL 11/18] configure, meson: move config-poison.h to meson
In reply to Paolo BonziniThis ensures that the file is regenerated properly whenever config-target.h or config-devices.h files change.
--- Makefile | 2 +- configure | 11 ----------- meson.build | 12 ++++++++++++ scripts/make-config-poison.sh | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 12 deletions(-) create mode 100755 scripts/make-config-poison.sh
Makefile +1 -1
@@ -221,7 +221,7 @@ qemu-%.tar.bz2: distclean: clean -$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || : - rm -f config-host.mak config-poison.h + rm -f config-host.mak rm -f tests/tcg/config-*.mak rm -f config.status rm -f roms/seabios/config.mak
configure +0 -11
@@ -3834,17 +3834,6 @@ if test -n "${deprecated_features}"; then echo " features: ${deprecated_features}" fi -# Create list of config switches that should be poisoned in common code... -# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special. -target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null) -if test -n "$target_configs_h" ; then - sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \ - -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \ - $target_configs_h | sort -u > config-poison.h -else - :> config-poison.h -fi - # Save the configure command line for later reuse. cat <<EOD >config.status #!/bin/sh
meson.build +12 -0
@@ -2028,6 +2028,18 @@ config_all += { 'CONFIG_ALL': true, } +target_configs_h = [] +foreach target: target_dirs + target_configs_h += config_target_h[target] + target_configs_h += config_devices_h.get(target, []) +endforeach +genh += custom_target('config-poison.h', + input: [target_configs_h], + output: 'config-poison.h', + capture: true, + command: [find_program('scripts/make-config-poison.sh'), + target_configs_h]) + ############## # Submodules # ##############
scripts/make-config-poison.sh new file +16 -0
@@ -0,0 +1,16 @@ +#! /bin/sh + +if test $# = 0; then + exit 0 +fi + +# Create list of config switches that should be poisoned in common code... +# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special. +exec sed -n \ + -e' /CONFIG_TCG/d' \ + -e '/CONFIG_USER_ONLY/d' \ + -e '/^#define / {' \ + -e 's///' \ + -e 's/ .*//' \ + -e 's/^/#pragma GCC poison /p' \ + -e '}' "$@"
Signature · 1 line
2.33.1
[PULL 12/18] meson: add comments in the target-specific flags section
In reply to Paolo Bonzini--- meson.build | 5 +++++ 1 file changed, 5 insertions(+)
meson.build +5 -0
@@ -238,6 +238,7 @@ endif # Target-specific checks and dependencies # ########################################### +# Fuzzing if get_option('fuzzing') and get_option('fuzzing_engine') == '' and \ not cc.links(''' #include <stdint.h>
@@ -249,6 +250,7 @@ if get_option('fuzzing') and get_option('fuzzing_engine') == '' and \ error('Your compiler does not support -fsanitize=fuzzer') endif +# Tracing backends if 'ftrace' in get_option('trace_backends') and targetos != 'linux' error('ftrace is supported only on Linux') endif
@@ -262,6 +264,7 @@ if 'syslog' in get_option('trace_backends') and not cc.compiles(''' error('syslog is not supported on this system') endif +# Miscellaneous Linux-only features if targetos != 'linux' and get_option('mpath').enabled() error('Multipath is supported only on Linux') endif
@@ -271,6 +274,7 @@ if targetos != 'linux' and get_option('multiprocess').enabled() endif multiprocess_allowed = targetos == 'linux' and not get_option('multiprocess').disabled() +# Target-specific libraries and flags libm = cc.find_library('m', required: false) threads = dependency('threads') util = cc.find_library('util', required: false)
@@ -311,6 +315,7 @@ elif targetos == 'openbsd' endif endif +# Target-specific configuration of accelerators accelerators = [] if not get_option('kvm').disabled() and targetos == 'linux' accelerators += 'CONFIG_KVM'
Signature · 1 line
2.33.1
[PULL 18/18] meson: reenable filemonitor-inotify compilation
In reply to Paolo BonziniFrom: Volker Rümelin <[email protected]>
Reenable util/filemonitor-inotify compilation. Compilation was disabled when commit a620fbe9ac ("configure: convert compiler tests to meson, part 5") moved CONFIG_INOTIFY1 from config-host.mak to config-host.h.
This fixes the usb-mtp device and reenables test-util-filemonitor.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/800
Message-Id: <[email protected]>
--- tests/unit/meson.build | 2 +- util/meson.build | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
tests/unit/meson.build +1 -1
@@ -129,7 +129,7 @@ if have_system 'test-vmstate': [migration, io], 'test-yank': ['socket-helpers.c', qom, io, chardev] } - if 'CONFIG_INOTIFY1' in config_host + if config_host_data.get('CONFIG_INOTIFY1') tests += {'test-util-filemonitor': []} endif
util/meson.build +5 -2
@@ -84,7 +84,10 @@ if have_block util_ss.add(files('readline.c')) util_ss.add(files('throttle.c')) util_ss.add(files('timed-average.c')) - util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'), - if_false: files('filemonitor-stub.c')) + if config_host_data.get('CONFIG_INOTIFY1') + util_ss.add(files('filemonitor-inotify.c')) + else + util_ss.add(files('filemonitor-stub.c')) + endif util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c')) endif
Signature · 1 line
2.33.1
[PULL 13/18] KVM: use KVM_{GET|SET}_SREGS2 when supported.
In reply to Paolo BonziniFrom: Maxim Levitsky <[email protected]>
This allows to make PDPTRs part of the migration stream and thus not reload them after migration which is against X86 spec.
Message-Id: <[email protected]>
--- target/i386/cpu.h | 3 ++ target/i386/kvm/kvm.c | 108 +++++++++++++++++++++++++++++++++++++++++- target/i386/machine.c | 29 ++++++++++++ 3 files changed, 138 insertions(+), 2 deletions(-)
target/i386/cpu.h +3 -0
@@ -1455,6 +1455,9 @@ typedef struct CPUX86State {SegmentCache idt;/* only base and limit are used */ target_ulong cr[5 ];/* NOTE: cr1 is unused */ + +bool pdptrs_valid; +uint64_t pdptrs[4 ];int32_t a20_mask;BNDReg bnd_regs[4 ];
target/i386/kvm/kvm.c +106 -2
144 lines not on this page · raw message
target/i386/machine.c +29 -0
@@ -1451,6 +1451,34 @@ static const VMStateDescription vmstate_msr_intel_sgx = { .needed = intel_sgx_msrs_needed, .fields = (VMStateField []) {VMSTATE_UINT64_ARRAY (env.msr_ia32_sgxlepubkeyhash,X86CPU ,4 ), +VMSTATE_END_OF_LIST () + } + }; + +static bool pdptrs_needed (void *opaque) +{ +X86CPU *cpu = opaque; +CPUX86State *env = &cpu->env; +return env->pdptrs_valid; +} + +static int pdptrs_post_load (void *opaque,int version_id) +{ +X86CPU *cpu = opaque; +CPUX86State *env = &cpu->env; + env->pdptrs_valid = true; +return 0 ; +} + + +static const VMStateDescription vmstate_pdptrs = { + .name ="cpu/pdptrs" , + .version_id =1 , + .minimum_version_id =1 , + .needed = pdptrs_needed, + .post_load = pdptrs_post_load, + .fields = (VMStateField []) { +VMSTATE_UINT64_ARRAY (env.pdptrs,X86CPU ,4 ),VMSTATE_END_OF_LIST () } };
@@ -1593,6 +1621,7 @@ const VMStateDescription vmstate_x86_cpu = {#endif &vmstate_msr_tsx_ctrl, &vmstate_msr_intel_sgx, + &vmstate_pdptrs, NULL } };
Signature · 1 line
2.33.1
[PULL 14/18] KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS
In reply to Paolo BonziniThis is unnecessary, because the interrupt would be retrieved and queued anyway by KVM_GET_VCPU_EVENTS and KVM_SET_VCPU_EVENTS respectively, and it makes the flow more similar to the one for KVM_GET/SET_SREGS2.
--- target/i386/kvm/kvm.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
target/i386/kvm/kvm.c +9 -15
@@ -2607,11 +2607,11 @@ static int kvm_put_sregs(X86CPU *cpu)CPUX86State *env = &cpu->env;struct kvm_sregs sregs; +/* +* The interrupt_bitmap is ignored because KVM_SET_SREGS is +* always followed by KVM_SET_VCPU_EVENTS. +*/ memset (sregs.interrupt_bitmap,0 ,sizeof (sregs.interrupt_bitmap)); -if (env->interrupt_injected >=0 ) { - sregs.interrupt_bitmap[env->interrupt_injected /64 ] |= - (uint64_t )1 << (env->interrupt_injected %64 ); - }if ((env->eflags &VM_MASK )) {set_v8086_seg (&sregs.cs, &env->segs[R_CS ]);
@@ -3341,23 +3341,17 @@ static int kvm_get_sregs(X86CPU *cpu) {CPUX86State *env = &cpu->env;struct kvm_sregs sregs; -int bit, i, ret; +int ret; ret =kvm_vcpu_ioctl (CPU (cpu),KVM_GET_SREGS , &sregs);if (ret <0 ) {return ret; } -/* There can only be one pending IRQ set in the bitmap at a time, so try -to find it and save its number instead (-1 for none). */ - env->interrupt_injected =-1 ; -for (i =0 ; i <ARRAY_SIZE (sregs.interrupt_bitmap); i++) { -if (sregs.interrupt_bitmap[i]) { - bit =ctz64 (sregs.interrupt_bitmap[i]); - env->interrupt_injected = i *64 + bit; -break ; - } - } +/* +* The interrupt_bitmap is ignored because KVM_GET_SREGS is +* always preceded by KVM_GET_VCPU_EVENTS. +*/ get_seg (&env->segs[R_CS ], &sregs.cs);get_seg (&env->segs[R_DS ], &sregs.ds);
Signature · 1 line
2.33.1
[PULL 15/18] tests/tcg: Fix target-specific Makefile variables path for user-mode
In reply to Paolo BonziniFrom: Philippe Mathieu-Daudé <[email protected]>
Commit 812b31d3f91 refactor missed to update this path.
Message-Id: <[email protected]>
--- tests/tcg/Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/Makefile.target +1 -1
@@ -33,7 +33,7 @@ all: -include ../../../config-host.mak -include ../config-$(TARGET).mak ifeq ($(CONFIG_USER_ONLY),y) --include $(SRC_PATH)/default-configs/targets/$(TARGET).mak +-include $(SRC_PATH)/configs/targets/$(TARGET)/default.mak endif # for including , in command strings
Signature · 1 line
2.33.1
Quoted 5 lines · Paolo Bonzini
The following changes since commit
afe33262585565b64df706c62b4b0f6e0ad30c71:Merge tag 'pull-riscv-to-apply-20220108' of github.com:alistair23/qemu into staging (2022-01-07 22:09:24 -0800)
Quoted 7 lines
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to
fb714a07243a88c41002c23a24e174c5d9d40d57:meson: reenable filemonitor-inotify compilation (2022-01-09 17:45:02 +0100)
This breaks the centos-stream-8-x86_64 job:
https://gitlab.com/qemu-project/qemu/-/jobs/1959569820
because the commit "block/file-posix: Simplify the XFS_IOC_DIOINFO handling" removes the configure --disable-xfsctl option, but that job's config is still using it (looks like we set this up in the file scripts/ci/org.centos/stream/8/x86_64/configure)
'git grep xfsctl' shows that scripts/coverity-scan/run-coverity-scan is also still using --enable-xfsctl, which has similarly been removed by that commit.
thanks
-- PMM