Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qemu for openSUSE:Factory checked in at 2022-07-26 19:43:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qemu (Old) and /work/SRC/openSUSE:Factory/.qemu.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qemu" Tue Jul 26 19:43:07 2022 rev:233 rq:990725 version:7.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2022-07-02 15:34:06.934979356 +0200 +++ /work/SRC/openSUSE:Factory/.qemu.new.1533/qemu.changes 2022-07-26 19:43:29.952383092 +0200 @@ -1,0 +2,183 @@ +Thu Jul 21 12:14:28 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Substantial rework of the spec file: + * the 'make check' testsuite now runs in the %check section of + the main package, not in a subpackage + * switched from %setup to %autosetup + * rearranged the content in order to minimize the use of %if, + %ifarch, etc + +------------------------------------------------------------------- +Thu Jul 21 12:12:50 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Properly fix bsc#1198038, CVE-2022-0216 +* Patches added: + scsi-lsi53c895a-really-fix-use-after-fre.patch + tests-qtest-Move-the-fuzz-tests-to-x86-o.patch + +------------------------------------------------------------------- +Thu Jul 21 06:14:03 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Make temp dir (for update_git.sh) configurable +- Added new subpackages (audio-dbus, ui-dbus) +- bsc#1199018 was never fixed in Factory's QEMU 6.2. It is + now (since the patches are already in SeaBIOS 1.16.0) +- Some tests are having issues when run in OBS. They seem to be + due to race conditions, triggered by resource constraints of + OBS workers. Let's disable them for now, while looking for a fix +- Update to v7.0.0. For full release notese, see: + * https://wiki.qemu.org/ChangeLog/7.0 + Be sure to also check the following pages: + * https://qemu-project.gitlab.io/qemu/about/removed-features.html + * https://qemu-project.gitlab.io/qemu/about/deprecated.html + Some notable changes: + * [ARM] The virt board has gained a new control knob to disable passing a RNG seed in the DTB (dtb-kaslr-seed) + * [ARM] The AST2600 SoC now supports a dummy version of the i3c device + * [ARM] The virt board can now run guests with KVM on hosts with restricted IPA ranges + * [ARM] The virt board now supports virtio-mem-pci + * [ARM] The virt board now supports specifying the guest CPU topology + * [ARM] On the virt board, we now enable PAuth when using KVM or hvf and the host CPU supports it + * [RISC-V] Add support for ratified 1.0 Vector extension + * [RISC-V] Support for the Zve64f and Zve32f extensions + * [RISC-V] Drop support for draft 0.7.1 Vector extension + * [RISC-V] Support Zfhmin and Zfh extensions + * [RISC-V] RISC-V KVM support + * [RISC-V] Mark Hypervisor extension as non experimental + * [RISC-V] Enable Hypervisor extension by default + * [x86] Support for Intel AMX. + * [PCI/PCIe] Q35: fix PCIe device becoming disabled after migration when ACPI based PCI hotplug is used (6b0969f1ec) + * [PCI/PCIe] initial bits of SR/IOV support (250346169) + * [PCI/PCIe] arm/virt: fixed PXB interrupt routing (e609301b45) + * [PCI/PCIe] arm/virt: support for virtio-mem-pci (b1b87327a9) + * [virtiofs] Fix for CVE-2022-0358 - behaviour with supplementary groups and SGID directories + * [virtiofs] Improved security label support + * [virtiofs] The virtiofsd in qemu is now starting to be deprecated; please start using and contributing to Rust virtiofsd +* Patches dropped: + acpi-validate-hotplug-selector-on-access.patch + block-backend-Retain-permissions-after-m.patch + block-qdict-Fix-Werror-maybe-uninitializ.patch + brotli-fix-actual-variable-array-paramet.patch + display-qxl-render-fix-race-condition-in.patch + doc-Add-the-SGX-numa-description.patch + hw-i386-amd_iommu-Fix-maybe-uninitialize.patch + hw-intc-exynos4210_gic-provide-more-room.patch + hw-nvme-fix-CVE-2021-3929.patch + hw-nvram-at24-return-0xff-if-1-byte-addr.patch + iotest-065-explicit-compression-type.patch + iotest-214-explicit-compression-type.patch + iotest-302-use-img_info_log-helper.patch + iotest-303-explicit-compression-type.patch + iotest-39-use-_qcow2_dump_header.patch + iotests-60-more-accurate-set-dirty-bit-i.patch + iotests-bash-tests-filter-compression-ty.patch + iotests-common.rc-introduce-_qcow2_dump_.patch + iotests-declare-lack-of-support-for-comp.patch + iotests-drop-qemu_img_verbose-helper.patch + iotests-massive-use-_qcow2_dump_header.patch + iotests-MRCE-Write-data-to-source.patch + iotests.py-filter-out-successful-output-.patch + iotests.py-img_info_log-rename-imgopts-a.patch + iotests.py-implement-unsupported_imgopts.patch + iotests.py-qemu_img-create-support-IMGOP.patch + iotests.py-rewrite-default-luks-support-.patch + iotests-specify-some-unsupported_imgopts.patch + meson-build-all-modules-by-default.patch + numa-Enable-numa-for-SGX-EPC-sections.patch + numa-Support-SGX-numa-in-the-monitor-and.patch + python-aqmp-add-__del__-method-to-legacy.patch + python-aqmp-add-_session_guard.patch + python-aqmp-add-SocketAddrT-to-package-r.patch + python-aqmp-add-socket-bind-step-to-lega.patch + python-aqmp-add-start_server-and-accept-.patch + python-aqmp-copy-type-definitions-from-q.patch + python-aqmp-drop-_bind_hack.patch + python-aqmp-fix-docstring-typo.patch + python-aqmp-Fix-negotiation-with-pre-oob.patch + python-aqmp-fix-race-condition-in-legacy.patch + Python-aqmp-fix-type-definitions-for-myp.patch + python-aqmp-handle-asyncio.TimeoutError-.patch + python-aqmp-refactor-_do_accept-into-two.patch + python-aqmp-remove-_new_session-and-_est.patch + python-aqmp-rename-accept-to-start_serve.patch + python-aqmp-rename-AQMPError-to-QMPError.patch + python-aqmp-split-_client_connected_cb-o.patch + python-aqmp-squelch-pylint-warning-for-t.patch + python-aqmp-stop-the-server-during-disco.patch + python-introduce-qmp-shell-wrap-convenie.patch + python-machine-raise-VMLaunchFailure-exc.patch + python-move-qmp-shell-under-the-AQMP-pac.patch + python-move-qmp-utilities-to-python-qemu.patch + python-qmp-switch-qmp-shell-to-AQMP.patch + python-support-recording-QMP-session-to-.patch + python-upgrade-mypy-to-0.780.patch + qcow2-simple-case-support-for-downgradin.patch + qemu-binfmt-conf.sh-should-use-F-as-shor.patch + tests-qemu-iotests-040-Skip-TestCommitWi.patch + tests-qemu-iotests-Fix-051-for-binaries-.patch + tests-qemu-iotests-testrunner-Quote-case.patch + tools-virtiofsd-Add-rseq-syscall-to-the-.patch + ui-cursor-fix-integer-overflow-in-cursor.patch + vhost-vsock-detach-the-virqueue-element-.patch + virtiofsd-Drop-membership-of-all-supplem.patch + virtio-net-fix-map-leaking-on-error-duri.patch + Disable-some-tests-that-have-problems-in.patch +* Patches added: + intc-exynos4210_gic-replace-snprintf-wit.patch + Revert-8dcb404bff6d9147765d7dd3e9c849337.patch + +------------------------------------------------------------------ +Wed Jul 20 02:07:53 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Fix bsc#1197084 +* Patches added: + hostmem-default-the-amount-of-prealloc-t.patch + +------------------------------------------------------------------- +Sun Jul 17 07:33:40 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Get rid of downstream patches breaking s390 modules. Replace + them with the upstream proposed and Acked (but never committed) + solution (bsc#1199015) +* Patches added: + modules-generates-per-target-modinfo.patch + modules-introduces-module_kconfig-direct.patch +* Patches dropped: + Fix-the-module-building-problem-for-s390.patch + modules-quick-fix-a-fundamental-error-in.patch + +------------------------------------------------------------------- +Sat Jul 16 16:30:12 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- backport patches for having coroutine work well when LTO is used +* Patches added: + coroutine-ucontext-use-QEMU_DEFINE_STATI.patch + coroutine-use-QEMU_DEFINE_STATIC_CO_TLS.patch + coroutine-win32-use-QEMU_DEFINE_STATIC_C.patch + +------------------------------------------------------------------- +Sat Jul 16 14:02:04 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- seabios: drop patch that changes python in python2. + Just go to python3 directly. +* Patches dropped: + seabios-use-python2-explicitly-as-needed.patch + +------------------------------------------------------------------- +Fri Jul 15 09:08:06 UTC 2022 - Dario Faggioli <dfaggi...@suse.com> + +- Fix the following bugs: + - bsc#1198037, CVE-2021-4207 + - bsc#1198038, CVE-2022-0216 + - bsc#1201367, CVE-2022-35414 + - bsc#1198035, CVE-2021-4206 + - bsc#1198712, CVE-2022-26354 + - bsc#1198711, CVE-2022-26353 +* Patches added: + display-qxl-render-fix-race-condition-in.patch + scsi-lsi53c895a-fix-use-after-free-in-ls.patch + softmmu-Always-initialize-xlat-in-addres.patch + ui-cursor-fix-integer-overflow-in-cursor.patch + vhost-vsock-detach-the-virqueue-element-.patch + virtio-net-fix-map-leaking-on-error-duri.patch + +------------------------------------------------------------------- Old: ---- Fix-the-module-building-problem-for-s390.patch Python-aqmp-fix-type-definitions-for-myp.patch acpi-validate-hotplug-selector-on-access.patch block-backend-Retain-permissions-after-m.patch block-qdict-Fix-Werror-maybe-uninitializ.patch brotli-fix-actual-variable-array-paramet.patch doc-Add-the-SGX-numa-description.patch hw-i386-amd_iommu-Fix-maybe-uninitialize.patch hw-intc-exynos4210_gic-provide-more-room.patch hw-nvme-fix-CVE-2021-3929.patch hw-nvram-at24-return-0xff-if-1-byte-addr.patch iotest-065-explicit-compression-type.patch iotest-214-explicit-compression-type.patch iotest-302-use-img_info_log-helper.patch iotest-303-explicit-compression-type.patch iotest-39-use-_qcow2_dump_header.patch iotests-60-more-accurate-set-dirty-bit-i.patch iotests-MRCE-Write-data-to-source.patch iotests-bash-tests-filter-compression-ty.patch iotests-common.rc-introduce-_qcow2_dump_.patch iotests-declare-lack-of-support-for-comp.patch iotests-drop-qemu_img_verbose-helper.patch iotests-massive-use-_qcow2_dump_header.patch iotests-specify-some-unsupported_imgopts.patch iotests.py-filter-out-successful-output-.patch iotests.py-img_info_log-rename-imgopts-a.patch iotests.py-implement-unsupported_imgopts.patch iotests.py-qemu_img-create-support-IMGOP.patch iotests.py-rewrite-default-luks-support-.patch meson-build-all-modules-by-default.patch modules-quick-fix-a-fundamental-error-in.patch numa-Enable-numa-for-SGX-EPC-sections.patch numa-Support-SGX-numa-in-the-monitor-and.patch python-aqmp-Fix-negotiation-with-pre-oob.patch python-aqmp-add-SocketAddrT-to-package-r.patch python-aqmp-add-__del__-method-to-legacy.patch python-aqmp-add-_session_guard.patch python-aqmp-add-socket-bind-step-to-lega.patch python-aqmp-add-start_server-and-accept-.patch python-aqmp-copy-type-definitions-from-q.patch python-aqmp-drop-_bind_hack.patch python-aqmp-fix-docstring-typo.patch python-aqmp-fix-race-condition-in-legacy.patch python-aqmp-handle-asyncio.TimeoutError-.patch python-aqmp-refactor-_do_accept-into-two.patch python-aqmp-remove-_new_session-and-_est.patch python-aqmp-rename-AQMPError-to-QMPError.patch python-aqmp-rename-accept-to-start_serve.patch python-aqmp-split-_client_connected_cb-o.patch python-aqmp-squelch-pylint-warning-for-t.patch python-aqmp-stop-the-server-during-disco.patch python-introduce-qmp-shell-wrap-convenie.patch python-machine-raise-VMLaunchFailure-exc.patch python-move-qmp-shell-under-the-AQMP-pac.patch python-move-qmp-utilities-to-python-qemu.patch python-qmp-switch-qmp-shell-to-AQMP.patch python-support-recording-QMP-session-to-.patch python-upgrade-mypy-to-0.780.patch qcow2-simple-case-support-for-downgradin.patch qemu-6.2.0.tar.xz qemu-6.2.0.tar.xz.sig qemu-binfmt-conf.sh-should-use-F-as-shor.patch seabios-use-python2-explicitly-as-needed.patch tests-qemu-iotests-040-Skip-TestCommitWi.patch tests-qemu-iotests-Fix-051-for-binaries-.patch tests-qemu-iotests-testrunner-Quote-case.patch tools-virtiofsd-Add-rseq-syscall-to-the-.patch virtiofsd-Drop-membership-of-all-supplem.patch New: ---- DSDT.pcie Disable-some-tests-that-have-problems-in.patch Revert-8dcb404bff6d9147765d7dd3e9c849337.patch coroutine-ucontext-use-QEMU_DEFINE_STATI.patch coroutine-use-QEMU_DEFINE_STATIC_CO_TLS.patch coroutine-win32-use-QEMU_DEFINE_STATIC_C.patch hostmem-default-the-amount-of-prealloc-t.patch intc-exynos4210_gic-replace-snprintf-wit.patch modules-generates-per-target-modinfo.patch modules-introduces-module_kconfig-direct.patch qemu-7.0.0.tar.xz qemu-7.0.0.tar.xz.sig scsi-lsi53c895a-fix-use-after-free-in-ls.patch scsi-lsi53c895a-really-fix-use-after-fre.patch softmmu-Always-initialize-xlat-in-addres.patch tests-qtest-Move-the-fuzz-tests-to-x86-o.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qemu.spec ++++++ ++++ 3595 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/qemu/qemu.spec ++++ and /work/SRC/openSUSE:Factory/.qemu.new.1533/qemu.spec ++++++ Disable-some-tests-that-have-problems-in.patch ++++++ From: Dario Faggioli <dfaggi...@suse.com> Date: Thu, 21 Jul 2022 04:06:21 +0200 Subject: Disable some tests that have problems in OBS Git-commit: 0000000000000000000000000000000000000000 We are disabling the following tests: qemu-system-ppc64 / display-vga-test They are failing due to some memory corruption errors. We believe that this might be due to the combination of the compiler version and of LTO, and will take up the investigation within the upstream community. Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- tests/qtest/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index e860b0edf275cd68cd24516cb1ca..ef1af9b109c1591e3bfda2cb4a56 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -35,6 +35,10 @@ qtests_pci = \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) +# display-vga-test currently fails in OBS, for ppc64 +qtests_pci_novga = \ + (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) + qtests_i386 = \ (slirp.found() ? ['pxe-test', 'test-netfilter'] : []) + \ (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ @@ -171,7 +175,7 @@ qtests_ppc64 = \ (slirp.found() ? ['pxe-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ - qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] + qtests_pci_novga + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) ++++++ Ignore-spurious-GCC-12-warning.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.811941218 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.815940600 +0200 @@ -51,7 +51,7 @@ // Template for an end-of-device path node. // diff --git a/roms/edk2/BaseTools/Source/C/GenFfs/GenFfs.c b/roms/edk2/BaseTools/Source/C/GenFfs/GenFfs.c -index fcb911f4fc34e560fd06001f91dd..589ffe94982ccfa3651216d0571f 100644 +index 949025c333251bc5776159a6c535..be55a529743494677f8515906c6c 100644 --- a/roms/edk2/BaseTools/Source/C/GenFfs/GenFfs.c +++ b/roms/edk2/BaseTools/Source/C/GenFfs/GenFfs.c @@ -36,6 +36,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @@ -81,12 +81,12 @@ NULL, // 0x00 - reserved "EFI_SECTION_COMPRESSION", // 0x01 diff --git a/roms/edk2/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/roms/edk2/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c -index e281716fee1bfb5eb236c9e38dbd..773114584add6e1f0f6e966e26e5 100644 +index 4e9b499f8d80dc4d6bc13515e794..ab9b7cc34f69bceb74c454ce5032 100644 --- a/roms/edk2/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c +++ b/roms/edk2/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c -@@ -38,6 +38,10 @@ static unsigned g_STAT_OFFSET = 0; - #define kNumBitPriceShiftBits 4 - #define kBitPrice (1 << kNumBitPriceShiftBits) +@@ -40,6 +40,10 @@ static unsigned g_STAT_OFFSET = 0; + + #define REP_LEN_COUNT 64 +#if __GNUC__ >= 12 +# pragma GCC diagnostic ignored "-Wdangling-pointer" ++++++ Makefile-Don-t-check-pc-bios-as-pre-requ.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.831938129 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.831938129 +0200 @@ -13,7 +13,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 74c5b46d38b501f9dd25f447ed08..87ae3ba6efe74e6c48d2a6db970f 100644 +index e5fd1ebdf6199c4cb15780e90236..e5881a951fc05d479b032c0b56d8 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ x := $(shell rm -rf meson-private meson-info meson-logs) ++++++ Makefile-fix-build-with-binutils-2.38.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.843936274 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.847935656 +0200 @@ -29,20 +29,20 @@ 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roms/opensbi/Makefile b/roms/opensbi/Makefile -index d6f097d30af78c0fba92eeeec523..a294f46fa8e16caec64d5a88c2a2 100644 +index 062883e9695fb4447d2e61d7f282..fc1ea13e519a702e8b09d9006a2c 100644 --- a/roms/opensbi/Makefile +++ b/roms/opensbi/Makefile -@@ -106,6 +106,9 @@ ifndef PLATFORM_RISCV_XLEN - endif - endif +@@ -153,6 +153,9 @@ OPENSBI_LD_PIE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) $(USE_LD_FLAG) -fP + # Check whether the compiler supports -m(no-)save-restore + CC_SUPPORT_SAVE_RESTORE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -mno-save-restore -x c /dev/null -o /dev/null 2>&1 | grep "\-save\-restore" >/dev/null && echo n || echo y) +# Check whether the assembler and the compiler support the Zicsr and Zifencei extensions +CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep "zicsr\|zifencei" > /dev/null && echo n || echo y) + - # Setup list of objects.mk files - ifdef PLATFORM - platform-object-mks=$(shell if [ -d $(platform_src_dir)/ ]; then find $(platform_src_dir) -iname "objects.mk" | sort -r; fi) -@@ -157,7 +160,11 @@ ifndef PLATFORM_RISCV_ABI + # Build Info: + # OPENSBI_BUILD_TIME_STAMP -- the compilation time stamp + # OPENSBI_BUILD_COMPILER_VERSION -- the compiler version info +@@ -223,7 +226,11 @@ ifndef PLATFORM_RISCV_ABI endif ifndef PLATFORM_RISCV_ISA ifneq ($(PLATFORM_RISCV_TOOLCHAIN_DEFAULT), 1) ++++++ PPC-KVM-Disable-mmu-notifier-check.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.859933802 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.859933802 +0200 @@ -14,10 +14,10 @@ 1 file changed, 2 insertions(+) diff --git a/softmmu/physmem.c b/softmmu/physmem.c -index 3524c04c2a162b717c3975cc15da..f69d6b00467f8b53614171fa17a9 100644 +index 4e1b27a20eccca027515aee6f78f..02aa7205a4992a678414111f625c 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c -@@ -2064,11 +2064,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, +@@ -2066,11 +2066,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, return NULL; } ++++++ Raise-soft-address-space-limit-to-hard-l.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.883930094 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.887929476 +0200 @@ -16,10 +16,10 @@ 1 file changed, 12 insertions(+) diff --git a/softmmu/vl.c b/softmmu/vl.c -index 620a1f1367e2b033bfec541619d3..527e1d91859b19351d397ef64930 100644 +index 6f646531a0aeb6ff2dd3fc8a5cd8..f0f2f190a4a84af95ccaac353bb1 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ #include "sysemu/reset.h" #include "sysemu/runstate.h" #include "sysemu/runstate-action.h" @@ -27,7 +27,7 @@ #include "sysemu/seccomp.h" #include "sysemu/tcg.h" #include "sysemu/xen.h" -@@ -2772,6 +2773,17 @@ void qemu_init(int argc, char **argv, char **envp) +@@ -2778,6 +2779,17 @@ void qemu_init(int argc, char **argv, char **envp) MachineClass *machine_class; bool userconfig = true; FILE *vmstate_dump_file = NULL; ++++++ Revert-8dcb404bff6d9147765d7dd3e9c849337.patch ++++++ From: Dario Faggioli <dfaggi...@suse.com> Date: Tue, 24 May 2022 20:52:17 +0200 Subject: Revert 8dcb404bff6d9147765d7dd3e9c8493372186420 Git-commit: 0000000000000000000000000000000000000000 Revert commit "tests/qtest: enable more vhost-user tests by default" (8dcb404bff6d9), as it causes prooblem when building with GCC 12 and LTO enabled. This should be considered temporary, until the actual reason why the code of the tests that are added in that commit breaks. It has been reported upstream, and will be (hopefully) solved there: https://lore.kernel.org/qemu-devel/1d3bbff9e92e7c8a24db9e140dcf3f428c2df103.ca...@suse.com/ Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- tests/qtest/vhost-user-test.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index ee30f54796485e1fb2cab1fe7641..6e79935c47e6f7fab9741cdf9e50 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -995,17 +995,20 @@ static void register_vhost_user_test(void) "virtio-net", test_migrate, &opts); - opts.before = vhost_user_test_setup_reconnect; - qos_add_test("vhost-user/reconnect", "virtio-net", - test_reconnect, &opts); + /* keeps failing on build-system since Aug 15 2017 */ + if (getenv("QTEST_VHOST_USER_FIXME")) { + opts.before = vhost_user_test_setup_reconnect; + qos_add_test("vhost-user/reconnect", "virtio-net", + test_reconnect, &opts); - opts.before = vhost_user_test_setup_connect_fail; - qos_add_test("vhost-user/connect-fail", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_connect_fail; + qos_add_test("vhost-user/connect-fail", "virtio-net", + test_vhost_user_started, &opts); - opts.before = vhost_user_test_setup_flags_mismatch; - qos_add_test("vhost-user/flags-mismatch", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_flags_mismatch; + qos_add_test("vhost-user/flags-mismatch", "virtio-net", + test_vhost_user_started, &opts); + } opts.before = vhost_user_test_setup_multiqueue; opts.edge.extra_device_opts = "mq=on"; ++++++ Revert-qht-constify-qht_statistics_init.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.903927004 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.907926386 +0200 @@ -27,10 +27,10 @@ /** * qht_statistics_destroy - Destroy a &struct qht_stats diff --git a/util/qht.c b/util/qht.c -index 079605121b1452dac9937b0e6137..cfc2c60639af8f7905aae51c53bb 100644 +index 065fc501f44c46dffac74134ee2c..0803c194d10b5cdafdc8b18ec083 100644 --- a/util/qht.c +++ b/util/qht.c -@@ -901,9 +901,9 @@ bool qht_resize(struct qht *ht, size_t n_elems) +@@ -902,9 +902,9 @@ bool qht_resize(struct qht *ht, size_t n_elems) } /* pass @stats to qht_statistics_destroy() when done */ @@ -42,7 +42,7 @@ int i; map = qatomic_rcu_read(&ht->map); -@@ -920,8 +920,8 @@ void qht_statistics_init(const struct qht *ht, struct qht_stats *stats) +@@ -921,8 +921,8 @@ void qht_statistics_init(const struct qht *ht, struct qht_stats *stats) stats->head_buckets = map->n_buckets; for (i = 0; i < map->n_buckets; i++) { ++++++ Revert-roms-efirom-tests-uefi-test-tools.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.915925151 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.919924532 +0200 @@ -15,7 +15,7 @@ 2 files changed, 3 deletions(-) diff --git a/roms/Makefile b/roms/Makefile -index 66d06f5831303c3d41e943290389..6ea8edd9fcf6bb0cdc1f1602f241 100644 +index 3d53bd528666b594ab3d6b631450..c7c6e973db59572e8b8bee74e969 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -151,8 +151,6 @@ build-efi-roms: build-pxe-roms ++++++ XXX-dont-dump-core-on-sigabort.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.931922678 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.935922060 +0200 @@ -8,11 +8,11 @@ 1 file changed, 6 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c -index 6d5e5b698cc827416b4fdf78aac3..41ec78926582729c91f486f1fb15 100644 +index 092e70b80c6ffb83fc52ff6d6a0a..b918084cc769c9bc1d15fbfad792 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c -@@ -734,6 +734,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) - trace_user_force_sig(env, target_sig, host_sig); +@@ -737,6 +737,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) + trace_user_dump_core_and_abort(env, target_sig, host_sig); gdb_signalled(env, target_sig); + if (target_sig == 6) { @@ -22,7 +22,7 @@ /* dump core if supported by target binary format */ if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) { stop_all_tasks(); -@@ -751,6 +755,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) +@@ -754,6 +758,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) target_sig, strsignal(host_sig), "core dumped" ); } ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.967917116 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.967917116 +0200 @@ -1,5 +1,4 @@ <multibuild> <package>linux-user</package> - <package>testsuite</package> </multibuild> ++++++ acpi_piix4-Fix-migration-from-SLE11-SP2.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:32.979915262 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:32.979915262 +0200 @@ -16,10 +16,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index f0b5fac44a14279ac3c66834bfb1..42c1a7a816cbdb22b16876dc6f8c 100644 +index fe5625d07a289800831170f7e41f..dd005ff2fc097f72947a62d91b96 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c -@@ -278,7 +278,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) +@@ -287,7 +287,7 @@ static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id) static const VMStateDescription vmstate_acpi = { .name = "piix4_pm", .version_id = 3, ++++++ bundles.tar.xz ++++++ Binary files old/44f28df24767cf9dca1ddc9b23157737c4cbb645.bundle and new/44f28df24767cf9dca1ddc9b23157737c4cbb645.bundle differ Binary files old/823a3f11fb8f04c3c3cc0f95f968fef1bfc6534f.bundle and new/823a3f11fb8f04c3c3cc0f95f968fef1bfc6534f.bundle differ Binary files old/roms/edk2/06dc822d045c2bb42e497487935485302486e151.bundle and new/roms/edk2/06dc822d045c2bb42e497487935485302486e151.bundle differ Binary files old/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/666c3280cc11dc433c303d79a83d4ffbdd12cc8d.bundle and new/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/666c3280cc11dc433c303d79a83d4ffbdd12cc8d.bundle differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/repo new/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/repo --- old/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/repo 2021-12-16 17:53:29.000000000 +0100 +++ new/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/repo 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -https://github.com/google/brotli Binary files old/roms/edk2/b24306f15daa2ff8510b06702114724b33895d3c.bundle and new/roms/edk2/b24306f15daa2ff8510b06702114724b33895d3c.bundle differ Binary files old/roms/opensbi/234ed8e427f4d92903123199f6590d144e0d9351.bundle and new/roms/opensbi/234ed8e427f4d92903123199f6590d144e0d9351.bundle differ Binary files old/roms/opensbi/48f91ee9c960f048c4a7d1da4447d31e04931e38.bundle and new/roms/opensbi/48f91ee9c960f048c4a7d1da4447d31e04931e38.bundle differ Binary files old/roms/seabios/2dd4b9b3f84019668719344b40dba79d681be41c.bundle and new/roms/seabios/2dd4b9b3f84019668719344b40dba79d681be41c.bundle differ Binary files old/roms/seabios/d239552ce7220e448ae81f41515138f7b9e3c4db.bundle and new/roms/seabios/d239552ce7220e448ae81f41515138f7b9e3c4db.bundle differ Binary files old/roms/skiboot/820d43c0a7751e75a8830561f35535dfffd522bd.bundle and new/roms/skiboot/820d43c0a7751e75a8830561f35535dfffd522bd.bundle differ ++++++ config.sh ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.095897340 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.099896722 +0200 @@ -18,12 +18,12 @@ # The following specifies the upstream tag or commit upon which our patchqueue # gets rebased. The special value LATEST may be used to "automatically" track # the upstream development tree in the master branch -GIT_UPSTREAM_COMMIT_ISH=v6.2.0 +GIT_UPSTREAM_COMMIT_ISH=v7.0.0 # WARNING: If transitioning from using LATEST to not, MANUALLY re-set the # tarball present. If transitioning TO LATEST, make sure that # NEXT_RELEASE_IS_MAJOR is set correctly # This is used to choose the version number when LATEST processing is active -NEXT_RELEASE_IS_MAJOR=1 +NEXT_RELEASE_IS_MAJOR=0 # Unfortunately, SeaBIOS doesn't always follow an "always increasing" version # model, so there may be times we should overide the automated version setting. @@ -38,6 +38,11 @@ # For compatibility with old packages, we include this option OVERRIDE_FIVE_DIGIT_NUMBERING=0 +# Path to be used for temporary files, directories, repositories, etc. +# Default is /dev/shm. An alternative could be /tmp (e.g., when building +# in containers, or whatever). +TMPDIR=/dev/shm + # This array tracks all git submodule paths within the superproject (1st entry) PATCH_PATH_MAP=( "" @@ -63,6 +68,7 @@ "meson/" "tests/fp/berkeley-softfloat-3/" "tests/fp/berkeley-testfloat-3/" + "tests/lcitool/libvirt-ci" "roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/" "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl/" "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/" @@ -72,10 +78,7 @@ "roms/edk2/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/" "roms/edk2/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/" "roms/vbootrom/" - "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/esaxx/" - "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/libdivsufsort/" - "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/esaxx/" - "roms/edk2/MdeModulePkg/Library/BrotliCompress/brotli/research/libdivsufsort/" + "roms/edk2/RedfishPkg/Library/JsonLib/jansson" ) # (order and count must correspond to PATCH_PATH_MAP) @@ -103,6 +106,7 @@ ~/git/qemu-meson ~/git/qemu-tests-berkeley-softfloat-3 ~/git/qemu-tests-berkeley-testfloat-3 + ~/git/qemu-tests-lcitool-libvirt-ci ~/git/qemu-edk2-berkeley-softfloat-3 ~/git/qemu-edk2-openssl-boringssl ~/git/qemu-edk2-openssl-krb5 @@ -112,9 +116,6 @@ ~/git/qemu-edk2-oniguruma ~/git/qemu-edk2-cmocka ~/git/qemu-vbootrom - ~/git/qemu-edk2-BrotliCustomDecompressLib-brotli-research-esaxx - ~/git/qemu-edk2-BrotliCustomDecompressLib-brotli-research-libdivsufsort - ~/git/qemu-edk2-BrotliCompress-brotli-research-esaxx - ~/git/qemu-edk2-BrotliCompress-brotli-research-libdivsufsort + ~/git/qemu-edk2-jansson ) ++++++ configure-only-populate-roms-if-softmmu.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.107895486 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.107895486 +0200 @@ -12,10 +12,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 48c21775f3a90c91631d90bd6e3e..e53fc9b91a69870e354ba2f27475 100755 +index 7c08c18358becf49779c876b0f3d..a35b63b2106900e6f7ff46d2b8da 100755 --- a/configure +++ b/configure -@@ -3373,7 +3373,7 @@ fi +@@ -2725,7 +2725,7 @@ fi # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900 # or -march=z10 (which is the lowest architecture level that Clang supports) ++++++ configure-remove-pkgversion-from-CONFIG_.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.119893632 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.123893014 +0200 @@ -18,10 +18,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index e53fc9b91a69870e354ba2f27475..5312dc66dd293857ef916f3dde44 100755 +index a35b63b2106900e6f7ff46d2b8da..b031106ff395bf5092348780dbb6 100755 --- a/configure +++ b/configure -@@ -3509,7 +3509,7 @@ echo "TARGET_DIRS=$target_list" >> $config_host_mak +@@ -2823,7 +2823,7 @@ echo "TARGET_DIRS=$target_list" >> $config_host_mak 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 ++++++ coroutine-ucontext-use-QEMU_DEFINE_STATI.patch ++++++ From: Stefan Hajnoczi <stefa...@redhat.com> Date: Mon, 7 Mar 2022 15:38:51 +0000 Subject: coroutine-ucontext: use QEMU_DEFINE_STATIC_CO_TLS() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commit: 34145a307d849d0b6734d0222a7aa0bb9eef7407 Thread-Local Storage variables cannot be used directly from coroutine code because the compiler may optimize TLS variable accesses across qemu_coroutine_yield() calls. When the coroutine is re-entered from another thread the TLS variables from the old thread must no longer be used. Use QEMU_DEFINE_STATIC_CO_TLS() for the current and leader variables. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-Id: <20220307153853.602859-2-stefa...@redhat.com> Reviewed-by: Philippe Mathieu-Daud?? <f4...@amsat.org> Signed-off-by: Kevin Wolf <kw...@redhat.com> [DF: see: https://bugzilla.redhat.com/show_bug.cgi?id=1952483] Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- util/coroutine-ucontext.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 904b375192cab6d24c2bdea46d8c..127d5a13c8e77cae82cbb7cb5129 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include <ucontext.h> #include "qemu/coroutine_int.h" +#include "qemu/coroutine-tls.h" #ifdef CONFIG_VALGRIND_H #include <valgrind/valgrind.h> @@ -66,8 +67,8 @@ typedef struct { /** * Per-thread coroutine bookkeeping */ -static __thread CoroutineUContext leader; -static __thread Coroutine *current; +QEMU_DEFINE_STATIC_CO_TLS(Coroutine *, current); +QEMU_DEFINE_STATIC_CO_TLS(CoroutineUContext, leader); /* * va_args to makecontext() must be type 'int', so passing @@ -97,14 +98,15 @@ static inline __attribute__((always_inline)) void finish_switch_fiber(void *fake_stack_save) { #ifdef CONFIG_ASAN + CoroutineUContext *leaderp = get_ptr_leader(); const void *bottom_old; size_t size_old; __sanitizer_finish_switch_fiber(fake_stack_save, &bottom_old, &size_old); - if (!leader.stack) { - leader.stack = (void *)bottom_old; - leader.stack_size = size_old; + if (!leaderp->stack) { + leaderp->stack = (void *)bottom_old; + leaderp->stack_size = size_old; } #endif #ifdef CONFIG_TSAN @@ -161,8 +163,10 @@ static void coroutine_trampoline(int i0, int i1) /* Initialize longjmp environment and switch back the caller */ if (!sigsetjmp(self->env, 0)) { - start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, leader.stack, - leader.stack_size); + CoroutineUContext *leaderp = get_ptr_leader(); + + start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, + leaderp->stack, leaderp->stack_size); start_switch_fiber_tsan(&fake_stack_save, self, true); /* true=caller */ siglongjmp(*(sigjmp_buf *)co->entry_arg, 1); } @@ -297,7 +301,7 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, int ret; void *fake_stack_save = NULL; - current = to_; + set_current(to_); ret = sigsetjmp(from->env, 0); if (ret == 0) { @@ -315,18 +319,24 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, Coroutine *qemu_coroutine_self(void) { - if (!current) { - current = &leader.base; + Coroutine *self = get_current(); + CoroutineUContext *leaderp = get_ptr_leader(); + + if (!self) { + self = &leaderp->base; + set_current(self); } #ifdef CONFIG_TSAN - if (!leader.tsan_co_fiber) { - leader.tsan_co_fiber = __tsan_get_current_fiber(); + if (!leaderp->tsan_co_fiber) { + leaderp->tsan_co_fiber = __tsan_get_current_fiber(); } #endif - return current; + return self; } bool qemu_in_coroutine(void) { - return current && current->caller; + Coroutine *self = get_current(); + + return self && self->caller; } ++++++ coroutine-use-QEMU_DEFINE_STATIC_CO_TLS.patch ++++++ From: Stefan Hajnoczi <stefa...@redhat.com> Date: Mon, 7 Mar 2022 15:38:52 +0000 Subject: coroutine: use QEMU_DEFINE_STATIC_CO_TLS() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commit: ac387a08a9c9f6b36757da912f0339c25f421f90 Thread-Local Storage variables cannot be used directly from coroutine code because the compiler may optimize TLS variable accesses across qemu_coroutine_yield() calls. When the coroutine is re-entered from another thread the TLS variables from the old thread must no longer be used. Use QEMU_DEFINE_STATIC_CO_TLS() for the current and leader variables. The alloc_pool QSLIST needs a typedef so the return value of get_ptr_alloc_pool() can be stored in a local variable. One example of why this code is necessary: a coroutine that yields before calling qemu_coroutine_create() to create another coroutine is affected by the TLS issue. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-Id: <20220307153853.602859-3-stefa...@redhat.com> Reviewed-by: Philippe Mathieu-Daud?? <f4...@amsat.org> Signed-off-by: Kevin Wolf <kw...@redhat.com> [DF: see: https://bugzilla.redhat.com/show_bug.cgi?id=1952483] Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- util/qemu-coroutine.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index c03b2422ff686e7138bf7bf0abba..f3e8300c8d2ec64fc16fa562a518 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -18,6 +18,7 @@ #include "qemu/atomic.h" #include "qemu/coroutine.h" #include "qemu/coroutine_int.h" +#include "qemu/coroutine-tls.h" #include "block/aio.h" /** Initial batch size is 64, and is increased on demand */ @@ -29,17 +30,20 @@ enum { static QSLIST_HEAD(, Coroutine) release_pool = QSLIST_HEAD_INITIALIZER(pool); static unsigned int pool_batch_size = POOL_INITIAL_BATCH_SIZE; static unsigned int release_pool_size; -static __thread QSLIST_HEAD(, Coroutine) alloc_pool = QSLIST_HEAD_INITIALIZER(pool); -static __thread unsigned int alloc_pool_size; -static __thread Notifier coroutine_pool_cleanup_notifier; + +typedef QSLIST_HEAD(, Coroutine) CoroutineQSList; +QEMU_DEFINE_STATIC_CO_TLS(CoroutineQSList, alloc_pool); +QEMU_DEFINE_STATIC_CO_TLS(unsigned int, alloc_pool_size); +QEMU_DEFINE_STATIC_CO_TLS(Notifier, coroutine_pool_cleanup_notifier); static void coroutine_pool_cleanup(Notifier *n, void *value) { Coroutine *co; Coroutine *tmp; + CoroutineQSList *alloc_pool = get_ptr_alloc_pool(); - QSLIST_FOREACH_SAFE(co, &alloc_pool, pool_next, tmp) { - QSLIST_REMOVE_HEAD(&alloc_pool, pool_next); + QSLIST_FOREACH_SAFE(co, alloc_pool, pool_next, tmp) { + QSLIST_REMOVE_HEAD(alloc_pool, pool_next); qemu_coroutine_delete(co); } } @@ -49,27 +53,30 @@ Coroutine *qemu_coroutine_create(CoroutineEntry *entry, void *opaque) Coroutine *co = NULL; if (CONFIG_COROUTINE_POOL) { - co = QSLIST_FIRST(&alloc_pool); + CoroutineQSList *alloc_pool = get_ptr_alloc_pool(); + + co = QSLIST_FIRST(alloc_pool); if (!co) { if (release_pool_size > qatomic_read(&pool_batch_size)) { /* Slow path; a good place to register the destructor, too. */ - if (!coroutine_pool_cleanup_notifier.notify) { - coroutine_pool_cleanup_notifier.notify = coroutine_pool_cleanup; - qemu_thread_atexit_add(&coroutine_pool_cleanup_notifier); + Notifier *notifier = get_ptr_coroutine_pool_cleanup_notifier(); + if (!notifier->notify) { + notifier->notify = coroutine_pool_cleanup; + qemu_thread_atexit_add(notifier); } /* This is not exact; there could be a little skew between * release_pool_size and the actual size of release_pool. But * it is just a heuristic, it does not need to be perfect. */ - alloc_pool_size = qatomic_xchg(&release_pool_size, 0); - QSLIST_MOVE_ATOMIC(&alloc_pool, &release_pool); - co = QSLIST_FIRST(&alloc_pool); + set_alloc_pool_size(qatomic_xchg(&release_pool_size, 0)); + QSLIST_MOVE_ATOMIC(alloc_pool, &release_pool); + co = QSLIST_FIRST(alloc_pool); } } if (co) { - QSLIST_REMOVE_HEAD(&alloc_pool, pool_next); - alloc_pool_size--; + QSLIST_REMOVE_HEAD(alloc_pool, pool_next); + set_alloc_pool_size(get_alloc_pool_size() - 1); } } @@ -93,9 +100,9 @@ static void coroutine_delete(Coroutine *co) qatomic_inc(&release_pool_size); return; } - if (alloc_pool_size < qatomic_read(&pool_batch_size)) { - QSLIST_INSERT_HEAD(&alloc_pool, co, pool_next); - alloc_pool_size++; + if (get_alloc_pool_size() < qatomic_read(&pool_batch_size)) { + QSLIST_INSERT_HEAD(get_ptr_alloc_pool(), co, pool_next); + set_alloc_pool_size(get_alloc_pool_size() + 1); return; } } ++++++ coroutine-win32-use-QEMU_DEFINE_STATIC_C.patch ++++++ From: Stefan Hajnoczi <stefa...@redhat.com> Date: Mon, 7 Mar 2022 15:38:53 +0000 Subject: coroutine-win32: use QEMU_DEFINE_STATIC_CO_TLS() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commit: c1fe694357a328c807ae3cc6961c19e923448fcc Thread-Local Storage variables cannot be used directly from coroutine code because the compiler may optimize TLS variable accesses across qemu_coroutine_yield() calls. When the coroutine is re-entered from another thread the TLS variables from the old thread must no longer be used. Use QEMU_DEFINE_STATIC_CO_TLS() for the current and leader variables. I think coroutine-win32.c could get away with __thread because the variables are only used in situations where either the stale value is correct (current) or outside coroutine context (loading leader when current is NULL). Due to the difficulty of being sure that this is really safe in all scenarios it seems worth converting it anyway. Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-Id: <20220307153853.602859-4-stefa...@redhat.com> Reviewed-by: Philippe Mathieu-Daud?? <f4...@amsat.org> Signed-off-by: Kevin Wolf <kw...@redhat.com> [DF: see: https://bugzilla.redhat.com/show_bug.cgi?id=1952483] Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- util/coroutine-win32.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/util/coroutine-win32.c b/util/coroutine-win32.c index de6bd4fd3e4e9747b08348e2a5f7..c02a62c896908162160440cbc8ba 100644 --- a/util/coroutine-win32.c +++ b/util/coroutine-win32.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/coroutine_int.h" +#include "qemu/coroutine-tls.h" typedef struct { @@ -34,8 +35,8 @@ typedef struct CoroutineAction action; } CoroutineWin32; -static __thread CoroutineWin32 leader; -static __thread Coroutine *current; +QEMU_DEFINE_STATIC_CO_TLS(CoroutineWin32, leader); +QEMU_DEFINE_STATIC_CO_TLS(Coroutine *, current); /* This function is marked noinline to prevent GCC from inlining it * into coroutine_trampoline(). If we allow it to do that then it @@ -52,7 +53,7 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, CoroutineWin32 *from = DO_UPCAST(CoroutineWin32, base, from_); CoroutineWin32 *to = DO_UPCAST(CoroutineWin32, base, to_); - current = to_; + set_current(to_); to->action = action; SwitchToFiber(to->fiber); @@ -89,14 +90,21 @@ void qemu_coroutine_delete(Coroutine *co_) Coroutine *qemu_coroutine_self(void) { + Coroutine *current = get_current(); + if (!current) { - current = &leader.base; - leader.fiber = ConvertThreadToFiber(NULL); + CoroutineWin32 *leader = get_ptr_leader(); + + current = &leader->base; + set_current(current); + leader->fiber = ConvertThreadToFiber(NULL); } return current; } bool qemu_in_coroutine(void) { + Coroutine *current = get_current(); + return current && current->caller; } ++++++ doc-add-our-support-doc-to-the-main-proj.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.151888688 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.155888070 +0200 @@ -2,6 +2,8 @@ Date: Fri, 29 Jan 2021 20:06:16 -0700 Subject: doc: add our support doc to the main project doc for x86 and s390x +Git-commit: 0000000000000000000000000000000000000000 + Include-If: %if %{legacy_qemu_kvm} Signed-off-by: Bruce Rogers <brog...@suse.com> ++++++ hostmem-default-the-amount-of-prealloc-t.patch ++++++ From: Jaroslav Jindrak <dzej...@gmail.com> Date: Tue, 17 May 2022 14:38:58 +0200 Subject: hostmem: default the amount of prealloc-threads to smp-cpus Git-commit: f8d426a6852c560fdd8648ae961c8189909a4b82 References: bsc#1197084 Prior to the introduction of the prealloc-threads property, the amount of threads used to preallocate memory was derived from the value of smp-cpus passed to qemu, the amount of physical cpus of the host and a hardcoded maximum value. When the prealloc-threads property was introduced, it included a default of 1 in backends/hostmem.c and a default of smp-cpus using the sugar API for the property itself. The latter default is not used when the property is not specified on qemu's command line, so guests that were not adjusted for this change suddenly started to use the default of 1 thread to preallocate memory, which resulted in observable slowdowns in guest boots for guests with large memory (e.g. when using libvirt <8.2.0 or managing guests manually). This commit restores the original behavior for these cases while not impacting guests started with the prealloc-threads property in any way. Fixes: 220c1fd864e9d ("hostmem: introduce "prealloc-threads" property") Signed-off-by: Jaroslav Jindrak <dzej...@gmail.com> Message-Id: <20220517123858.7933-1-dzej...@gmail.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- backends/hostmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index b2a5e905e866cd52f2f3e84f7d91..e4062a1c34920b5302fe57b8fdac 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -274,7 +274,7 @@ static void host_memory_backend_init(Object *obj) backend->merge = machine_mem_merge(machine); backend->dump = machine_dump_guest_core(machine); backend->reserve = true; - backend->prealloc_threads = 1; + backend->prealloc_threads = machine->smp.cpus; } static void host_memory_backend_post_init(Object *obj) ++++++ hw-scsi-megasas-check-for-NULL-frame-in-.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.175884980 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.175884980 +0200 @@ -2,7 +2,7 @@ Date: Mon, 7 Mar 2022 16:22:01 +0100 Subject: hw/scsi/megasas: check for NULL frame in megasas_command_cancelled() -Git-commit: 00000000000000000000000000000000000000000000 +Git-commit: 0000000000000000000000000000000000000000 References: bsc#1180432, CVE-2020-35503 Ensure that 'cmd->frame' is not NULL before accessing the 'header' field. @@ -17,10 +17,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c -index 4ff51221d4cd0952d9394b8f66b1..07b2b08bf2866907acf0a2b4450c 100644 +index d5dfb412bac4251c9fa06eb416b4..cf97b4d2db5bf91a0e18908e900d 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c -@@ -1891,7 +1891,7 @@ static void megasas_command_cancelled(SCSIRequest *req) +@@ -1927,7 +1927,7 @@ static void megasas_command_cancelled(SCSIRequest *req) { MegasasCmd *cmd = req->hba_private; ++++++ hw-smbios-handle-both-file-formats-regar.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.183883744 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.187883126 +0200 @@ -16,10 +16,10 @@ 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c -index 7397e567373b2dbfabae8fe10a5f..61b7546a6dd7010bdc248f969100 100644 +index 60349ee402719d55896658bf203c..59091c8454bf6d8d05c4c8313753 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c -@@ -1138,6 +1138,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1180,6 +1180,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) struct smbios_structure_header *header; int size; struct smbios_table *table; /* legacy mode only */ @@ -27,7 +27,7 @@ if (!qemu_opts_validate(opts, qemu_smbios_file_opts, errp)) { return; -@@ -1150,11 +1151,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1192,11 +1193,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) } /* @@ -53,7 +53,7 @@ header = (struct smbios_structure_header *)(smbios_tables + smbios_tables_len); -@@ -1169,6 +1180,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1211,6 +1222,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) header->type); return; } @@ -73,7 +73,7 @@ set_bit(header->type, have_binfile_bitmap); if (header->type == 4) { -@@ -1189,6 +1213,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1231,6 +1255,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) * delete the one we don't need from smbios_set_defaults(), * once we know which machine version has been requested. */ ++++++ hw-usb-hcd-ehci-fix-writeback-order.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.195881890 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.199881272 +0200 @@ -1,7 +1,6 @@ -From e4ad2b63e748643e12306d61aea7aaf5a41a0d3c Mon Sep 17 00:00:00 2001 From: Arnout Engelen <arn...@bzzt.net> Date: Sun, 8 May 2022 17:32:22 +0200 -Subject: [PATCH] hw/usb/hcd-ehci: fix writeback order +Subject: hw/usb/hcd-ehci: fix writeback order Git-commit: f471e8b060798f26a7fc339c6152f82f22a7b33d References: bsc#1192115 @@ -37,17 +36,17 @@ Signed-off-by: Arnout Engelen <arn...@bzzt.net> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> -(cherry picked from commit f471e8b060798f26a7fc339c6152f82f22a7b33d) Signed-off-by: Lin Ma <l...@suse.com> +Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- hw/usb/hcd-ehci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c -index 6caa7ac6c2..3464b2406e 100644 +index 33a8a377bd9503cf0ac1e6bd97e6..d4da8dcb8d15e3f1dcb8b6cfddf7 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c -@@ -2009,7 +2009,10 @@ static int ehci_state_writeback(EHCIQueue *q) +@@ -2011,7 +2011,10 @@ static int ehci_state_writeback(EHCIQueue *q) ehci_trace_qtd(q, NLPTR_GET(p->qtdaddr), (EHCIqtd *) &q->qh.next_qtd); qtd = (uint32_t *) &q->qh.next_qtd; addr = NLPTR_GET(p->qtdaddr); @@ -59,7 +58,4 @@ ehci_free_packet(p); /* --- -2.34.1 - ++++++ increase-x86_64-physical-bits-to-42.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.207880036 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.211879418 +0200 @@ -13,6 +13,47 @@ Signed-off-by: Bruce Rogers <brog...@suse.com> Signed-off-by: Andreas F??rber <afaer...@suse.de> + +The DSDT needs to be updated as well, or tests will fail. + +The necessary changes are the following ones: + +@@ -5,13 +5,13 @@ + * + * Disassembling to symbolic ASL+ operators + * +- * Disassembly of /tmp/aml-ML87L1, Thu May 19 16:20:30 2022 ++ * Disassembly of tests/data/acpi/microvm/DSDT.pcie, Thu May 19 16:20:30 2022 + * + * Original Table Header: + * Signature "DSDT" + * Length 0x00000BCF (3023) + * Revision 0x02 +- * Checksum 0xD1 ++ * Checksum 0xD8 + * OEM ID "BOCHS " + * OEM Table ID "BXPC " + * OEM Revision 0x00000001 (1) +@@ -1256,10 +1256,10 @@ + ,, , AddressRangeMemory, TypeStatic) + QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, + 0x0000000000000000, // Granularity +- 0x0000030000000000, // Range Minimum +- 0x000003FFFFFFFFFF, // Range Maximum ++ 0x000000C000000000, // Range Minimum ++ 0x000000FFFFFFFFFF, // Range Maximum + 0x0000000000000000, // Translation Offset +- 0x0000010000000000, // Length ++ 0x0000004000000000, // Length + ,, , AddressRangeMemory, TypeStatic) + }) + Name (SUPP, Zero) + +We cannot, however, commit the modified binary as part of this patch, +will not apply it. The binary is instead put in the package, and copied +in place in the spec file, just before 'make check'. + +Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- target/i386/tcg/helper-tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ++++++ intc-exynos4210_gic-replace-snprintf-wit.patch ++++++ From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lur...@redhat.com> Date: Wed, 20 Apr 2022 17:25:58 +0400 Subject: intc/exynos4210_gic: replace snprintf() with g_strdup_printf() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-commit: a0e04317f3ef86d7b18ec6e6459d8aa66f787d12 While at it, replace '%x' with '%u' as suggested by Philippe Mathieu-Daud??. Also fixes a GCC 12.0.1 -Wformat-overflow false-positive. Signed-off-by: Marc-Andr?? Lureau <marcandre.lur...@redhat.com> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Daniel P. Berrang?? <berra...@redhat.com> Message-Id: <20220420132624.2439741-16-marcandre.lur...@redhat.com> [DF: Replaces downstream patch: hw-intc-exynos4210_gic-provide-more-room.patch] Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- hw/intc/exynos4210_gic.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index bc73d1f1152438de04c252a2ec84..f8dd719caa1e598a32ab6cc6ee7a 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -289,10 +289,6 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) Object *obj = OBJECT(dev); Exynos4210GicState *s = EXYNOS4210_GIC(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); - const char cpu_prefix[] = "exynos4210-gic-alias_cpu"; - const char dist_prefix[] = "exynos4210-gic-alias_dist"; - char cpu_alias_name[sizeof(cpu_prefix) + 3]; - char dist_alias_name[sizeof(cpu_prefix) + 3]; SysBusDevice *gicbusdev; uint32_t n = s->num_cpu; uint32_t i; @@ -322,8 +318,10 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) */ assert(n <= EXYNOS4210_NCPUS); for (i = 0; i < n; i++) { + g_autofree char *cpu_alias_name = g_strdup_printf("exynos4210-gic-alias_cpu%u", i); + g_autofree char *dist_alias_name = g_strdup_printf("exynos4210-gic-alias_dist%u", i); + /* Map CPU interface per SMP Core */ - sprintf(cpu_alias_name, "%s%x", cpu_prefix, i); memory_region_init_alias(&s->cpu_alias[i], obj, cpu_alias_name, sysbus_mmio_get_region(gicbusdev, 1), @@ -333,7 +331,6 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) EXYNOS4210_EXT_GIC_CPU_GET_OFFSET(i), &s->cpu_alias[i]); /* Map Distributor per SMP Core */ - sprintf(dist_alias_name, "%s%x", dist_prefix, i); memory_region_init_alias(&s->dist_alias[i], obj, dist_alias_name, sysbus_mmio_get_region(gicbusdev, 0), ++++++ linux-user-Fake-proc-cpuinfo.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.247873856 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.251873238 +0200 @@ -21,10 +21,10 @@ 1 file changed, 24 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 0a1d99cb44d168d561de4c42e132..d4f3295b9d1837126f35d8357e80 100644 +index c9adb65a2293e9735341a217a68d..8de1bb8d48eeb867a1047d986299 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7871,6 +7871,27 @@ static int open_self_stat(void *cpu_env, int fd) +@@ -8099,6 +8099,27 @@ static int open_self_stat(void *cpu_env, int fd) return 0; } @@ -52,7 +52,7 @@ static int open_self_auxv(void *cpu_env, int fd) { CPUState *cpu = env_cpu((CPUArchState *)cpu_env); -@@ -8025,6 +8046,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, +@@ -8253,6 +8274,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, #if defined(TARGET_SPARC) || defined(TARGET_HPPA) { "/proc/cpuinfo", open_cpuinfo, is_proc }, #endif ++++++ linux-user-add-binfmt-wrapper-for-argv-0.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.259872002 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.259872002 +0200 @@ -82,10 +82,10 @@ + return execve(new_argv[0], new_argv, envp); +} diff --git a/meson.build b/meson.build -index 96de1a6ef948542aa93bd0324200..612da7167f5c4aafcf77a0e1ce55 100644 +index 861de93c4f58f294f9d353c9674e..05740dd14228fb700ecf6b793cfc 100644 --- a/meson.build +++ b/meson.build -@@ -3043,6 +3043,11 @@ endforeach +@@ -3336,6 +3336,11 @@ endforeach # Other build targets ++++++ linux-user-lseek-explicitly-cast-non-set.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.271870148 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.275869530 +0200 @@ -15,10 +15,10 @@ 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 381066e788eb36c1d6ca5b872353..7fe3a69c7cd860d7c1a8ea88a48d 100644 +index 5096b1258f6d631b80fb6cca6011..ae26ad25466aca617d272e4c7474 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -8701,8 +8701,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, +@@ -8929,8 +8929,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, return ret; #endif #ifdef TARGET_NR_lseek ++++++ linux-user-use-target_ulong.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.283868294 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.287867676 +0200 @@ -12,16 +12,29 @@ Signed-off-by: Alexander Graf <ag...@suse.de> [JRZ: changes from linux-user/qemu.h wass moved to linux-user/user-internals.h] Signed-off-by: Jose R Ziviani <jzivi...@suse.de> +[DF: Forward port, i.e., use ulong for do_prctl too] +Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- - linux-user/syscall.c | 18 +++++++++--------- + linux-user/syscall.c | 20 ++++++++++---------- linux-user/user-internals.h | 8 ++++---- - 2 files changed, 13 insertions(+), 13 deletions(-) + 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index d4f3295b9d1837126f35d8357e80..381066e788eb36c1d6ca5b872353 100644 +index 8de1bb8d48eeb867a1047d986299..5096b1258f6d631b80fb6cca6011 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -8346,10 +8346,10 @@ _syscall2(int, pivot_root, const char *, new_root, const char *, put_old) +@@ -6406,8 +6406,8 @@ static abi_long do_prctl_inval1(CPUArchState *env, abi_long arg2) + #define do_prctl_set_unalign do_prctl_inval1 + #endif + +-static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, +- abi_long arg3, abi_long arg4, abi_long arg5) ++static abi_long do_prctl(CPUArchState *env, abi_ulong option, abi_ulong arg2, ++ abi_ulong arg3, abi_ulong arg4, abi_ulong arg5) + { + abi_long ret; + +@@ -8574,10 +8574,10 @@ _syscall2(int, pivot_root, const char *, new_root, const char *, put_old) * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_<errcode>. */ @@ -36,16 +49,7 @@ { CPUState *cpu = env_cpu(cpu_env); abi_long ret; -@@ -10807,7 +10807,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, - */ - ret = -TARGET_EINVAL; - if (cpu_isar_feature(aa64_sve, env_archcpu(cpu_env)) -- && arg2 >= 0 && arg2 <= 512 * 16 && !(arg2 & 15)) { -+ && arg2 <= 512 * 16 && !(arg2 & 15)) { - CPUARMState *env = cpu_env; - ARMCPU *cpu = env_archcpu(env); - uint32_t vq, old_vq; -@@ -13176,10 +13176,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -13201,10 +13201,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } @@ -61,10 +65,10 @@ CPUState *cpu = env_cpu(cpu_env); abi_long ret; diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h -index 661612a088b5c4e37f8f9fbcb6af..db24553432003b2faa3957d63c3d 100644 +index ee152ccfaa8fdfa33b1e6d36b8ab..7117d8b2c583a16311ef82a0eb60 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h -@@ -60,10 +60,10 @@ int info_is_fdpic(struct image_info *info); +@@ -59,10 +59,10 @@ int info_is_fdpic(struct image_info *info); void target_set_brk(abi_ulong new_brk); void syscall_init(void); @@ -77,6 +81,6 @@ + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8); extern __thread CPUState *thread_cpu; - void cpu_loop(CPUArchState *env); + void QEMU_NORETURN cpu_loop(CPUArchState *env); const char *target_strerror(int err); ++++++ meson-install-ivshmem-client-and-ivshmem.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.299865822 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.299865822 +0200 @@ -11,21 +11,21 @@ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-client/meson.build b/contrib/ivshmem-client/meson.build -index 1b171efb4f536f608191cd4cba1b..83a559117fd1a2c99f34a43fa38d 100644 +index ce8dcca84ddb23de1d8eaa813f5a..bc77336258302e0f7a962ef47ed6 100644 --- a/contrib/ivshmem-client/meson.build +++ b/contrib/ivshmem-client/meson.build @@ -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) + install: true) diff --git a/contrib/ivshmem-server/meson.build b/contrib/ivshmem-server/meson.build -index 3a539422017e6dc342e098c3e9c8..a1c39aa3b30e9c56941cbc394f86 100644 +index c6c3c82e89f363e1929bfa08e318..185879a0c6ce71b1272a7ef6ce4d 100644 --- a/contrib/ivshmem-server/meson.build +++ b/contrib/ivshmem-server/meson.build @@ -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) ++++++ modules-generates-per-target-modinfo.patch ++++++ From: "Jose R. Ziviani" <jzivi...@suse.de> Date: Tue, 28 Sep 2021 17:46:28 -0300 Subject: modules: generates per-target modinfo Git-commit: 05d6814c3eb16524e992bb7048d3385f8e99dd6a References: bsc#1199015 This patch changes the way modinfo is generated and built. Instead of one modinfo.c it generates one modinfo-<target>-softmmu.c per target. It aims a fine-tune control of modules by configuring Kconfig. Signed-off-by: Jose R. Ziviani <jzivi...@suse.de> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> Message-Id: <165369003038.5857.13084289285185196779.stgit@work> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- meson.build | 25 +++++++++++++++------- scripts/modinfo-generate.py | 42 ++++++++++++++++++++++--------------- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/meson.build b/meson.build index 05740dd14228fb700ecf6b793cfc..eeaa045c90402cee5ba946f321c1 100644 --- a/meson.build +++ b/meson.build @@ -2999,14 +2999,23 @@ foreach d, list : target_modules endforeach if enable_modules - modinfo_src = custom_target('modinfo.c', - output: 'modinfo.c', - input: modinfo_files, - command: [modinfo_generate, '@INPUT@'], - capture: true) - modinfo_lib = static_library('modinfo', modinfo_src) - modinfo_dep = declare_dependency(link_whole: modinfo_lib) - softmmu_ss.add(modinfo_dep) + foreach target : target_dirs + if target.endswith('-softmmu') + config_target = config_target_mak[target] + config_devices_mak = target + '-config-devices.mak' + modinfo_src = custom_target('modinfo-' + target + '.c', + output: 'modinfo-' + target + '.c', + input: modinfo_files, + command: [modinfo_generate, '--devices', config_devices_mak, '@INPUT@'], + capture: true) + + modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src) + modinfo_dep = declare_dependency(link_with: modinfo_lib) + + arch = config_target['TARGET_NAME'] == 'sparc64' ? 'sparc64' : config_target['TARGET_BASE_ARCH'] + hw_arch[arch].add(modinfo_dep) + endif + endforeach endif nm = find_program('nm') diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py index 689f33c0f2919508341712a1cde4..a0c09edae1009bc77964e95d585f 100755 --- a/scripts/modinfo-generate.py +++ b/scripts/modinfo-generate.py @@ -32,7 +32,7 @@ def parse_line(line): continue return (kind, data) -def generate(name, lines): +def generate(name, lines, core_modules): arch = "" objs = [] deps = [] @@ -49,7 +49,13 @@ def generate(name, lines): elif kind == 'arch': arch = data; elif kind == 'kconfig': - pass # ignore + # don't add a module which dependency is not enabled + # in kconfig + if data.strip() not in core_modules: + print(" /* module {} isn't enabled in Kconfig. */" + .format(data.strip())) + print("/* },{ */") + return [] else: print("unknown:", kind) exit(1) @@ -60,7 +66,7 @@ def generate(name, lines): print_array("objs", objs) print_array("deps", deps) print_array("opts", opts) - print("},{"); + print("},{") return deps def print_pre(): @@ -74,26 +80,28 @@ def print_post(): print("}};") def main(args): + if len(args) < 3 or args[0] != '--devices': + print('Expected: modinfo-generate.py --devices ' + 'config-device.mak [modinfo files]', file=sys.stderr) + exit(1) + + # get all devices enabled in kconfig, from *-config-device.mak + enabled_core_modules = set() + with open(args[1]) as file: + for line in file.readlines(): + config = line.split('=') + if config[1].rstrip() == 'y': + enabled_core_modules.add(config[0][7:]) # remove CONFIG_ + deps = {} print_pre() - for modinfo in args: + for modinfo in args[2:]: with open(modinfo) as f: lines = f.readlines() print(" /* %s */" % modinfo) - (basename, ext) = os.path.splitext(modinfo) - deps[basename] = generate(basename, lines) + (basename, _) = os.path.splitext(modinfo) + deps[basename] = generate(basename, lines, enabled_core_modules) print_post() - flattened_deps = {flat.strip('" ') for dep in deps.values() for flat in dep} - error = False - for dep in flattened_deps: - if dep not in deps.keys(): - print("Dependency {} cannot be satisfied".format(dep), - file=sys.stderr) - error = True - - if error: - exit(1) - if __name__ == "__main__": main(sys.argv[1:]) ++++++ modules-introduces-module_kconfig-direct.patch ++++++ From: "Jose R. Ziviani" <jzivi...@suse.de> Date: Tue, 28 Sep 2021 17:46:27 -0300 Subject: modules: introduces module_kconfig directive Git-commit: 24ce7aa77dd1a3095d994bf53d60cce6e672cf4d References: bsc#1199015 module_kconfig is a new directive that should be used with module_obj whenever that module depends on the Kconfig to be enabled. When the module is enabled in Kconfig we are sure that its dependencies will be enabled as well, thus the module will be loaded without any problem. The correct way to use module_kconfig is by passing the Kconfig option to module_kconfig (or the *config-devices.mak without CONFIG_). Signed-off-by: Jose R. Ziviani <jzivi...@suse.de> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> Message-Id: <165369002370.5857.12150544416563557322.stgit@work> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- hw/display/qxl.c | 1 + hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user-vga.c | 1 + hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu-gl.c | 1 + hw/display/virtio-gpu-pci-gl.c | 1 + hw/display/virtio-gpu-pci.c | 1 + hw/display/virtio-gpu.c | 1 + hw/display/virtio-vga-gl.c | 1 + hw/display/virtio-vga.c | 1 + hw/s390x/virtio-ccw-gpu.c | 1 + hw/usb/ccid-card-emulated.c | 1 + hw/usb/ccid-card-passthru.c | 1 + hw/usb/host-libusb.c | 1 + hw/usb/redirect.c | 1 + include/qemu/module.h | 10 ++++++++++ scripts/modinfo-generate.py | 2 ++ 18 files changed, 28 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index adbdbcaeb6121106bfcaee288d4c..092fb36b3a928b062067207d7518 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2515,6 +2515,7 @@ static const TypeInfo qxl_primary_info = { .class_init = qxl_primary_class_init, }; module_obj("qxl-vga"); +module_kconfig(QXL); static void qxl_secondary_class_init(ObjectClass *klass, void *data) { diff --git a/hw/display/vhost-user-gpu-pci.c b/hw/display/vhost-user-gpu-pci.c index daefcf7101590cbd3b3681ac6fa9..d119bcae45d48e6eb14afe7d26e6 100644 --- a/hw/display/vhost-user-gpu-pci.c +++ b/hw/display/vhost-user-gpu-pci.c @@ -44,6 +44,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_gpu_pci_info = { .instance_init = vhost_user_gpu_pci_initfn, }; module_obj(TYPE_VHOST_USER_GPU_PCI); +module_kconfig(VHOST_USER_GPU); static void vhost_user_gpu_pci_register_types(void) { diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 09818231bd24a9f8acd7ee3c2e15..5fc192022346dfc7ad5646db069d 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -599,6 +599,7 @@ static const TypeInfo vhost_user_gpu_info = { .class_init = vhost_user_gpu_class_init, }; module_obj(TYPE_VHOST_USER_GPU); +module_kconfig(VHOST_USER_GPU); static void vhost_user_gpu_register_types(void) { diff --git a/hw/display/vhost-user-vga.c b/hw/display/vhost-user-vga.c index 072c9c65bc754f399bc49a3dbb88..0c146080fd2c15ff9fd86338164e 100644 --- a/hw/display/vhost-user-vga.c +++ b/hw/display/vhost-user-vga.c @@ -45,6 +45,7 @@ static const VirtioPCIDeviceTypeInfo vhost_user_vga_info = { .instance_init = vhost_user_vga_inst_initfn, }; module_obj(TYPE_VHOST_USER_VGA); +module_kconfig(VHOST_USER_VGA); static void vhost_user_vga_register_types(void) { diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index fff0fb4a828a0814ab5290a17f78..a8a5a8812f331fa56e3ef6a18821 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -260,6 +260,7 @@ static const TypeInfo virtio_gpu_base_info = { .abstract = true }; module_obj(TYPE_VIRTIO_GPU_BASE); +module_kconfig(VIRTIO_GPU); static void virtio_register_types(void) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c index 6cc4313b1af2c3fac0011d6b39aa..f7837cc44dc41c665b703d12c79f 100644 --- a/hw/display/virtio-gpu-gl.c +++ b/hw/display/virtio-gpu-gl.c @@ -160,6 +160,7 @@ static const TypeInfo virtio_gpu_gl_info = { .class_init = virtio_gpu_gl_class_init, }; module_obj(TYPE_VIRTIO_GPU_GL); +module_kconfig(VIRTIO_GPU); static void virtio_register_types(void) { diff --git a/hw/display/virtio-gpu-pci-gl.c b/hw/display/virtio-gpu-pci-gl.c index 99b14a07185ea6b3a2a2f99f167f..a2819e1ca93f98022a81b5a14d18 100644 --- a/hw/display/virtio-gpu-pci-gl.c +++ b/hw/display/virtio-gpu-pci-gl.c @@ -47,6 +47,7 @@ static const VirtioPCIDeviceTypeInfo virtio_gpu_gl_pci_info = { .instance_init = virtio_gpu_gl_initfn, }; module_obj(TYPE_VIRTIO_GPU_GL_PCI); +module_kconfig(VIRTIO_PCI); static void virtio_gpu_gl_pci_register_types(void) { diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c index e36eee0c409bb8d3bf7cbec85278..93f214ff58127452d0d56a19c361 100644 --- a/hw/display/virtio-gpu-pci.c +++ b/hw/display/virtio-gpu-pci.c @@ -65,6 +65,7 @@ static const TypeInfo virtio_gpu_pci_base_info = { .abstract = true }; module_obj(TYPE_VIRTIO_GPU_PCI_BASE); +module_kconfig(VIRTIO_PCI); #define TYPE_VIRTIO_GPU_PCI "virtio-gpu-pci" typedef struct VirtIOGPUPCI VirtIOGPUPCI; diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 529b5246b2b55da16445712e4173..cd4a56056fd9407a904470878318 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1452,6 +1452,7 @@ static const TypeInfo virtio_gpu_info = { .class_init = virtio_gpu_class_init, }; module_obj(TYPE_VIRTIO_GPU); +module_kconfig(VIRTIO_GPU); static void virtio_register_types(void) { diff --git a/hw/display/virtio-vga-gl.c b/hw/display/virtio-vga-gl.c index f22549097c5e8bb070da6d1c28d4..984faa6b39a80bc786e31ec3d393 100644 --- a/hw/display/virtio-vga-gl.c +++ b/hw/display/virtio-vga-gl.c @@ -37,6 +37,7 @@ static VirtioPCIDeviceTypeInfo virtio_vga_gl_info = { .instance_init = virtio_vga_gl_inst_initfn, }; module_obj(TYPE_VIRTIO_VGA_GL); +module_kconfig(VIRTIO_VGA); static void virtio_vga_register_types(void) { diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 7b55c8d0e72390b430fc4ad30f9f..c206b5da384bcc18dd14d3fcf62a 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -231,6 +231,7 @@ static const TypeInfo virtio_vga_base_info = { .abstract = true, }; module_obj(TYPE_VIRTIO_VGA_BASE); +module_kconfig(VIRTIO_VGA); #define TYPE_VIRTIO_VGA "virtio-vga" diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c index 5868a2a07093f163f93690b9b87b..024e8990f499b0b95f8912da86d5 100644 --- a/hw/s390x/virtio-ccw-gpu.c +++ b/hw/s390x/virtio-ccw-gpu.c @@ -60,6 +60,7 @@ static const TypeInfo virtio_ccw_gpu = { .class_init = virtio_ccw_gpu_class_init, }; module_obj(TYPE_VIRTIO_GPU_CCW); +module_kconfig(VIRTIO_CCW); static void virtio_ccw_gpu_register(void) { diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 6c8c0355e099c94a84fdf3b4ab12..1ddf7297f6125d59eae04a2ef5c4 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -613,6 +613,7 @@ static const TypeInfo emulated_card_info = { .class_init = emulated_class_initfn, }; module_obj(TYPE_EMULATED_CCID); +module_kconfig(USB); static void ccid_card_emulated_register_types(void) { diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index fa3040fb7154419ce9767d55e4ed..748544d170835ca5a1ef99c1faac 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -415,6 +415,7 @@ static const TypeInfo passthru_card_info = { .class_init = passthru_class_initfn, }; module_obj(TYPE_CCID_PASSTHRU); +module_kconfig(USB); static void ccid_card_passthru_register_types(void) { diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 2b35cb6cdd3933f2cf98307bcc4e..28f8af8941ff6db20283fcd85d23 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1809,6 +1809,7 @@ static const TypeInfo usb_host_dev_info = { .instance_init = usb_host_instance_init, }; module_obj(TYPE_USB_HOST_DEVICE); +module_kconfig(USB); static void usb_host_register_types(void) { diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 8692ea256109532acf791bb590bd..b384ad7e73fbea58655324a65fb8 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2620,6 +2620,7 @@ static const TypeInfo usbredir_dev_info = { .instance_init = usbredir_instance_init, }; module_obj(TYPE_USB_REDIR); +module_kconfig(USB); static void usbredir_register_types(void) { diff --git a/include/qemu/module.h b/include/qemu/module.h index 5fcc323b2a79d5adfdf27fa19bf7..bd73607104c951a34512a156cff0 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -135,6 +135,16 @@ void module_allow_arch(const char *arch); */ #define module_opts(name) modinfo(opts, name) +/** + * module_kconfig + * + * @name: Kconfig requirement necessary to load the module + * + * This module requires a core module that should be implemented and + * enabled in Kconfig. + */ +#define module_kconfig(name) modinfo(kconfig, name) + /* * module info database * diff --git a/scripts/modinfo-generate.py b/scripts/modinfo-generate.py index f559eed0077a22bfd25a26a79c01..689f33c0f2919508341712a1cde4 100755 --- a/scripts/modinfo-generate.py +++ b/scripts/modinfo-generate.py @@ -48,6 +48,8 @@ def generate(name, lines): opts.append(data) elif kind == 'arch': arch = data; + elif kind == 'kconfig': + pass # ignore else: print("unknown:", kind) exit(1) ++++++ pci-fix-overflow-in-snprintf-string-form.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.323862114 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.327861496 +0200 @@ -71,10 +71,10 @@ 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c -index e5993c1ef52b7c9e39faa7de4020..87c419836b3c990ee862f623fd89 100644 +index dae9119bfe5fe45a15e31985151e..c69b412434775df1368beb67984c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c -@@ -2576,15 +2576,15 @@ static char *pci_dev_fw_name(DeviceState *dev, char *buf, int len) +@@ -2625,15 +2625,15 @@ static char *pci_dev_fw_name(DeviceState *dev, char *buf, int len) static char *pcibus_get_fw_dev_path(DeviceState *dev) { PCIDevice *d = (PCIDevice *)dev; ++++++ qemu-6.2.0.tar.xz -> qemu-7.0.0.tar.xz ++++++ /work/SRC/openSUSE:Factory/qemu/qemu-6.2.0.tar.xz /work/SRC/openSUSE:Factory/.qemu.new.1533/qemu-7.0.0.tar.xz differ: char 26, line 1 ++++++ qemu-binfmt-conf-Modify-default-path.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.371854698 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.375854080 +0200 @@ -13,7 +13,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh -index 7de996d536eaf9c41255ae9695a5..cb06245a834f9e8f2bb0464a25ce 100755 +index 9cb723f44355c55d21eeeb2c1b7b..02eedc7c92d788637385ef3eba19 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -334,7 +334,7 @@ BINFMT_SET=qemu_register_interpreter ++++++ qemu-cvs-gettimeofday.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.383852844 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.387852226 +0200 @@ -11,10 +11,10 @@ 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index f1cfcc81048695222abc0a0f546d..5da0c1e2be709e7fcbbe34235813 100644 +index f65045efe6a22bb38d0c95dde084..4ba8637359340c3d84953be2347b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -9527,6 +9527,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -9754,6 +9754,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, { struct timeval tv; struct timezone tz; ++++++ qemu-cvs-ioctl_debug.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.395850990 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.399850372 +0200 @@ -13,10 +13,10 @@ 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 5da0c1e2be709e7fcbbe34235813..ad8e36a3e6e37a5cec02dd867776 100644 +index 4ba8637359340c3d84953be2347b..72cb2bbbcc3bf29af6f3f6ee3d85 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5699,8 +5699,21 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5700,8 +5700,21 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) ie = ioctl_entries; for(;;) { if (ie->target_cmd == 0) { ++++++ qemu-cvs-ioctl_nodirection.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.407849135 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.411848517 +0200 @@ -16,10 +16,10 @@ 1 file changed, 8 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index ad8e36a3e6e37a5cec02dd867776..0a1d99cb44d168d561de4c42e132 100644 +index 72cb2bbbcc3bf29af6f3f6ee3d85..c9adb65a2293e9735341a217a68d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5744,6 +5744,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5745,6 +5745,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) arg_type++; target_size = thunk_type_size(arg_type, 0); switch(ie->access) { @@ -33,7 +33,7 @@ case IOC_R: ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); if (!is_error(ret)) { -@@ -5762,6 +5769,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5763,6 +5770,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) unlock_user(argptr, arg, 0); ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); break; ++++++ qemu.spec.in ++++++ ++++ 3379 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/qemu/qemu.spec.in ++++ and /work/SRC/openSUSE:Factory/.qemu.new.1533/qemu.spec.in ++++++ qht-Revert-some-constification-in-qht.c.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.491836157 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.495835539 +0200 @@ -34,10 +34,10 @@ /** * qht_remove - remove a pointer from the hash table diff --git a/util/qht.c b/util/qht.c -index cfc2c60639af8f7905aae51c53bb..152b8d74f0b12cf4ed75e543575f 100644 +index 0803c194d10b5cdafdc8b18ec083..24fdd3e0e23447b2ca67c0a1bc3a 100644 --- a/util/qht.c +++ b/util/qht.c -@@ -485,10 +485,10 @@ bool qht_reset_size(struct qht *ht, size_t n_elems) +@@ -486,10 +486,10 @@ bool qht_reset_size(struct qht *ht, size_t n_elems) } static inline @@ -50,7 +50,7 @@ int i; do { -@@ -512,7 +512,7 @@ void *qht_do_lookup(const struct qht_bucket *head, qht_lookup_func_t func, +@@ -513,7 +513,7 @@ void *qht_do_lookup(const struct qht_bucket *head, qht_lookup_func_t func, } static __attribute__((noinline)) @@ -59,7 +59,7 @@ const void *userp, uint32_t hash) { unsigned int version; -@@ -525,10 +525,10 @@ void *qht_lookup__slowpath(const struct qht_bucket *b, qht_lookup_func_t func, +@@ -526,10 +526,10 @@ void *qht_lookup__slowpath(const struct qht_bucket *b, qht_lookup_func_t func, return ret; } @@ -72,7 +72,7 @@ const struct qht_map *map; unsigned int version; void *ret; -@@ -548,7 +548,7 @@ void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash, +@@ -549,7 +549,7 @@ void *qht_lookup_custom(const struct qht *ht, const void *userp, uint32_t hash, return qht_lookup__slowpath(b, func, userp, hash); } ++++++ qom-handle-case-of-chardev-spice-module-.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.503834303 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.507833685 +0200 @@ -14,10 +14,10 @@ 1 file changed, 6 insertions(+) diff --git a/qom/object.c b/qom/object.c -index 4f0677cca9e494a3eb20d9dabd0c..63ed3d67b61f7c5c67a3ee25e201 100644 +index d34608558e9e5e53f4b363774f06..ce9f80117e518640b89fb1afa7d3 100644 --- a/qom/object.c +++ b/qom/object.c -@@ -237,6 +237,12 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type) +@@ -238,6 +238,12 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type) return true; } ++++++ roms-Makefile-add-cross-file-to-qboot-me.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.515832449 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.519831832 +0200 @@ -13,10 +13,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile -index 6ea8edd9fcf6bb0cdc1f1602f241..df969e3ec33ab07fe3fcb489e0df 100644 +index c7c6e973db59572e8b8bee74e969..6f979016c273246ce91432ee0ace 100644 --- a/roms/Makefile +++ b/roms/Makefile -@@ -199,7 +199,7 @@ MESON = meson +@@ -197,7 +197,7 @@ MESON = meson NINJA = ninja qboot: mkdir -p qboot/build ++++++ roms-Makefile-pass-a-packaging-timestamp.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.527830596 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.531829978 +0200 @@ -20,7 +20,7 @@ 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/roms/Makefile b/roms/Makefile -index b967b53bb76ee8a94fc9b37e4460..66d06f5831303c3d41e943290389 100644 +index 5e44d9789001979a0e9ef3183f90..3d53bd528666b594ab3d6b631450 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -52,6 +52,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" ++++++ scsi-generic-check-for-additional-SG_IO-.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.539828742 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.543828124 +0200 @@ -2,6 +2,7 @@ Date: Fri, 25 Mar 2022 18:41:52 +0100 Subject: scsi-generic: check for additional SG_IO status on completion +Git-commit: 0000000000000000000000000000000000000000 References: bsc#1178049 SG_IO may return additional status in the 'status', 'driver_status', ++++++ scsi-lsi53c895a-fix-use-after-free-in-ls.patch ++++++ From: Mauro Matteo Cascella <mcasc...@redhat.com> Date: Tue, 5 Jul 2022 22:05:43 +0200 Subject: scsi/lsi53c895a: fix use-after-free in lsi_do_msgout (CVE-2022-0216) Git-commit: 6c8fa961da5e60f574bb52fd3ad44b1e9e8ad4b8 References: bsc#1198038, CVE-2022-0216 Set current_req->req to NULL to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Thanks to Thomas Huth for suggesting the patch. Fixes: CVE-2022-0216 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972 Signed-off-by: Mauro Matteo Cascella <mcasc...@redhat.com> Reviewed-by: Thomas Huth <th...@redhat.com> Message-Id: <20220705200543.2366809-1-mcasc...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- hw/scsi/lsi53c895a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index c8773f73f75610add97008c67523..99ea42d49b08c301406db810ffef 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1028,8 +1028,9 @@ static void lsi_do_msgout(LSIState *s) case 0x0d: /* The ABORT TAG message clears the current I/O process only. */ trace_lsi_do_msgout_abort(current_tag); - if (current_req) { + if (current_req && current_req->req) { scsi_req_cancel(current_req->req); + current_req->req = NULL; } lsi_disconnect(s); break; ++++++ scsi-lsi53c895a-really-fix-use-after-fre.patch ++++++ From: Mauro Matteo Cascella <mcasc...@redhat.com> Date: Mon, 11 Jul 2022 14:33:16 +0200 Subject: scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216) Git-commit: 4367a20cc442c56b05611b4224de9a61908f9eac References: bsc#1198038, CVE-2022-0216 Set current_req to NULL, not current_req->req, to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Also apply the fix to CLEAR QUEUE and BUS DEVICE RESET messages as well, since they also cancel the request. Thanks to Alexander Bulekov for providing a reproducer. Fixes: CVE-2022-0216 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972 Signed-off-by: Mauro Matteo Cascella <mcasc...@redhat.com> Tested-by: Alexander Bulekov <alx...@bu.edu> Message-Id: <20220711123316.421279-1-mcasc...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- hw/scsi/lsi53c895a.c | 3 +- tests/qtest/fuzz-lsi53c895a-test.c | 76 ++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 99ea42d49b08c301406db810ffef..ad5f5e5f394f27665feaf7e265eb 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1030,7 +1030,7 @@ static void lsi_do_msgout(LSIState *s) trace_lsi_do_msgout_abort(current_tag); if (current_req && current_req->req) { scsi_req_cancel(current_req->req); - current_req->req = NULL; + current_req = NULL; } lsi_disconnect(s); break; @@ -1056,6 +1056,7 @@ static void lsi_do_msgout(LSIState *s) /* clear the current I/O process */ if (s->current) { scsi_req_cancel(s->current->req); + current_req = NULL; } /* As the current implemented devices scsi_disk and scsi_generic diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c895a-test.c index ba5d468970cf9da86615d55211bf..c1af0ab1ce62350b7455b953cf83 100644 --- a/tests/qtest/fuzz-lsi53c895a-test.c +++ b/tests/qtest/fuzz-lsi53c895a-test.c @@ -8,6 +8,79 @@ #include "qemu/osdep.h" #include "libqos/libqtest.h" +/* + * This used to trigger a UAF in lsi_do_msgout() + * https://gitlab.com/qemu-project/qemu/-/issues/972 + */ +static void test_lsi_do_msgout_cancel_req(void) +{ + QTestState *s; + + if (sizeof(void *) == 4) { + g_test_skip("memory size too big for 32-bit build"); + return; + } + + s = qtest_init("-M q35 -m 4G -display none -nodefaults " + "-device lsi53c895a,id=scsi " + "-device scsi-hd,drive=disk0 " + "-drive file=null-co://,id=disk0,if=none,format=raw"); + + qtest_outl(s, 0xcf8, 0x80000810); + qtest_outl(s, 0xcf8, 0xc000); + qtest_outl(s, 0xcf8, 0x80000810); + qtest_outw(s, 0xcfc, 0x7); + qtest_outl(s, 0xcf8, 0x80000810); + qtest_outl(s, 0xcfc, 0xc000); + qtest_outl(s, 0xcf8, 0x80000804); + qtest_outw(s, 0xcfc, 0x05); + qtest_writeb(s, 0x69736c10, 0x08); + qtest_writeb(s, 0x69736c13, 0x58); + qtest_writeb(s, 0x69736c1a, 0x01); + qtest_writeb(s, 0x69736c1b, 0x06); + qtest_writeb(s, 0x69736c22, 0x01); + qtest_writeb(s, 0x69736c23, 0x07); + qtest_writeb(s, 0x69736c2b, 0x02); + qtest_writeb(s, 0x69736c48, 0x08); + qtest_writeb(s, 0x69736c4b, 0x58); + qtest_writeb(s, 0x69736c52, 0x04); + qtest_writeb(s, 0x69736c53, 0x06); + qtest_writeb(s, 0x69736c5b, 0x02); + qtest_outl(s, 0xc02d, 0x697300); + qtest_writeb(s, 0x5a554662, 0x01); + qtest_writeb(s, 0x5a554663, 0x07); + qtest_writeb(s, 0x5a55466a, 0x10); + qtest_writeb(s, 0x5a55466b, 0x22); + qtest_writeb(s, 0x5a55466c, 0x5a); + qtest_writeb(s, 0x5a55466d, 0x5a); + qtest_writeb(s, 0x5a55466e, 0x34); + qtest_writeb(s, 0x5a55466f, 0x5a); + qtest_writeb(s, 0x5a345a5a, 0x77); + qtest_writeb(s, 0x5a345a5b, 0x55); + qtest_writeb(s, 0x5a345a5c, 0x51); + qtest_writeb(s, 0x5a345a5d, 0x27); + qtest_writeb(s, 0x27515577, 0x41); + qtest_outl(s, 0xc02d, 0x5a5500); + qtest_writeb(s, 0x364001d0, 0x08); + qtest_writeb(s, 0x364001d3, 0x58); + qtest_writeb(s, 0x364001da, 0x01); + qtest_writeb(s, 0x364001db, 0x26); + qtest_writeb(s, 0x364001dc, 0x0d); + qtest_writeb(s, 0x364001dd, 0xae); + qtest_writeb(s, 0x364001de, 0x41); + qtest_writeb(s, 0x364001df, 0x5a); + qtest_writeb(s, 0x5a41ae0d, 0xf8); + qtest_writeb(s, 0x5a41ae0e, 0x36); + qtest_writeb(s, 0x5a41ae0f, 0xd7); + qtest_writeb(s, 0x5a41ae10, 0x36); + qtest_writeb(s, 0x36d736f8, 0x0c); + qtest_writeb(s, 0x36d736f9, 0x80); + qtest_writeb(s, 0x36d736fa, 0x0d); + qtest_outl(s, 0xc02d, 0x364000); + + qtest_quit(s); +} + /* * This used to trigger the assert in lsi_do_dma() * https://bugs.launchpad.net/qemu/+bug/697510 @@ -48,5 +121,8 @@ int main(int argc, char **argv) test_lsi_do_dma_empty_queue); } + qtest_add_func("fuzz/lsi53c895a/lsi_do_msgout_cancel_req", + test_lsi_do_msgout_cancel_req); + return g_test_run(); } ++++++ seabios-switch-to-python3-as-needed.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.567824415 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.571823797 +0200 @@ -17,24 +17,24 @@ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index 418a0e3649443ee89e8fdad436f5..408983026669e531dcb84230dd23 100644 +index c108f87de7683667d1a0cad6b9e5..408983026669e531dcb84230dd23 100644 --- a/roms/seabios/Makefile +++ b/roms/seabios/Makefile @@ -22,7 +22,7 @@ LD=$(CROSS_PREFIX)ld OBJCOPY=$(CROSS_PREFIX)objcopy OBJDUMP=$(CROSS_PREFIX)objdump STRIP=$(CROSS_PREFIX)strip --PYTHON=python2 +-PYTHON=python +PYTHON=python3 CPP=cpp IASL:=iasl LD32BIT_FLAG:=-melf_i386 diff --git a/roms/seabios/scripts/acpi_extract.py b/roms/seabios/scripts/acpi_extract.py -index 86c6226c0f9aae4e4687cf216369..7ac054e626780253fcec78414b17 100755 +index 3ed863b6a79412a1276bb905d08f..7ac054e626780253fcec78414b17 100755 --- a/roms/seabios/scripts/acpi_extract.py +++ b/roms/seabios/scripts/acpi_extract.py @@ -1,4 +1,4 @@ --#!/usr/bin/python2 +-#!/usr/bin/python +#!/usr/bin/python3 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <m...@redhat.com> # @@ -49,11 +49,11 @@ outstrs.append("static unsigned %s %s[] = {" % (otype, array)) odata = [] diff --git a/roms/seabios/scripts/acpi_extract_preprocess.py b/roms/seabios/scripts/acpi_extract_preprocess.py -index b8e92a525730442815a0dce78f45..6963847a8b5d3e4bf9340a67afe2 100755 +index 2698118406d97c164783335c7fb6..6963847a8b5d3e4bf9340a67afe2 100755 --- a/roms/seabios/scripts/acpi_extract_preprocess.py +++ b/roms/seabios/scripts/acpi_extract_preprocess.py @@ -1,4 +1,4 @@ --#!/usr/bin/python2 +-#!/usr/bin/python +#!/usr/bin/python3 # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <m...@redhat.com> # ++++++ softmmu-Always-initialize-xlat-in-addres.patch ++++++ From: Richard Henderson <richard.hender...@linaro.org> Date: Tue, 21 Jun 2022 08:38:29 -0700 Subject: softmmu: Always initialize xlat in address_space_translate_for_iotlb Git-commit: 418ade7849ce7641c0f7333718caf5091a02fd4c References: bsc#1201367, CVE-2022-35414 The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_MASK, so that the call to iotlb_to_section using the xlat'ed address returns io_mem_unassigned, as desired by the translate_fail path. It is most useful to record the original physical page address, which will eventually be logged by memory_region_access_valid when the access is rejected by unassigned_mem_accepts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1065 Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Message-Id: <20220621153829.366423-1-richard.hender...@linaro.org> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- softmmu/physmem.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 02aa7205a4992a678414111f625c..ce398f425793f209a896497ccaba 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -669,7 +669,7 @@ void tcg_iommu_init_notifier_list(CPUState *cpu) /* Called from RCU critical section */ MemoryRegionSection * -address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, +address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr orig_addr, hwaddr *xlat, hwaddr *plen, MemTxAttrs attrs, int *prot) { @@ -678,6 +678,7 @@ address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, IOMMUMemoryRegionClass *imrc; IOMMUTLBEntry iotlb; int iommu_idx; + hwaddr addr = orig_addr; AddressSpaceDispatch *d = qatomic_rcu_read(&cpu->cpu_ases[asidx].memory_dispatch); @@ -722,6 +723,16 @@ address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, return section; translate_fail: + /* + * We should be given a page-aligned address -- certainly + * tlb_set_page_with_attrs() does so. The page offset of xlat + * is used to index sections[], and PHYS_SECTION_UNASSIGNED = 0. + * The page portion of xlat will be logged by memory_region_access_valid() + * when this memory access is rejected, so use the original untranslated + * physical address. + */ + assert((orig_addr & ~TARGET_PAGE_MASK) == 0); + *xlat = orig_addr; return &d->map.sections[PHYS_SECTION_UNASSIGNED]; } ++++++ sphinx-change-default-language-to-en.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.591820707 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.591820707 +0200 @@ -1,8 +1,8 @@ From: =?UTF-8?q?Martin=20Li=C5=A1ka?= <mli...@suse.cz> -Date: Fri, 17 Jun 2022 16:02:56 +0200 +Date: Fri, 24 Jun 2022 15:42:55 +0100 Subject: sphinx: change default language to 'en' -Git-commit: 0000000000000000000000000000000000000000 +Git-commit: ba1a6723f58640ba281bc952abc255e97c70bad5 References: bsc#1200557 Fixes the following Sphinx warning (treated as error) starting @@ -12,17 +12,19 @@ Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English). Signed-off-by: Martin Liska <mli...@suse.cz> +Message-id: e91e51ee-48ac-437e-6467-98b56ee40...@suse.cz Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> -Acked-by: Dario Faggioli <dfaggi...@suse.com> +Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> +Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py -index 763e7d2434487bb558111d34f07f..84b593e12af8a17412b731ef4366 100644 +index 49dab44cca5a72637b4f892d7612..e33cf3d381211eacbf0114b194cb 100644 --- a/docs/conf.py +++ b/docs/conf.py -@@ -120,7 +120,7 @@ finally: +@@ -126,7 +126,7 @@ finally: # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. ++++++ tests-Fix-block-tests-to-be-compatible-w.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.659810201 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.663809583 +0200 @@ -60,7 +60,7 @@ file format: IMGFMT virtual size: 64 MiB (67108864 bytes) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 -index 607af590918aaccd12490493b42a..987158ca49a88cef0815ea86f39e 100755 +index 9bc3be8f75c5a791331868d51136..9875eaf25981d557e403c3471633 100755 --- a/tests/qemu-iotests/153 +++ b/tests/qemu-iotests/153 @@ -202,7 +202,8 @@ _send_qemu_cmd $QEMU_HANDLE \ ++++++ tests-qtest-Move-the-fuzz-tests-to-x86-o.patch ++++++ From: Thomas Huth <th...@redhat.com> Date: Thu, 14 Apr 2022 15:01:27 +0200 Subject: tests/qtest: Move the fuzz tests to x86 only Git-commit: b911c30c566dee48a27bc1bfa1ee6df3a729cbbb The fuzz tests are currently scheduled for all targets, but their setup code limits the run to "i386", so that these tests always show "SKIP" on other targets. Move it to the right x86 list in meson.build, then we can drop the architecture check during runtime, too. Message-Id: <20220414130127.719528-1-th...@redhat.com> Reviewed-by: Laurent Vivier <lviv...@redhat.com> Signed-off-by: Thomas Huth <th...@redhat.com> Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- tests/qtest/fuzz-lsi53c895a-test.c | 8 ++------ tests/qtest/fuzz-megasas-test.c | 12 ++++-------- tests/qtest/fuzz-sb16-test.c | 12 ++++-------- tests/qtest/fuzz-sdcard-test.c | 12 ++++-------- tests/qtest/fuzz-virtio-scsi-test.c | 8 ++------ tests/qtest/meson.build | 13 ++++++------- 6 files changed, 22 insertions(+), 43 deletions(-) diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c895a-test.c index c1af0ab1ce62350b7455b953cf83..df019114d31b10dc1e7768534a0a 100644 --- a/tests/qtest/fuzz-lsi53c895a-test.c +++ b/tests/qtest/fuzz-lsi53c895a-test.c @@ -112,14 +112,10 @@ static void test_lsi_do_dma_empty_queue(void) int main(int argc, char **argv) { - const char *arch = qtest_get_arch(); - g_test_init(&argc, &argv, NULL); - if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { - qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue", - test_lsi_do_dma_empty_queue); - } + qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue", + test_lsi_do_dma_empty_queue); qtest_add_func("fuzz/lsi53c895a/lsi_do_msgout_cancel_req", test_lsi_do_msgout_cancel_req); diff --git a/tests/qtest/fuzz-megasas-test.c b/tests/qtest/fuzz-megasas-test.c index e1141c58a4ec77d50279d1a53443..129b182f830c1e73b9a994bbeae9 100644 --- a/tests/qtest/fuzz-megasas-test.c +++ b/tests/qtest/fuzz-megasas-test.c @@ -64,16 +64,12 @@ static void test_gitlab_issue521_megasas_sgl_ovf(void) int main(int argc, char **argv) { - const char *arch = qtest_get_arch(); - g_test_init(&argc, &argv, NULL); - if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { - qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", - test_lp1878263_megasas_zero_iov_cnt); - qtest_add_func("fuzz/gitlab_issue521_megasas_sgl_ovf", - test_gitlab_issue521_megasas_sgl_ovf); - } + qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", + test_lp1878263_megasas_zero_iov_cnt); + qtest_add_func("fuzz/gitlab_issue521_megasas_sgl_ovf", + test_gitlab_issue521_megasas_sgl_ovf); return g_test_run(); } diff --git a/tests/qtest/fuzz-sb16-test.c b/tests/qtest/fuzz-sb16-test.c index f47a8bcdbd91eece6aee03f66070..91fdcd1e8a0f8b4095f8374a3750 100644 --- a/tests/qtest/fuzz-sb16-test.c +++ b/tests/qtest/fuzz-sb16-test.c @@ -55,15 +55,11 @@ static void test_fuzz_sb16_0xd4(void) int main(int argc, char **argv) { - const char *arch = qtest_get_arch(); - g_test_init(&argc, &argv, NULL); - if (strcmp(arch, "i386") == 0) { - qtest_add_func("fuzz/test_fuzz_sb16/1c", test_fuzz_sb16_0x1c); - qtest_add_func("fuzz/test_fuzz_sb16/91", test_fuzz_sb16_0x91); - qtest_add_func("fuzz/test_fuzz_sb16/d4", test_fuzz_sb16_0xd4); - } + qtest_add_func("fuzz/test_fuzz_sb16/1c", test_fuzz_sb16_0x1c); + qtest_add_func("fuzz/test_fuzz_sb16/91", test_fuzz_sb16_0x91); + qtest_add_func("fuzz/test_fuzz_sb16/d4", test_fuzz_sb16_0xd4); - return g_test_run(); + return g_test_run(); } diff --git a/tests/qtest/fuzz-sdcard-test.c b/tests/qtest/fuzz-sdcard-test.c index 0f94965a66e77cc52ed3a33fd93b..d0f4e0e93c0b0e23894b1f6a8095 100644 --- a/tests/qtest/fuzz-sdcard-test.c +++ b/tests/qtest/fuzz-sdcard-test.c @@ -164,15 +164,11 @@ static void oss_fuzz_36391(void) int main(int argc, char **argv) { - const char *arch = qtest_get_arch(); - g_test_init(&argc, &argv, NULL); - if (strcmp(arch, "i386") == 0) { - qtest_add_func("fuzz/sdcard/oss_fuzz_29225", oss_fuzz_29225); - qtest_add_func("fuzz/sdcard/oss_fuzz_36217", oss_fuzz_36217); - qtest_add_func("fuzz/sdcard/oss_fuzz_36391", oss_fuzz_36391); - } + qtest_add_func("fuzz/sdcard/oss_fuzz_29225", oss_fuzz_29225); + qtest_add_func("fuzz/sdcard/oss_fuzz_36217", oss_fuzz_36217); + qtest_add_func("fuzz/sdcard/oss_fuzz_36391", oss_fuzz_36391); - return g_test_run(); + return g_test_run(); } diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c index aaf6d10e189d40ffd4b40c4f144e..c9b6fe21231d618cbaf336cada20 100644 --- a/tests/qtest/fuzz-virtio-scsi-test.c +++ b/tests/qtest/fuzz-virtio-scsi-test.c @@ -62,14 +62,10 @@ static void test_mmio_oob_from_memory_region_cache(void) int main(int argc, char **argv) { - const char *arch = qtest_get_arch(); - g_test_init(&argc, &argv, NULL); - if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { - qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", - test_mmio_oob_from_memory_region_cache); - } + qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", + test_mmio_oob_from_memory_region_cache); return g_test_run(); } diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index d25f82bb5ac0be9befb3e98de169..e860b0edf275cd68cd24516cb1ca 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -17,13 +17,7 @@ slow_qtests = { 'test-hmp' : 120, } -qtests_generic = \ - (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-test'] : []) + \ - (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \ - (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \ - (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ - (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ - [ +qtests_generic = [ 'cdrom-test', 'device-introspect-test', 'machine-none-test', @@ -67,6 +61,11 @@ qtests_i386 = \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) + \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \ (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e-test'] : []) + \ + (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-test'] : []) + \ + (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \ + (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \ + (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ + (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \ (config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + \ (config_all_devices.has_key('CONFIG_VIRTIO_NET') and \ ++++++ update_git.sh ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.687805875 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.687805875 +0200 @@ -47,9 +47,9 @@ RC=1 fi ONE_GIG_IN_1K_BLOCKS=1048576 - AVAIL=$(df --output=avail /dev/shm | tail -1) + AVAIL=$(df --output=avail $TMPDIR | tail -1) if [[ $AVAIL -lt $ONE_GIG_IN_1K_BLOCKS ]]; then - echo "ERROR: Please provide at least 1GB available space in /dev/shm" + echo "ERROR: Please provide at least 1GB available space in $TMPDIR" RC=1 fi if [[ "$RC" = "1" ]]; then @@ -327,7 +327,7 @@ # TODO: WHAT IS THIS NEXT LINE EVEN DOING FOR US?? (OK, it's initing a repo, what do we rely on there?) # Here, the branch doesn't really matter, and we're not relying on a master branch - we're just making sure we are grabbing latest from upstream # (while using a clone of "something close" as a way to quickly get most objects available as quickly as possible) -git clone -ls ${LOCAL_REPO_MAP[0]} -b $GIT_BRANCH --single-branch $GIT_DIR &>/dev/null +git clone -ls ${LOCAL_REPO_MAP[0]} -b $GIT_BRANCH --single-branch $GIT_DIR #&>/dev/null echo "Please wait..." (cd $GIT_DIR && git remote add upstream \ $UPSTREAM_GIT_REPO &>/dev/null) @@ -840,13 +840,13 @@ #============================================================================== # cleanup directories from any previous failed run: -rm -rf /dev/shm/qemu-???????-git-dir -rm -rf /dev/shm/qemu-???????-cmp-dir -rm -rf /dev/shm/qemu-???????-bun-dir +rm -rf ${TMPDIR}/qemu-???????-git-dir +rm -rf ${TMPDIR}/qemu-???????-cmp-dir +rm -rf ${TMPDIR}/qemu-???????-bun-dir # Temporary directories used in this script -GIT_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-git-dir) -CMP_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-cmp-dir) -BUN_DIR=$(mktemp -d /dev/shm/qemu-XXXXXXX-bun-dir) +GIT_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-git-dir) +CMP_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-cmp-dir) +BUN_DIR=$(mktemp -d ${TMPDIR}/qemu-XXXXXXX-bun-dir) if [[ ! -e $(readlink -f ${LOCAL_REPO_MAP[0]}) ]]; then echo "No local repo found at ${LOCAL_REPO_MAP[0]}" ++++++ usb-Help-compiler-out-to-avoid-a-warning.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.699804021 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.699804021 +0200 @@ -2,6 +2,8 @@ Date: Thu, 3 Dec 2020 16:48:13 -0700 Subject: usb: Help compiler out to avoid a warning on x86 compilation +Git-commit: 0000000000000000000000000000000000000000 + Include-If: %ifarch %arm %ix86 ppc There is an assert present which already should give the compiler @@ -18,10 +20,10 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index e01700039b13d1404d3dc66eb3d3..395f0923f7633c03f2359d503fbd 100644 +index 0cd0a5e540272a4183176ce8426d..2af21f0af68da3cd9d10f0e41f84 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3310,7 +3310,7 @@ static void usb_xhci_init(XHCIState *xhci) +@@ -3314,7 +3314,7 @@ static void usb_xhci_init(XHCIState *xhci) USB_SPEED_MASK_FULL | USB_SPEED_MASK_HIGH; assert(i < XHCI_MAXPORTS); @@ -30,7 +32,7 @@ speedmask |= port->speedmask; } if (i < xhci->numports_3) { -@@ -3324,7 +3324,7 @@ static void usb_xhci_init(XHCIState *xhci) +@@ -3328,7 +3328,7 @@ static void usb_xhci_init(XHCIState *xhci) port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); ++++++ xen-ignore-live-parameter-from-xen-save-.patch ++++++ --- /var/tmp/diff_new_pack.bc4Z91/_old 2022-07-26 19:43:33.711802167 +0200 +++ /var/tmp/diff_new_pack.bc4Z91/_new 2022-07-26 19:43:33.711802167 +0200 @@ -27,10 +27,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c -index d59e976d50e7c81c20bbf5b930d1..7f7cedddb36dcc536fc242349882 100644 +index 02ed94c180661c99970aebfe16a0..52251cf0afd48f919ad705544bf2 100644 --- a/migration/savevm.c +++ b/migration/savevm.c -@@ -2942,7 +2942,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, +@@ -2966,7 +2966,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, * So call bdrv_inactivate_all (release locks) here to let the other * side of the migration take control of the images. */