From 42aeb20e68ac4a95252f498d030df7773ed762c0a363e464f1aacf9ee1ba246a Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 29 Apr 2020 00:12:31 +0000 Subject: [PATCH] Accepting request 798748 from Virtualization:Staging Update to v5.0.0 OBS-URL: https://build.opensuse.org/request/show/798748 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=547 --- ...itionalize-ui-bitmap-installation-be.patch | 6 +- ...double-free-issue-in-qemu_set_log_fi.patch | 33 - ...-char-muxer-more-robust-wrt-small-FI.patch | 8 +- ...-installed-scripts-explicitly-python.patch | 8 +- PPC-KVM-Disable-mmu-notifier-check.patch | 4 +- README.PACKAGING | 4 +- ...e-soft-address-space-limit-to-hard-l.patch | 18 +- ...rt-qemu-options.hx-Update-for-reboot.patch | 35 - ...rt-vnc-allow-fall-back-to-RAW-encodi.patch | 69 -- ...ch-order-of-libraries-for-mpath-supp.patch | 8 +- Sync-pv.patch | 27 +- XXX-dont-dump-core-on-sigabort.patch | 6 +- acpi_piix4-Fix-migration-from-SLE11-SP2.patch | 4 +- ...wait-delegate-polling-of-main-AioCon.patch | 116 ---- ...arm-powerctl-set-NSACR.-CP11-CP10-bi.patch | 42 -- async-use-explicit-memory-barriers.patch | 168 ----- ...vga-Fix-checks-in-ati_2d_blt-to-avoi.patch | 94 --- audio-oss-fix-buffer-pos-calculation.patch | 32 - backup-top-Begin-drain-earlier.patch | 40 -- ...ebug-Allow-taking-unsharing-permissi.patch | 201 ------ ...k-Activate-recursively-even-for-alre.patch | 102 --- block-Add-bdrv_qapi_perm_to_blk_perm.patch | 79 --- ...k-Avoid-memleak-on-qcow2-image-info-.patch | 33 - ...k-Fix-VM-size-field-width-in-snapsho.patch | 50 -- ...k-backup-fix-memory-leak-in-bdrv_bac.patch | 47 -- block-backup-top-fix-failure-path.patch | 91 --- ...k-bdrv_set_backing_bs-fix-use-after-.patch | 114 ---- ...k-block-copy-fix-progress-calculatio.patch | 195 ------ ...k-fix-crash-on-zero-length-unaligned.patch | 101 --- ...k-fix-memleaks-in-bdrv_refresh_filen.patch | 60 -- block-io-fix-bdrv_co_do_copy_on_readv.patch | 38 -- ...k-nbd-extract-the-common-cleanup-cod.patch | 72 -- block-nbd-fix-memory-leak-in-nbd_open.patch | 70 -- ...k-qcow2-threads-fix-qcow2_decompress.patch | 73 --- bundles.tar.xz | 4 +- ...at-disable-edid-on-correct-virtio-gp.patch | 41 -- config.sh | 11 +- configure-only-populate-roms-if-softmmu.patch | 4 +- ...igure-remove-pkgversion-from-CONFIG_.patch | 6 +- display-bochs-display-fix-memory-leak.patch | 34 - ...-add-SUSE-support-statements-to-html.patch | 27 + gcc10-maybe-uninitialized.patch | 2 +- ...-acpi-Build-Memory-Proximity-Domain-.patch | 258 -------- ...-acpi-Build-Memory-Side-Cache-Inform.patch | 122 ---- ...-acpi-Build-System-Locality-Latency-.patch | 159 ----- hmp-vnc-Fix-info-vnc-list-leak.patch | 46 -- ...rm-cubieboard-use-ARM-Cortex-A8-as-t.patch | 51 -- ...rm-smmuv3-Align-stream-table-base-ad.patch | 75 --- ...rm-smmuv3-Apply-address-mask-to-line.patch | 50 -- ...rm-smmuv3-Check-stream-IDs-against-a.patch | 55 -- ...rm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch | 44 -- ...rm-smmuv3-Report-F_STE_FETCH-fault-a.patch | 47 -- ...rm-smmuv3-Use-correct-bit-positions-.patch | 49 -- ...386-disable-smbus-migration-for-xenf.patch | 43 -- ...386-pc-fix-regression-in-parsing-vga.patch | 52 -- ...ntc-arm_gicv3_kvm-Stop-wrongly-progr.patch | 58 -- ...ntc-exynos4210_gic-provide-more-room.patch | 4 +- ...mbios-handle-both-file-formats-regar.patch | 10 +- hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch | 2 +- hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch | 4 +- i386-Add-MSR-feature-bit-for-MDS-NO.patch | 32 - i386-Add-macro-for-stibp.patch | 35 - i386-Add-new-CPU-model-Cooperlake.patch | 94 --- ...-Resolve-CPU-models-to-v1-by-default.patch | 83 --- increase-x86_64-physical-bits-to-42.patch | 4 +- ...l_iommu-a-fix-to-vtd_find_as_from_bu.patch | 38 -- iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch | 34 - ...sts-Fix-nonportable-use-of-od-endian.patch | 61 -- ...sts-Provide-a-function-for-checking-.patch | 82 --- ...sts-Skip-test-060-if-it-is-not-possi.patch | 33 - ...sts-Skip-test-079-if-it-is-not-possi.patch | 34 - ...sts-add-test-for-backup-top-failure-.patch | 140 ---- ...i-Cap-block-count-from-GET-LBA-STATU.patch | 61 -- ...refactor-progress-to-separate-object.patch | 223 ------- linux-user-Fake-proc-cpuinfo.patch | 6 +- ...x-user-add-binfmt-wrapper-for-argv-0.patch | 21 +- ...x-user-lseek-explicitly-cast-non-set.patch | 4 +- ...x-user-properly-test-for-infinite-ti.patch | 4 +- linux-user-use-target_ulong.patch | 14 +- ...-Fix-regression-causing-Single-Step-.patch | 100 --- migration-Rate-limit-inside-host-pages.patch | 149 ----- ...ation-colo-fix-use-after-free-of-loc.patch | 31 - ...ation-ram-fix-use-after-free-of-loca.patch | 31 - ...ation-test-ppc64-fix-FORTH-test-prog.patch | 55 -- ...tulip-check-frame-size-and-r-w-data-.patch | 144 ---- ...-Extend-CLI-to-provide-initiator-inf.patch | 303 --------- ...-Extend-CLI-to-provide-memory-latenc.patch | 530 --------------- ...-Extend-CLI-to-provide-memory-side-c.patch | 311 --------- ...-properly-check-if-numa-is-supported.patch | 67 -- ...ios-s390x-Save-iplb-location-in-lowc.patch | 133 ---- ...ppc405_boards-Remove-unnecessary-NUL.patch | 55 -- ...2-List-autoclear-bit-names-in-header.patch | 200 ------ ...2-bitmaps-fix-qcow2_can_store_new_di.patch | 96 --- qemu-4.2.0.tar.xz | 3 - qemu-4.2.0.tar.xz.sig | Bin 310 -> 0 bytes qemu-5.0.0.tar.xz | 3 + qemu-5.0.0.tar.xz.sig | Bin 0 -> 310 bytes ...-bridge-helper-reduce-security-profi.patch | 2 +- qemu-cvs-gettimeofday.patch | 10 +- qemu-cvs-ioctl_debug.patch | 16 +- qemu-cvs-ioctl_nodirection.patch | 6 +- qemu.changes | 159 +++++ qemu.spec | 613 +++++++----------- qemu.spec.in | 246 ++++--- ...-Makefile-enable-cross-compile-for-b.patch | 4 +- ...-Makefile-pass-a-packaging-timestamp.patch | 8 +- ...-change-cross-compiler-naming-to-be-.patch | 8 +- ...tate-ignore-finishmigrate-prelaunch-.patch | 61 -- ...-sclp-improve-special-wait-psw-logic.patch | 35 - s390x-Add-SIDA-memory-ops.patch | 10 +- s390x-Add-missing-vcpu-reset-functions.patch | 159 ----- ...x-Add-unpack-facility-feature-to-GA1.patch | 4 +- s390x-Beautify-diag308-handling.patch | 113 ---- ...x-Don-t-do-a-normal-reset-on-the-ini.patch | 35 - s390x-Move-clear-reset.patch | 129 ---- s390x-Move-initial-reset.patch | 142 ---- ...x-Move-reset-normal-to-shared-reset-.patch | 128 ---- s390x-adapter-routes-error-handling.patch | 76 --- ...x-ipl-Consolidate-iplb-validity-chec.patch | 64 -- ...x-kvm-Make-kvm_sclp_service_call-voi.patch | 66 -- s390x-protvirt-Add-migration-blocker.patch | 6 +- ...x-protvirt-Disable-address-checks-fo.patch | 2 +- ...x-protvirt-Handle-SIGP-store-status-.patch | 4 +- ...x-protvirt-Inhibit-balloon-when-swit.patch | 10 +- s390x-protvirt-KVM-intercept-changes.patch | 4 +- ...x-protvirt-Move-IO-control-structure.patch | 2 +- ...x-protvirt-Move-STSI-data-over-SIDAD.patch | 8 +- s390x-protvirt-SCLP-interpretation.patch | 12 +- s390x-protvirt-Set-guest-IPL-PSW.patch | 31 +- s390x-protvirt-Support-unpack-facility.patch | 25 +- ...x-s390-virtio-ccw-Fix-build-on-syste.patch | 8 +- ...-qemu-pr-helper-Fix-out-of-bounds-ac.patch | 93 --- ...pdog-Consistently-set-bdrv_has_zero_.patch | 46 -- ...p-use-correct-size-while-emulating-I.patch | 58 -- ...p-use-correct-size-while-emulating-c.patch | 53 -- ...r-Fix-failure-path-for-attempting-to.patch | 33 - supported.arm.txt | 95 ++- supported.ppc.txt | 2 +- supported.s390.txt | 111 ++-- supported.x86.txt | 104 +-- target-arm-Correct-definition-of-PMCRDP.patch | 39 -- target-arm-Fix-PAuth-sbox-functions.patch | 48 -- ...et-arm-Return-correct-IL-bit-in-merg.patch | 40 -- ...et-arm-Set-ISSIs16Bit-in-make_issinf.patch | 36 - ...et-arm-fix-TCG-leak-for-fcvt-half-do.patch | 46 -- ...et-arm-monitor-query-cpu-model-expan.patch | 59 -- ...et-i386-Add-missed-features-to-Coope.patch | 88 --- ...et-i386-Add-new-bit-definitions-of-M.patch | 44 -- ...et-i386-do-not-set-unsupported-VMX-s.patch | 100 --- ...et-i386-kvm-initialize-feature-MSRs-.patch | 163 ----- target-ppc-Fix-rlwinm-on-ppc64.patch | 59 -- ...et-xtensa-fix-pasto-in-pfwait.r-opco.patch | 28 - tcg-i386-Fix-INDEX_op_dup2_vec.patch | 37 -- tcg-mips-mips-sync-encode-error.patch | 49 -- tcp_emu-Fix-oob-access.patch | 40 -- tcp_emu-fix-unsafe-snprintf-usages.patch | 134 ---- tests-Disable-some-block-tests-for-now.patch | 8 +- ...s-Fix-block-tests-to-be-compatible-w.patch | 6 +- tests-numa-Add-case-for-QMP-build-HMAT.patch | 252 ------- tpm-ppi-page-align-PPI-RAM.patch | 41 -- update_git.sh | 56 +- util-add-slirp_fmt-helpers.patch | 125 ---- ...Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch | 61 -- ...t-correctly-turn-on-VIRTIO_F_IOMMU_P.patch | 56 -- ...t-user-blk-delete-virtioqueues-in-un.patch | 66 -- vhost-user-gpu-Drop-trailing-json-comma.patch | 36 - ...t-user-gpu-Release-memory-returned-b.patch | 58 -- ...io-add-ability-to-delete-vq-through-.patch | 62 -- ...io-blk-fix-out-of-bounds-access-to-b.patch | 36 - ...io-crypto-do-delete-ctrl_vq-in-virti.patch | 52 -- ...io-don-t-enable-notifications-during.patch | 145 ----- ...io-mmio-update-queue-size-on-guest-w.patch | 34 - ...io-net-delete-also-control-queue-whe.patch | 35 - ...io-pmem-do-delete-rq_vq-in-virtio_pm.patch | 37 -- virtio-update-queue-size-on-guest-write.patch | 34 - ...prioritize-ZRLE-compression-over-ZLI.patch | 59 -- ...Don-t-round-up-already-aligned-BAT-s.patch | 47 -- ...add-block-resize-support-for-xen-dis.patch | 4 +- ...block-Fix-double-qlist-remove-and-re.patch | 155 ----- ...ignore-live-parameter-from-xen-save-.patch | 4 +- ...disk-Add-suse-specific-flush-disable.patch | 6 +- 181 files changed, 1023 insertions(+), 10783 deletions(-) delete mode 100644 Fix-double-free-issue-in-qemu_set_log_fi.patch delete mode 100644 Revert-qemu-options.hx-Update-for-reboot.patch delete mode 100644 Revert-vnc-allow-fall-back-to-RAW-encodi.patch delete mode 100644 aio-wait-delegate-polling-of-main-AioCon.patch delete mode 100644 arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch delete mode 100644 async-use-explicit-memory-barriers.patch delete mode 100644 ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch delete mode 100644 audio-oss-fix-buffer-pos-calculation.patch delete mode 100644 backup-top-Begin-drain-earlier.patch delete mode 100644 blkdebug-Allow-taking-unsharing-permissi.patch delete mode 100644 block-Activate-recursively-even-for-alre.patch delete mode 100644 block-Add-bdrv_qapi_perm_to_blk_perm.patch delete mode 100644 block-Avoid-memleak-on-qcow2-image-info-.patch delete mode 100644 block-Fix-VM-size-field-width-in-snapsho.patch delete mode 100644 block-backup-fix-memory-leak-in-bdrv_bac.patch delete mode 100644 block-backup-top-fix-failure-path.patch delete mode 100644 block-bdrv_set_backing_bs-fix-use-after-.patch delete mode 100644 block-block-copy-fix-progress-calculatio.patch delete mode 100644 block-fix-crash-on-zero-length-unaligned.patch delete mode 100644 block-fix-memleaks-in-bdrv_refresh_filen.patch delete mode 100644 block-io-fix-bdrv_co_do_copy_on_readv.patch delete mode 100644 block-nbd-extract-the-common-cleanup-cod.patch delete mode 100644 block-nbd-fix-memory-leak-in-nbd_open.patch delete mode 100644 block-qcow2-threads-fix-qcow2_decompress.patch delete mode 100644 compat-disable-edid-on-correct-virtio-gp.patch delete mode 100644 display-bochs-display-fix-memory-leak.patch create mode 100644 docs-add-SUSE-support-statements-to-html.patch delete mode 100644 hmat-acpi-Build-Memory-Proximity-Domain-.patch delete mode 100644 hmat-acpi-Build-Memory-Side-Cache-Inform.patch delete mode 100644 hmat-acpi-Build-System-Locality-Latency-.patch delete mode 100644 hmp-vnc-Fix-info-vnc-list-leak.patch delete mode 100644 hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch delete mode 100644 hw-arm-smmuv3-Align-stream-table-base-ad.patch delete mode 100644 hw-arm-smmuv3-Apply-address-mask-to-line.patch delete mode 100644 hw-arm-smmuv3-Check-stream-IDs-against-a.patch delete mode 100644 hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch delete mode 100644 hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch delete mode 100644 hw-arm-smmuv3-Use-correct-bit-positions-.patch delete mode 100644 hw-i386-disable-smbus-migration-for-xenf.patch delete mode 100644 hw-i386-pc-fix-regression-in-parsing-vga.patch delete mode 100644 hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch delete mode 100644 i386-Add-MSR-feature-bit-for-MDS-NO.patch delete mode 100644 i386-Add-macro-for-stibp.patch delete mode 100644 i386-Add-new-CPU-model-Cooperlake.patch delete mode 100644 i386-Resolve-CPU-models-to-v1-by-default.patch delete mode 100644 intel_iommu-a-fix-to-vtd_find_as_from_bu.patch delete mode 100644 iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch delete mode 100644 iotests-Fix-nonportable-use-of-od-endian.patch delete mode 100644 iotests-Provide-a-function-for-checking-.patch delete mode 100644 iotests-Skip-test-060-if-it-is-not-possi.patch delete mode 100644 iotests-Skip-test-079-if-it-is-not-possi.patch delete mode 100644 iotests-add-test-for-backup-top-failure-.patch delete mode 100644 iscsi-Cap-block-count-from-GET-LBA-STATU.patch delete mode 100644 job-refactor-progress-to-separate-object.patch delete mode 100644 m68k-Fix-regression-causing-Single-Step-.patch delete mode 100644 migration-Rate-limit-inside-host-pages.patch delete mode 100644 migration-colo-fix-use-after-free-of-loc.patch delete mode 100644 migration-ram-fix-use-after-free-of-loca.patch delete mode 100644 migration-test-ppc64-fix-FORTH-test-prog.patch delete mode 100644 net-tulip-check-frame-size-and-r-w-data-.patch delete mode 100644 numa-Extend-CLI-to-provide-initiator-inf.patch delete mode 100644 numa-Extend-CLI-to-provide-memory-latenc.patch delete mode 100644 numa-Extend-CLI-to-provide-memory-side-c.patch delete mode 100644 numa-properly-check-if-numa-is-supported.patch delete mode 100644 pc-bios-s390x-Save-iplb-location-in-lowc.patch delete mode 100644 ppc-ppc405_boards-Remove-unnecessary-NUL.patch delete mode 100644 qcow2-List-autoclear-bit-names-in-header.patch delete mode 100644 qcow2-bitmaps-fix-qcow2_can_store_new_di.patch delete mode 100644 qemu-4.2.0.tar.xz delete mode 100644 qemu-4.2.0.tar.xz.sig create mode 100644 qemu-5.0.0.tar.xz create mode 100644 qemu-5.0.0.tar.xz.sig delete mode 100644 runstate-ignore-finishmigrate-prelaunch-.patch delete mode 100644 s390-sclp-improve-special-wait-psw-logic.patch delete mode 100644 s390x-Add-missing-vcpu-reset-functions.patch delete mode 100644 s390x-Beautify-diag308-handling.patch delete mode 100644 s390x-Don-t-do-a-normal-reset-on-the-ini.patch delete mode 100644 s390x-Move-clear-reset.patch delete mode 100644 s390x-Move-initial-reset.patch delete mode 100644 s390x-Move-reset-normal-to-shared-reset-.patch delete mode 100644 s390x-adapter-routes-error-handling.patch delete mode 100644 s390x-ipl-Consolidate-iplb-validity-chec.patch delete mode 100644 s390x-kvm-Make-kvm_sclp_service_call-voi.patch delete mode 100644 scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch delete mode 100644 sheepdog-Consistently-set-bdrv_has_zero_.patch delete mode 100644 slirp-use-correct-size-while-emulating-I.patch delete mode 100644 slirp-use-correct-size-while-emulating-c.patch delete mode 100644 spapr-Fix-failure-path-for-attempting-to.patch delete mode 100644 target-arm-Correct-definition-of-PMCRDP.patch delete mode 100644 target-arm-Fix-PAuth-sbox-functions.patch delete mode 100644 target-arm-Return-correct-IL-bit-in-merg.patch delete mode 100644 target-arm-Set-ISSIs16Bit-in-make_issinf.patch delete mode 100644 target-arm-fix-TCG-leak-for-fcvt-half-do.patch delete mode 100644 target-arm-monitor-query-cpu-model-expan.patch delete mode 100644 target-i386-Add-missed-features-to-Coope.patch delete mode 100644 target-i386-Add-new-bit-definitions-of-M.patch delete mode 100644 target-i386-do-not-set-unsupported-VMX-s.patch delete mode 100644 target-i386-kvm-initialize-feature-MSRs-.patch delete mode 100644 target-ppc-Fix-rlwinm-on-ppc64.patch delete mode 100644 target-xtensa-fix-pasto-in-pfwait.r-opco.patch delete mode 100644 tcg-i386-Fix-INDEX_op_dup2_vec.patch delete mode 100644 tcg-mips-mips-sync-encode-error.patch delete mode 100644 tcp_emu-Fix-oob-access.patch delete mode 100644 tcp_emu-fix-unsafe-snprintf-usages.patch delete mode 100644 tests-numa-Add-case-for-QMP-build-HMAT.patch delete mode 100644 tpm-ppi-page-align-PPI-RAM.patch delete mode 100644 util-add-slirp_fmt-helpers.patch delete mode 100644 vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch delete mode 100644 vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch delete mode 100644 vhost-user-blk-delete-virtioqueues-in-un.patch delete mode 100644 vhost-user-gpu-Drop-trailing-json-comma.patch delete mode 100644 vhost-user-gpu-Release-memory-returned-b.patch delete mode 100644 virtio-add-ability-to-delete-vq-through-.patch delete mode 100644 virtio-blk-fix-out-of-bounds-access-to-b.patch delete mode 100644 virtio-crypto-do-delete-ctrl_vq-in-virti.patch delete mode 100644 virtio-don-t-enable-notifications-during.patch delete mode 100644 virtio-mmio-update-queue-size-on-guest-w.patch delete mode 100644 virtio-net-delete-also-control-queue-whe.patch delete mode 100644 virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch delete mode 100644 virtio-update-queue-size-on-guest-write.patch delete mode 100644 vnc-prioritize-ZRLE-compression-over-ZLI.patch delete mode 100644 vpc-Don-t-round-up-already-aligned-BAT-s.patch delete mode 100644 xen-block-Fix-double-qlist-remove-and-re.patch diff --git a/Conditionalize-ui-bitmap-installation-be.patch b/Conditionalize-ui-bitmap-installation-be.patch index 1dbcbc9..e9671c7 100644 --- a/Conditionalize-ui-bitmap-installation-be.patch +++ b/Conditionalize-ui-bitmap-installation-be.patch @@ -8,10 +8,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile -index 52881cbb12e7d980e0ed51f21174..edc3de72e6a94ef0503da640bbfe 100644 +index 1a2f649a21a85e1849a3ca40991d..a7851435c0ba8c60df39ebad492b 100644 --- a/Makefile +++ b/Makefile -@@ -913,6 +913,7 @@ ifneq ($(DESCS),) +@@ -974,6 +974,7 @@ ifneq ($(DESCS),) "$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \ done endif @@ -19,7 +19,7 @@ index 52881cbb12e7d980e0ed51f21174..edc3de72e6a94ef0503da640bbfe 100644 for s in $(ICON_SIZES); do \ mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \ $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \ -@@ -927,6 +928,7 @@ endif +@@ -988,6 +989,7 @@ endif mkdir -p "$(DESTDIR)$(qemu_desktopdir)" $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" diff --git a/Fix-double-free-issue-in-qemu_set_log_fi.patch b/Fix-double-free-issue-in-qemu_set_log_fi.patch deleted file mode 100644 index c2367f9..0000000 --- a/Fix-double-free-issue-in-qemu_set_log_fi.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Robert Foley -Date: Mon, 18 Nov 2019 16:15:23 -0500 -Subject: Fix double free issue in qemu_set_log_filename(). -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 0f516ca4767042aec8716369d6d62436fa10593a - -After freeing the logfilename, we set logfilename to NULL, in case of an -error which returns without setting logfilename. - -Signed-off-by: Robert Foley -Reviewed-by: Alex Bennée -Signed-off-by: Alex Bennée -Message-Id: <20191118211528.3221-2-robert.foley@linaro.org> -Signed-off-by: Bruce Rogers ---- - util/log.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/util/log.c b/util/log.c -index 1ca13059eef5441dce01769e046d..4316fe74eee8ba96fd2d3c9afd3b 100644 ---- a/util/log.c -+++ b/util/log.c -@@ -113,6 +113,7 @@ void qemu_set_log_filename(const char *filename, Error **errp) - { - char *pidstr; - g_free(logfilename); -+ logfilename = NULL; - - pidstr = strstr(filename, "%"); - if (pidstr) { diff --git a/Make-char-muxer-more-robust-wrt-small-FI.patch b/Make-char-muxer-more-robust-wrt-small-FI.patch index 0ef1eac..2136a30 100644 --- a/Make-char-muxer-more-robust-wrt-small-FI.patch +++ b/Make-char-muxer-more-robust-wrt-small-FI.patch @@ -41,7 +41,7 @@ index f3530a90e6364d813097105b6113..f8aa0daf31692810efc7d5ca32eb 100644 #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/chardev/char-mux.c b/chardev/char-mux.c -index 200c62a0d08bd779de8efdc95aad..10acb4fce1d3bda0d9f818eeb5ee 100644 +index 46c44af67c4ea5348eb1b6db637f..1d3eaf1e37bc2995ae4b8e80f0ff 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -22,6 +22,7 @@ @@ -82,7 +82,7 @@ index 200c62a0d08bd779de8efdc95aad..10acb4fce1d3bda0d9f818eeb5ee 100644 * set of muxes */ diff --git a/chardev/char.c b/chardev/char.c -index 7b6b2cb12300042c6adf257e188c..d2134d72f60e58f35ee9e7869db4 100644 +index e77564060dbc8d60e964787b9150..7f08483a4fc8b1c2c01d57546eca 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -22,6 +22,7 @@ @@ -94,7 +94,7 @@ index 7b6b2cb12300042c6adf257e188c..d2134d72f60e58f35ee9e7869db4 100644 #include "qemu/cutils.h" #include "monitor/monitor.h" diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h -index 572cefd517c8fa9d605cbd10fc21..6e80785bd9c12b85e747fa9f924e 100644 +index 417fe32eedf29b206c4c7a20f8ef..225a4d1c37d051bca576a1b73607 100644 --- a/include/chardev/char-mux.h +++ b/include/chardev/char-mux.h @@ -34,6 +34,9 @@ typedef struct MuxChardev { @@ -108,7 +108,7 @@ index 572cefd517c8fa9d605cbd10fc21..6e80785bd9c12b85e747fa9f924e 100644 int mux_cnt; int term_got_escape; diff --git a/tests/test-char.c b/tests/test-char.c -index 45e42af290d4c55c0d8ed9358ef2..8e8c983dc0adce3dea739c9d85fc 100644 +index 3afc9b1b8d59802919139012c2cb..530cf7c2414e85e00e2685e7482c 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1,3 +1,4 @@ diff --git a/Make-installed-scripts-explicitly-python.patch b/Make-installed-scripts-explicitly-python.patch index 215e10c..743665b 100644 --- a/Make-installed-scripts-explicitly-python.patch +++ b/Make-installed-scripts-explicitly-python.patch @@ -13,21 +13,21 @@ Signed-off-by: Bruce Rogers 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py -index e527eb168e9ce7c3944094ec6701..fd376eac71f73e6366a9e17a1c51 100755 +index 96a31d3974ba2af13d419b71c409..4cae695244a00003d1431c02febf 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -1,4 +1,4 @@ --#!/usr/bin/env python +-#!/usr/bin/env python3 +#!/usr/bin/python3 # # Migration Stream Analyzer # diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py -index f8b7b8f77252f2c03d6d7db9dc60..754159069dfae6838edaac14856f 100755 +index 539ead62b498202fc40b42bff05f..0b7d30eef392cd659dbd722d8bdc 100755 --- a/scripts/vmstate-static-checker.py +++ b/scripts/vmstate-static-checker.py @@ -1,4 +1,4 @@ --#!/usr/bin/python +-#!/usr/bin/env python3 +#!/usr/bin/python3 # # Compares vmstate information stored in JSON format, obtained from diff --git a/PPC-KVM-Disable-mmu-notifier-check.patch b/PPC-KVM-Disable-mmu-notifier-check.patch index 308ed04..53a5ab1 100644 --- a/PPC-KVM-Disable-mmu-notifier-check.patch +++ b/PPC-KVM-Disable-mmu-notifier-check.patch @@ -14,10 +14,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+) diff --git a/exec.c b/exec.c -index ffdb5185353bdbacc613d4730228..0d0c0618bb70f9747c71048f5cde 100644 +index 2874bb508853d353bca3b9790e5d..76ac1f619b563c591f36f9601c15 100644 --- a/exec.c +++ b/exec.c -@@ -2291,11 +2291,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, +@@ -2297,11 +2297,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, return NULL; } diff --git a/README.PACKAGING b/README.PACKAGING index 1933e02..95c1f54 100644 --- a/README.PACKAGING +++ b/README.PACKAGING @@ -16,7 +16,7 @@ queue available in a local git branch named frombundle (see config.sh for the locations). This set of patches comes from a "bundle of git bundles", the bundles.tar.xz file, which is included as a package source file. You will then create an altered patch queue in the branch which corresponds to this release -(eg: opensuse-4.2), using the frombundle branch as the starting point for your +(eg: opensuse-5.0), using the frombundle branch as the starting point for your changes (eg perhaps start by doing git reset --hard frombundle, then cherry-pick upstream patches from there). Once you have the patch queue ready to go run 'bash ./update_git.sh git2pkg' which updates the bundles.tar.xz file, as well as @@ -47,7 +47,7 @@ in the near future. Bug or feature tracking identifiers should also be added to the patch similarly, using the abbreviations identified here: http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations -using the "References:" tag, with multiple entries comma separated. +using the "Reference:" tag, with multiple entries comma separated. The ability to provide a conditional inclusion of a patch (eg based on architecture, is provided by using the "Include-If:" tag similarly, as follows: diff --git a/Raise-soft-address-space-limit-to-hard-l.patch b/Raise-soft-address-space-limit-to-hard-l.patch index b77f9e4..595043d 100644 --- a/Raise-soft-address-space-limit-to-hard-l.patch +++ b/Raise-soft-address-space-limit-to-hard-l.patch @@ -12,14 +12,14 @@ Signed-off-by: Andreas Färber [BR: add include for sys/resource.h] Signed-off-by: Bruce Rogers --- - vl.c | 12 ++++++++++++ + softmmu/vl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -diff --git a/vl.c b/vl.c -index bf0a6345d2394ad25adfe53c4006..68de8184f91c6ef3903859c70526 100644 ---- a/vl.c -+++ b/vl.c -@@ -33,6 +33,7 @@ +diff --git a/softmmu/vl.c b/softmmu/vl.c +index 32c004788919e4f50b4bfc88113b..97e3888e832f0c9051f720bb701c 100644 +--- a/softmmu/vl.c ++++ b/softmmu/vl.c +@@ -34,6 +34,7 @@ #include "qemu/uuid.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" @@ -27,15 +27,15 @@ index bf0a6345d2394ad25adfe53c4006..68de8184f91c6ef3903859c70526 100644 #include "sysemu/seccomp.h" #include "sysemu/tcg.h" -@@ -2863,6 +2864,7 @@ int main(int argc, char **argv, char **envp) - char *dir, **dirs; +@@ -2851,6 +2852,7 @@ void qemu_init(int argc, char **argv, char **envp) BlockdevOptionsQueue bdo_queue = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue); QemuPluginList plugin_list = QTAILQ_HEAD_INITIALIZER(plugin_list); + int mem_prealloc = 0; /* force preallocation of physical target memory */ + struct rlimit rlimit_as; os_set_line_buffering(); -@@ -2874,6 +2876,16 @@ int main(int argc, char **argv, char **envp) +@@ -2862,6 +2864,16 @@ void qemu_init(int argc, char **argv, char **envp) qemu_mutex_lock_iothread(); diff --git a/Revert-qemu-options.hx-Update-for-reboot.patch b/Revert-qemu-options.hx-Update-for-reboot.patch deleted file mode 100644 index 80ed78b..0000000 --- a/Revert-qemu-options.hx-Update-for-reboot.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Han Han -Date: Thu, 5 Dec 2019 10:48:21 +0800 -Subject: Revert "qemu-options.hx: Update for reboot-timeout parameter" - -Git-commit: 8937a39da22e5d5689c516a2d4ce4f2bb6a378fc - -This reverts commit bbd9e6985ff342cbe15b9cb7eb30e842796fbbe8. - -In 20a1922032 we allowed reboot-timeout=-1 again, so update the doc -accordingly. - -Signed-off-by: Han Han -Reviewed-by: Markus Armbruster -Message-Id: <20191205024821.245435-1-hhan@redhat.com> -Signed-off-by: Laurent Vivier -Signed-off-by: Bruce Rogers ---- - qemu-options.hx | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/qemu-options.hx b/qemu-options.hx -index 65c9473b7325545c00befcbac651..e14d88e9b2f3a3c13a4c20db0b36 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -327,8 +327,8 @@ format(true color). The resolution should be supported by the SVGA mode, so - the recommended is 320x240, 640x480, 800x640. - - A timeout could be passed to bios, guest will pause for @var{rb_timeout} ms --when boot failed, then reboot. If @option{reboot-timeout} is not set, --guest will not reboot by default. Currently Seabios for X86 -+when boot failed, then reboot. If @var{rb_timeout} is '-1', guest will not -+reboot, qemu passes '-1' to bios by default. Currently Seabios for X86 - system support it. - - Do strict boot via @option{strict=on} as far as firmware/BIOS diff --git a/Revert-vnc-allow-fall-back-to-RAW-encodi.patch b/Revert-vnc-allow-fall-back-to-RAW-encodi.patch deleted file mode 100644 index cf1b4ec..0000000 --- a/Revert-vnc-allow-fall-back-to-RAW-encodi.patch +++ /dev/null @@ -1,69 +0,0 @@ -From: Gerd Hoffmann -Date: Tue, 21 Jan 2020 07:02:10 +0100 -Subject: Revert "vnc: allow fall back to RAW encoding" - -Git-commit: 0780ec7be82dd4781e9fd216b5d99a125882ff5a - -This reverts commit de3f7de7f4e257ce44cdabb90f5f17ee99624557. - -Remove VNC optimization to reencode framebuffer update as raw if it's -smaller than the default encoding. - -QEMU's implementation was naive and didn't account for the ZLIB z_stream -mutating with each compression. Because of the mutation, simply -resetting the output buffer's offset wasn't sufficient to "rewind" the -operation. The mutated z_stream would generate future zlib blocks which -referred to symbols in past blocks which weren't sent. This would lead -to artifacting. - -Considering that ZRLE is never larger than raw and even though ZLIB can -occasionally be fractionally larger than raw, the overhead of -implementing this optimization correctly isn't worth it. - -Signed-off-by: Cameron Esfahani -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - ui/vnc.c | 20 ++------------------ - 1 file changed, 2 insertions(+), 18 deletions(-) - -diff --git a/ui/vnc.c b/ui/vnc.c -index 87b8045afec2b7d52983914dbc08..f94b3a257ee3add364a0b0bd5101 100644 ---- a/ui/vnc.c -+++ b/ui/vnc.c -@@ -898,8 +898,6 @@ int vnc_raw_send_framebuffer_update(VncState *vs, int x, int y, int w, int h) - int vnc_send_framebuffer_update(VncState *vs, int x, int y, int w, int h) - { - int n = 0; -- bool encode_raw = false; -- size_t saved_offs = vs->output.offset; - - switch(vs->vnc_encoding) { - case VNC_ENCODING_ZLIB: -@@ -922,24 +920,10 @@ int vnc_send_framebuffer_update(VncState *vs, int x, int y, int w, int h) - n = vnc_zywrle_send_framebuffer_update(vs, x, y, w, h); - break; - default: -- encode_raw = true; -+ vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_RAW); -+ n = vnc_raw_send_framebuffer_update(vs, x, y, w, h); - break; - } -- -- /* If the client has the same pixel format as our internal buffer and -- * a RAW encoding would need less space fall back to RAW encoding to -- * save bandwidth and processing power in the client. */ -- if (!encode_raw && vs->write_pixels == vnc_write_pixels_copy && -- 12 + h * w * VNC_SERVER_FB_BYTES <= (vs->output.offset - saved_offs)) { -- vs->output.offset = saved_offs; -- encode_raw = true; -- } -- -- if (encode_raw) { -- vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_RAW); -- n = vnc_raw_send_framebuffer_update(vs, x, y, w, h); -- } -- - return n; - } - diff --git a/Switch-order-of-libraries-for-mpath-supp.patch b/Switch-order-of-libraries-for-mpath-supp.patch index e102404..9e61238 100644 --- a/Switch-order-of-libraries-for-mpath-supp.patch +++ b/Switch-order-of-libraries-for-mpath-supp.patch @@ -9,10 +9,10 @@ Signed-off-by: Bruce Rogers 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index b437a346d71a55d75f207f36e85b..52881cbb12e7d980e0ed51f21174 100644 +index 8a9113e6663eb51cf842b2f4f5a2..1a2f649a21a85e1849a3ca40991d 100644 --- a/Makefile +++ b/Makefile -@@ -579,7 +579,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap +@@ -619,7 +619,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) ifdef CONFIG_MPATH @@ -22,10 +22,10 @@ index b437a346d71a55d75f207f36e85b..52881cbb12e7d980e0ed51f21174 100644 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool diff --git a/configure b/configure -index 6099be1d848c7f52ea02694d6d86..09a33aecfd6ef543eeee8c5023b6 100755 +index 23b5e93752b6a2597b2099b50218..ef127fb1e0715da446b4a822e3ab 100755 --- a/configure +++ b/configure -@@ -3836,7 +3836,7 @@ int main(void) { +@@ -3961,7 +3961,7 @@ int main(void) { return 0; } EOF diff --git a/Sync-pv.patch b/Sync-pv.patch index 8704c3d..a9f1934 100644 --- a/Sync-pv.patch +++ b/Sync-pv.patch @@ -8,14 +8,14 @@ Signed-off-by: Janosch Frank (cherry picked from commit 6807f464961cfee1dd81c95e22ddd91fa352fcc4) Signed-off-by: Bruce Rogers --- - linux-headers/linux/kvm.h | 50 +++++++++++++++++++++++++++++++++++++-- - 1 file changed, 48 insertions(+), 2 deletions(-) + linux-headers/linux/kvm.h | 45 +++++++++++++++++++++++++++++++++++++-- + 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h -index 3d9b18f7f871acd0d13a0c42f184..18c636070edaf09dd8cf33ddb400 100644 +index 265099100e65b3e86d9e42e8806e..c30344ab0095e8568e785a237c89 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h -@@ -468,12 +468,17 @@ struct kvm_s390_mem_op { +@@ -474,12 +474,17 @@ struct kvm_s390_mem_op { __u32 size; /* amount of bytes */ __u32 op; /* type of operation */ __u64 buf; /* buffer in userspace */ @@ -35,23 +35,18 @@ index 3d9b18f7f871acd0d13a0c42f184..18c636070edaf09dd8cf33ddb400 100644 /* flags for kvm_s390_mem_op->flags */ #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) -@@ -1000,6 +1005,8 @@ struct kvm_ppc_resize_hpt { - #define KVM_CAP_PMU_EVENT_FILTER 173 - #define KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 174 - #define KVM_CAP_HYPERV_DIRECT_TLBFLUSH 175 -+#define KVM_CAP_S390_VCPU_RESETS 179 +@@ -1010,6 +1015,7 @@ struct kvm_ppc_resize_hpt { + #define KVM_CAP_ARM_NISV_TO_USER 177 + #define KVM_CAP_ARM_INJECT_EXT_DABT 178 + #define KVM_CAP_S390_VCPU_RESETS 179 +#define KVM_CAP_S390_PROTECTED 180 #ifdef KVM_CAP_IRQ_ROUTING -@@ -1461,6 +1468,45 @@ struct kvm_enc_region { - /* Available with KVM_CAP_ARM_SVE */ - #define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int) +@@ -1478,6 +1484,41 @@ struct kvm_enc_region { + #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) + #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) -+/* Available with KVM_CAP_S390_VCPU_RESETS */ -+#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) -+#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) -+ +struct kvm_s390_pv_sec_parm { + __u64 origin; + __u64 length; diff --git a/XXX-dont-dump-core-on-sigabort.patch b/XXX-dont-dump-core-on-sigabort.patch index 2066613..f484745 100644 --- a/XXX-dont-dump-core-on-sigabort.patch +++ b/XXX-dont-dump-core-on-sigabort.patch @@ -8,10 +8,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 6 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c -index 5ca6d62b15d3e4d3faee3f554fff..1d6382ce881795b057ab229e4129 100644 +index 8cf51ffecde659742b7aac6dfaae..08cb813a8a1782ed4b845d716ce2 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c -@@ -581,6 +581,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) +@@ -632,6 +632,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) trace_user_force_sig(env, target_sig, host_sig); gdb_signalled(env, target_sig); @@ -22,7 +22,7 @@ index 5ca6d62b15d3e4d3faee3f554fff..1d6382ce881795b057ab229e4129 100644 /* dump core if supported by target binary format */ if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) { stop_all_tasks(); -@@ -598,6 +602,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) +@@ -649,6 +653,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig) target_sig, strsignal(host_sig), "core dumped" ); } diff --git a/acpi_piix4-Fix-migration-from-SLE11-SP2.patch b/acpi_piix4-Fix-migration-from-SLE11-SP2.patch index f4e361d..f5c6c2d 100644 --- a/acpi_piix4-Fix-migration-from-SLE11-SP2.patch +++ b/acpi_piix4-Fix-migration-from-SLE11-SP2.patch @@ -16,10 +16,10 @@ Signed-off-by: Andreas Färber 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index 93aec2dd2ce1767784076c3544b0..1f2a8ea850e9115b689af90bf708 100644 +index 964d6f5990faf6ff7521bb2377a2..7b5f8234444b8b29ae66098b8d39 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c -@@ -273,7 +273,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) +@@ -274,7 +274,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) static const VMStateDescription vmstate_acpi = { .name = "piix4_pm", .version_id = 3, diff --git a/aio-wait-delegate-polling-of-main-AioCon.patch b/aio-wait-delegate-polling-of-main-AioCon.patch deleted file mode 100644 index c9be72b..0000000 --- a/aio-wait-delegate-polling-of-main-AioCon.patch +++ /dev/null @@ -1,116 +0,0 @@ -From: Paolo Bonzini -Date: Tue, 7 Apr 2020 10:07:45 -0400 -Subject: aio-wait: delegate polling of main AioContext if BQL not held - -Git-commit: 3c18a92dc4b55ca8cc37a755ed119f11c0f34099 - -Any thread that is not a iothread returns NULL for qemu_get_current_aio_context(). -As a result, it would also return true for -in_aio_context_home_thread(qemu_get_aio_context()), causing -AIO_WAIT_WHILE to invoke aio_poll() directly. This is incorrect -if the BQL is not held, because aio_poll() does not expect to -run concurrently from multiple threads, and it can actually -happen when savevm writes to the vmstate file from the -migration thread. - -Therefore, restrict in_aio_context_home_thread to return true -for the main AioContext only if the BQL is held. - -The function is moved to aio-wait.h because it is mostly used -there and to avoid a circular reference between main-loop.h -and block/aio.h. - -Signed-off-by: Paolo Bonzini -Message-Id: <20200407140746.8041-5-pbonzini@redhat.com> -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - include/block/aio-wait.h | 22 ++++++++++++++++++++++ - include/block/aio.h | 29 ++++++++++------------------- - 2 files changed, 32 insertions(+), 19 deletions(-) - -diff --git a/include/block/aio-wait.h b/include/block/aio-wait.h -index afeeb18f95ebb593982b5d3f8917..716d2639df708f03e3f29d68315b 100644 ---- a/include/block/aio-wait.h -+++ b/include/block/aio-wait.h -@@ -26,6 +26,7 @@ - #define QEMU_AIO_WAIT_H - - #include "block/aio.h" -+#include "qemu/main-loop.h" - - /** - * AioWait: -@@ -124,4 +125,25 @@ void aio_wait_kick(void); - */ - void aio_wait_bh_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque); - -+/** -+ * in_aio_context_home_thread: -+ * @ctx: the aio context -+ * -+ * Return whether we are running in the thread that normally runs @ctx. Note -+ * that acquiring/releasing ctx does not affect the outcome, each AioContext -+ * still only has one home thread that is responsible for running it. -+ */ -+static inline bool in_aio_context_home_thread(AioContext *ctx) -+{ -+ if (ctx == qemu_get_current_aio_context()) { -+ return true; -+ } -+ -+ if (ctx == qemu_get_aio_context()) { -+ return qemu_mutex_iothread_locked(); -+ } else { -+ return false; -+ } -+} -+ - #endif /* QEMU_AIO_WAIT_H */ -diff --git a/include/block/aio.h b/include/block/aio.h -index 6b0d52f732b86caef07602281574..9d28e247df7f0d3a556644fcd9d1 100644 ---- a/include/block/aio.h -+++ b/include/block/aio.h -@@ -60,12 +60,16 @@ struct AioContext { - QLIST_HEAD(, AioHandler) aio_handlers; - - /* Used to avoid unnecessary event_notifier_set calls in aio_notify; -- * accessed with atomic primitives. If this field is 0, everything -- * (file descriptors, bottom halves, timers) will be re-evaluated -- * before the next blocking poll(), thus the event_notifier_set call -- * can be skipped. If it is non-zero, you may need to wake up a -- * concurrent aio_poll or the glib main event loop, making -- * event_notifier_set necessary. -+ * only written from the AioContext home thread, or under the BQL in -+ * the case of the main AioContext. However, it is read from any -+ * thread so it is still accessed with atomic primitives. -+ * -+ * If this field is 0, everything (file descriptors, bottom halves, -+ * timers) will be re-evaluated before the next blocking poll() or -+ * io_uring wait; therefore, the event_notifier_set call can be -+ * skipped. If it is non-zero, you may need to wake up a concurrent -+ * aio_poll or the glib main event loop, making event_notifier_set -+ * necessary. - * - * Bit 0 is reserved for GSource usage of the AioContext, and is 1 - * between a call to aio_ctx_prepare and the next call to aio_ctx_check. -@@ -580,19 +584,6 @@ void aio_co_enter(AioContext *ctx, struct Coroutine *co); - */ - AioContext *qemu_get_current_aio_context(void); - --/** -- * in_aio_context_home_thread: -- * @ctx: the aio context -- * -- * Return whether we are running in the thread that normally runs @ctx. Note -- * that acquiring/releasing ctx does not affect the outcome, each AioContext -- * still only has one home thread that is responsible for running it. -- */ --static inline bool in_aio_context_home_thread(AioContext *ctx) --{ -- return ctx == qemu_get_current_aio_context(); --} -- - /** - * aio_context_setup: - * @ctx: the aio context diff --git a/arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch b/arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch deleted file mode 100644 index b691024..0000000 --- a/arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Niek Linnenbank -Date: Mon, 2 Dec 2019 22:09:43 +0100 -Subject: arm/arm-powerctl: set NSACR.{CP11, CP10} bits in arm_set_cpu_on() - -Git-commit: 0c7f8c43daf6556078e51de98aa13f069e505985 - -This change ensures that the FPU can be accessed in Non-Secure mode -when the CPU core is reset using the arm_set_cpu_on() function call. -The NSACR.{CP11,CP10} bits define the exception level required to -access the FPU in Non-Secure mode. Without these bits set, the CPU -will give an undefined exception trap on the first FPU access for the -secondary cores under Linux. - -This is necessary because in this power-control codepath QEMU -is effectively emulating a bit of EL3 firmware, and has to set -the CPU up as the EL3 firmware would. - -Fixes: fc1120a7f5 -Cc: qemu-stable@nongnu.org -Signed-off-by: Niek Linnenbank -[PMM: added clarifying para to commit message] -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/arm-powerctl.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c -index f77a950db67276513977af686aa9..b064513d44a86932bbd70b06b3ca 100644 ---- a/target/arm/arm-powerctl.c -+++ b/target/arm/arm-powerctl.c -@@ -104,6 +104,9 @@ static void arm_set_cpu_on_async_work(CPUState *target_cpu_state, - /* Processor is not in secure mode */ - target_cpu->env.cp15.scr_el3 |= SCR_NS; - -+ /* Set NSACR.{CP11,CP10} so NS can access the FPU */ -+ target_cpu->env.cp15.nsacr |= 3 << 10; -+ - /* - * If QEMU is providing the equivalent of EL3 firmware, then we need - * to make sure a CPU targeting EL2 comes out of reset with a diff --git a/async-use-explicit-memory-barriers.patch b/async-use-explicit-memory-barriers.patch deleted file mode 100644 index 6f6f4eb..0000000 --- a/async-use-explicit-memory-barriers.patch +++ /dev/null @@ -1,168 +0,0 @@ -From: Paolo Bonzini -Date: Tue, 7 Apr 2020 10:07:46 -0400 -Subject: async: use explicit memory barriers - -Git-commit: 5710a3e09f9b85801e5ce70797a4a511e5fc9e2c - -When using C11 atomics, non-seqcst reads and writes do not participate -in the total order of seqcst operations. In util/async.c and util/aio-posix.c, -in particular, the pattern that we use - - write ctx->notify_me write bh->scheduled - read bh->scheduled read ctx->notify_me - if !bh->scheduled, sleep if ctx->notify_me, notify - -needs to use seqcst operations for both the write and the read. In -general this is something that we do not want, because there can be -many sources that are polled in addition to bottom halves. The -alternative is to place a seqcst memory barrier between the write -and the read. This also comes with a disadvantage, in that the -memory barrier is implicit on strongly-ordered architectures and -it wastes a few dozen clock cycles. - -Fortunately, ctx->notify_me is never written concurrently by two -threads, so we can assert that and relax the writes to ctx->notify_me. -The resulting solution works and performs well on both aarch64 and x86. - -Note that the atomic_set/atomic_read combination is not an atomic -read-modify-write, and therefore it is even weaker than C11 ATOMIC_RELAXED; -on x86, ATOMIC_RELAXED compiles to a locked operation. - -Analyzed-by: Ying Fang -Signed-off-by: Paolo Bonzini -Tested-by: Ying Fang -Message-Id: <20200407140746.8041-6-pbonzini@redhat.com> -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - util/aio-posix.c | 16 ++++++++++++++-- - util/aio-win32.c | 17 ++++++++++++++--- - util/async.c | 16 ++++++++++++---- - 3 files changed, 40 insertions(+), 9 deletions(-) - -diff --git a/util/aio-posix.c b/util/aio-posix.c -index a4977f538ef28d56178267a1795c..fe2a46c439fa1505f5f688274566 100644 ---- a/util/aio-posix.c -+++ b/util/aio-posix.c -@@ -616,6 +616,11 @@ bool aio_poll(AioContext *ctx, bool blocking) - int64_t timeout; - int64_t start = 0; - -+ /* -+ * There cannot be two concurrent aio_poll calls for the same AioContext (or -+ * an aio_poll concurrent with a GSource prepare/check/dispatch callback). -+ * We rely on this below to avoid slow locked accesses to ctx->notify_me. -+ */ - assert(in_aio_context_home_thread(ctx)); - - /* aio_notify can avoid the expensive event_notifier_set if -@@ -626,7 +631,13 @@ bool aio_poll(AioContext *ctx, bool blocking) - * so disable the optimization now. - */ - if (blocking) { -- atomic_add(&ctx->notify_me, 2); -+ atomic_set(&ctx->notify_me, atomic_read(&ctx->notify_me) + 2); -+ /* -+ * Write ctx->notify_me before computing the timeout -+ * (reading bottom half flags, etc.). Pairs with -+ * smp_mb in aio_notify(). -+ */ -+ smp_mb(); - } - - qemu_lockcnt_inc(&ctx->list_lock); -@@ -671,7 +682,8 @@ bool aio_poll(AioContext *ctx, bool blocking) - } - - if (blocking) { -- atomic_sub(&ctx->notify_me, 2); -+ /* Finish the poll before clearing the flag. */ -+ atomic_store_release(&ctx->notify_me, atomic_read(&ctx->notify_me) - 2); - aio_notify_accept(ctx); - } - -diff --git a/util/aio-win32.c b/util/aio-win32.c -index a23b9c364db3a764a3e00c6b62e9..729d533faf4d807e0a5388edd2af 100644 ---- a/util/aio-win32.c -+++ b/util/aio-win32.c -@@ -321,6 +321,12 @@ bool aio_poll(AioContext *ctx, bool blocking) - int count; - int timeout; - -+ /* -+ * There cannot be two concurrent aio_poll calls for the same AioContext (or -+ * an aio_poll concurrent with a GSource prepare/check/dispatch callback). -+ * We rely on this below to avoid slow locked accesses to ctx->notify_me. -+ */ -+ assert(in_aio_context_home_thread(ctx)); - progress = false; - - /* aio_notify can avoid the expensive event_notifier_set if -@@ -331,7 +337,13 @@ bool aio_poll(AioContext *ctx, bool blocking) - * so disable the optimization now. - */ - if (blocking) { -- atomic_add(&ctx->notify_me, 2); -+ atomic_set(&ctx->notify_me, atomic_read(&ctx->notify_me) + 2); -+ /* -+ * Write ctx->notify_me before computing the timeout -+ * (reading bottom half flags, etc.). Pairs with -+ * smp_mb in aio_notify(). -+ */ -+ smp_mb(); - } - - qemu_lockcnt_inc(&ctx->list_lock); -@@ -364,8 +376,7 @@ bool aio_poll(AioContext *ctx, bool blocking) - ret = WaitForMultipleObjects(count, events, FALSE, timeout); - if (blocking) { - assert(first); -- assert(in_aio_context_home_thread(ctx)); -- atomic_sub(&ctx->notify_me, 2); -+ atomic_store_release(&ctx->notify_me, atomic_read(&ctx->notify_me) - 2); - aio_notify_accept(ctx); - } - -diff --git a/util/async.c b/util/async.c -index b1fa5319e5bc7830d50108f91139..c65c58bbc9f57bf1bbdb6acd5fd1 100644 ---- a/util/async.c -+++ b/util/async.c -@@ -220,7 +220,14 @@ aio_ctx_prepare(GSource *source, gint *timeout) - { - AioContext *ctx = (AioContext *) source; - -- atomic_or(&ctx->notify_me, 1); -+ atomic_set(&ctx->notify_me, atomic_read(&ctx->notify_me) | 1); -+ -+ /* -+ * Write ctx->notify_me before computing the timeout -+ * (reading bottom half flags, etc.). Pairs with -+ * smp_mb in aio_notify(). -+ */ -+ smp_mb(); - - /* We assume there is no timeout already supplied */ - *timeout = qemu_timeout_ns_to_ms(aio_compute_timeout(ctx)); -@@ -238,7 +245,8 @@ aio_ctx_check(GSource *source) - AioContext *ctx = (AioContext *) source; - QEMUBH *bh; - -- atomic_and(&ctx->notify_me, ~1); -+ /* Finish computing the timeout before clearing the flag. */ -+ atomic_store_release(&ctx->notify_me, atomic_read(&ctx->notify_me) & ~1); - aio_notify_accept(ctx); - - for (bh = ctx->first_bh; bh; bh = bh->next) { -@@ -343,10 +351,10 @@ LinuxAioState *aio_get_linux_aio(AioContext *ctx) - void aio_notify(AioContext *ctx) - { - /* Write e.g. bh->scheduled before reading ctx->notify_me. Pairs -- * with atomic_or in aio_ctx_prepare or atomic_add in aio_poll. -+ * with smp_mb in aio_ctx_prepare or aio_poll. - */ - smp_mb(); -- if (ctx->notify_me) { -+ if (atomic_read(&ctx->notify_me)) { - event_notifier_set(&ctx->notifier); - atomic_mb_set(&ctx->notified, true); - } diff --git a/ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch b/ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch deleted file mode 100644 index de52acf..0000000 --- a/ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch +++ /dev/null @@ -1,94 +0,0 @@ -From: BALATON Zoltan -Date: Mon, 6 Apr 2020 22:34:26 +0200 -Subject: ati-vga: Fix checks in ati_2d_blt() to avoid crash - -Git-commit ac2071c3791b67fc7af78b8ceb320c01ca1b5df7: -References: bsc#117037, CVE-2020-11869 - -In some corner cases (that never happen during normal operation but a -malicious guest could program wrong values) pixman functions were -called with parameters that result in a crash. Fix this and add more -checks to disallow such cases. - -Reported-by: Ziming Zhang -Signed-off-by: BALATON Zoltan -Message-id: 20200406204029.19559747D5D@zero.eik.bme.hu -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - hw/display/ati_2d.c | 37 ++++++++++++++++++++++++++----------- - 1 file changed, 26 insertions(+), 11 deletions(-) - -diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c -index 42e82311eb4433a6ee2671e9855a..23a8ae0cd8ceb7b59408c0709e2f 100644 ---- a/hw/display/ati_2d.c -+++ b/hw/display/ati_2d.c -@@ -53,12 +53,20 @@ void ati_2d_blt(ATIVGAState *s) - s->vga.vbe_start_addr, surface_data(ds), surface_stride(ds), - surface_bits_per_pixel(ds), - (s->regs.dp_mix & GMC_ROP3_MASK) >> 16); -- int dst_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? -- s->regs.dst_x : s->regs.dst_x + 1 - s->regs.dst_width); -- int dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -- s->regs.dst_y : s->regs.dst_y + 1 - s->regs.dst_height); -+ unsigned dst_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? -+ s->regs.dst_x : s->regs.dst_x + 1 - s->regs.dst_width); -+ unsigned dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -+ s->regs.dst_y : s->regs.dst_y + 1 - s->regs.dst_height); - int bpp = ati_bpp_from_datatype(s); -+ if (!bpp) { -+ qemu_log_mask(LOG_GUEST_ERROR, "Invalid bpp\n"); -+ return; -+ } - int dst_stride = DEFAULT_CNTL ? s->regs.dst_pitch : s->regs.default_pitch; -+ if (!dst_stride) { -+ qemu_log_mask(LOG_GUEST_ERROR, "Zero dest pitch\n"); -+ return; -+ } - uint8_t *dst_bits = s->vga.vram_ptr + (DEFAULT_CNTL ? - s->regs.dst_offset : s->regs.default_offset); - -@@ -82,12 +90,16 @@ void ati_2d_blt(ATIVGAState *s) - switch (s->regs.dp_mix & GMC_ROP3_MASK) { - case ROP3_SRCCOPY: - { -- int src_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? -- s->regs.src_x : s->regs.src_x + 1 - s->regs.dst_width); -- int src_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -- s->regs.src_y : s->regs.src_y + 1 - s->regs.dst_height); -+ unsigned src_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? -+ s->regs.src_x : s->regs.src_x + 1 - s->regs.dst_width); -+ unsigned src_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -+ s->regs.src_y : s->regs.src_y + 1 - s->regs.dst_height); - int src_stride = DEFAULT_CNTL ? - s->regs.src_pitch : s->regs.default_pitch; -+ if (!src_stride) { -+ qemu_log_mask(LOG_GUEST_ERROR, "Zero source pitch\n"); -+ return; -+ } - uint8_t *src_bits = s->vga.vram_ptr + (DEFAULT_CNTL ? - s->regs.src_offset : s->regs.default_offset); - -@@ -137,8 +149,10 @@ void ati_2d_blt(ATIVGAState *s) - dst_y * surface_stride(ds), - s->regs.dst_height * surface_stride(ds)); - } -- s->regs.dst_x += s->regs.dst_width; -- s->regs.dst_y += s->regs.dst_height; -+ s->regs.dst_x = (s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT ? -+ dst_x + s->regs.dst_width : dst_x); -+ s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -+ dst_y + s->regs.dst_height : dst_y); - break; - } - case ROP3_PATCOPY: -@@ -179,7 +193,8 @@ void ati_2d_blt(ATIVGAState *s) - dst_y * surface_stride(ds), - s->regs.dst_height * surface_stride(ds)); - } -- s->regs.dst_y += s->regs.dst_height; -+ s->regs.dst_y = (s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM ? -+ dst_y + s->regs.dst_height : dst_y); - break; - } - default: diff --git a/audio-oss-fix-buffer-pos-calculation.patch b/audio-oss-fix-buffer-pos-calculation.patch deleted file mode 100644 index 466281d..0000000 --- a/audio-oss-fix-buffer-pos-calculation.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 20 Jan 2020 11:18:04 +0100 -Subject: audio/oss: fix buffer pos calculation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 7a4ede0047a8613b0e3b72c9d351038f013dd357 - -Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api") -Reported-by: ziming zhang -Signed-off-by: Gerd Hoffmann -Message-Id: <20200120101804.29578-1-kraxel@redhat.com> -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Bruce Rogers ---- - audio/ossaudio.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/audio/ossaudio.c b/audio/ossaudio.c -index c43faeeea4aa208c9729cc760dcd..94564916fbf03c4783a5fdf5c403 100644 ---- a/audio/ossaudio.c -+++ b/audio/ossaudio.c -@@ -420,7 +420,7 @@ static size_t oss_write(HWVoiceOut *hw, void *buf, size_t len) - size_t to_copy = MIN(len, hw->size_emul - hw->pos_emul); - memcpy(hw->buf_emul + hw->pos_emul, buf, to_copy); - -- hw->pos_emul = (hw->pos_emul + to_copy) % hw->pos_emul; -+ hw->pos_emul = (hw->pos_emul + to_copy) % hw->size_emul; - buf += to_copy; - len -= to_copy; - } diff --git a/backup-top-Begin-drain-earlier.patch b/backup-top-Begin-drain-earlier.patch deleted file mode 100644 index 098ab07..0000000 --- a/backup-top-Begin-drain-earlier.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Max Reitz -Date: Thu, 19 Dec 2019 19:26:38 +0100 -Subject: backup-top: Begin drain earlier - -Git-commit: 503ca1262bab2c11c533a4816d1ff4297d4f58a6 - -When dropping backup-top, we need to drain the node before freeing the -BlockCopyState. Otherwise, requests may still be in flight and then the -assertion in shres_destroy() will fail. - -(This becomes visible in intermittent failure of 056.) - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20191219182638.104621-1-mreitz@redhat.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/backup-top.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/block/backup-top.c b/block/backup-top.c -index 7cdb1f8eba1065c04057b4a2137e..818d3f26b48da425ba061e21887f 100644 ---- a/block/backup-top.c -+++ b/block/backup-top.c -@@ -257,12 +257,12 @@ void bdrv_backup_top_drop(BlockDriverState *bs) - BDRVBackupTopState *s = bs->opaque; - AioContext *aio_context = bdrv_get_aio_context(bs); - -- block_copy_state_free(s->bcs); -- - aio_context_acquire(aio_context); - - bdrv_drained_begin(bs); - -+ block_copy_state_free(s->bcs); -+ - s->active = false; - bdrv_child_refresh_perms(bs, bs->backing, &error_abort); - bdrv_replace_node(bs, backing_bs(bs), &error_abort); diff --git a/blkdebug-Allow-taking-unsharing-permissi.patch b/blkdebug-Allow-taking-unsharing-permissi.patch deleted file mode 100644 index 8e9fad8..0000000 --- a/blkdebug-Allow-taking-unsharing-permissi.patch +++ /dev/null @@ -1,201 +0,0 @@ -From: Max Reitz -Date: Fri, 8 Nov 2019 13:34:53 +0100 -Subject: blkdebug: Allow taking/unsharing permissions - -Git-commit: 69c6449ff10fe4e3219e960549307096d5366bd0 - -Sometimes it is useful to be able to add a node to the block graph that -takes or unshare a certain set of permissions for debugging purposes. -This patch adds this capability to blkdebug. - -(Note that you cannot make blkdebug release or share permissions that it -needs to take or cannot share, because this might result in assertion -failures in the block layer. But if the blkdebug node has no parents, -it will not take any permissions and share everything by default, so you -can then freely choose what permissions to take and share.) - -Signed-off-by: Max Reitz -Message-id: 20191108123455.39445-4-mreitz@redhat.com -Reviewed-by: Vladimir Sementsov-Ogievskiy -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/blkdebug.c | 93 +++++++++++++++++++++++++++++++++++++++++++- - qapi/block-core.json | 14 ++++++- - 2 files changed, 105 insertions(+), 2 deletions(-) - -diff --git a/block/blkdebug.c b/block/blkdebug.c -index 5ae96c52b0733fc37bd5f485e124..af44aa973fd1855a48317ff7fd3f 100644 ---- a/block/blkdebug.c -+++ b/block/blkdebug.c -@@ -28,10 +28,14 @@ - #include "qemu/cutils.h" - #include "qemu/config-file.h" - #include "block/block_int.h" -+#include "block/qdict.h" - #include "qemu/module.h" - #include "qemu/option.h" -+#include "qapi/qapi-visit-block-core.h" - #include "qapi/qmp/qdict.h" -+#include "qapi/qmp/qlist.h" - #include "qapi/qmp/qstring.h" -+#include "qapi/qobject-input-visitor.h" - #include "sysemu/qtest.h" - - typedef struct BDRVBlkdebugState { -@@ -44,6 +48,9 @@ typedef struct BDRVBlkdebugState { - uint64_t opt_discard; - uint64_t max_discard; - -+ uint64_t take_child_perms; -+ uint64_t unshare_child_perms; -+ - /* For blkdebug_refresh_filename() */ - char *config_file; - -@@ -344,6 +351,69 @@ static void blkdebug_parse_filename(const char *filename, QDict *options, - qdict_put_str(options, "x-image", filename); - } - -+static int blkdebug_parse_perm_list(uint64_t *dest, QDict *options, -+ const char *prefix, Error **errp) -+{ -+ int ret = 0; -+ QDict *subqdict = NULL; -+ QObject *crumpled_subqdict = NULL; -+ Visitor *v = NULL; -+ BlockPermissionList *perm_list = NULL, *element; -+ Error *local_err = NULL; -+ -+ *dest = 0; -+ -+ qdict_extract_subqdict(options, &subqdict, prefix); -+ if (!qdict_size(subqdict)) { -+ goto out; -+ } -+ -+ crumpled_subqdict = qdict_crumple(subqdict, errp); -+ if (!crumpled_subqdict) { -+ ret = -EINVAL; -+ goto out; -+ } -+ -+ v = qobject_input_visitor_new(crumpled_subqdict); -+ visit_type_BlockPermissionList(v, NULL, &perm_list, &local_err); -+ if (local_err) { -+ error_propagate(errp, local_err); -+ ret = -EINVAL; -+ goto out; -+ } -+ -+ for (element = perm_list; element; element = element->next) { -+ *dest |= bdrv_qapi_perm_to_blk_perm(element->value); -+ } -+ -+out: -+ qapi_free_BlockPermissionList(perm_list); -+ visit_free(v); -+ qobject_unref(subqdict); -+ qobject_unref(crumpled_subqdict); -+ return ret; -+} -+ -+static int blkdebug_parse_perms(BDRVBlkdebugState *s, QDict *options, -+ Error **errp) -+{ -+ int ret; -+ -+ ret = blkdebug_parse_perm_list(&s->take_child_perms, options, -+ "take-child-perms.", errp); -+ if (ret < 0) { -+ return ret; -+ } -+ -+ ret = blkdebug_parse_perm_list(&s->unshare_child_perms, options, -+ "unshare-child-perms.", errp); -+ if (ret < 0) { -+ return ret; -+ } -+ -+ return 0; -+} -+ - static QemuOptsList runtime_opts = { - .name = "blkdebug", - .head = QTAILQ_HEAD_INITIALIZER(runtime_opts.head), -@@ -419,6 +489,12 @@ static int blkdebug_open(BlockDriverState *bs, QDict *options, int flags, - /* Set initial state */ - s->state = 1; - -+ /* Parse permissions modifiers before opening the image file */ -+ ret = blkdebug_parse_perms(s, options, errp); -+ if (ret < 0) { -+ goto out; -+ } -+ - /* Open the image file */ - bs->file = bdrv_open_child(qemu_opt_get(opts, "x-image"), options, "image", - bs, &child_file, false, &local_err); -@@ -916,6 +992,21 @@ static int blkdebug_reopen_prepare(BDRVReopenState *reopen_state, - return 0; - } - -+static void blkdebug_child_perm(BlockDriverState *bs, BdrvChild *c, -+ const BdrvChildRole *role, -+ BlockReopenQueue *reopen_queue, -+ uint64_t perm, uint64_t shared, -+ uint64_t *nperm, uint64_t *nshared) -+{ -+ BDRVBlkdebugState *s = bs->opaque; -+ -+ bdrv_filter_default_perms(bs, c, role, reopen_queue, perm, shared, -+ nperm, nshared); -+ -+ *nperm |= s->take_child_perms; -+ *nshared &= ~s->unshare_child_perms; -+} -+ - static const char *const blkdebug_strong_runtime_opts[] = { - "config", - "inject-error.", -@@ -940,7 +1031,7 @@ static BlockDriver bdrv_blkdebug = { - .bdrv_file_open = blkdebug_open, - .bdrv_close = blkdebug_close, - .bdrv_reopen_prepare = blkdebug_reopen_prepare, -- .bdrv_child_perm = bdrv_filter_default_perms, -+ .bdrv_child_perm = blkdebug_child_perm, - - .bdrv_getlength = blkdebug_getlength, - .bdrv_refresh_filename = blkdebug_refresh_filename, -diff --git a/qapi/block-core.json b/qapi/block-core.json -index 0cf68fea1450e6cb739863d2367c..bcf77d496289480b86b1c9d80374 100644 ---- a/qapi/block-core.json -+++ b/qapi/block-core.json -@@ -3450,6 +3450,16 @@ - # - # @set-state: array of state-change descriptions - # -+# @take-child-perms: Permissions to take on @image in addition to what -+# is necessary anyway (which depends on how the -+# blkdebug node is used). Defaults to none. -+# (since 5.0) -+# -+# @unshare-child-perms: Permissions not to share on @image in addition -+# to what cannot be shared anyway (which depends -+# on how the blkdebug node is used). Defaults -+# to none. (since 5.0) -+# - # Since: 2.9 - ## - { 'struct': 'BlockdevOptionsBlkdebug', -@@ -3459,7 +3469,9 @@ - '*opt-write-zero': 'int32', '*max-write-zero': 'int32', - '*opt-discard': 'int32', '*max-discard': 'int32', - '*inject-error': ['BlkdebugInjectErrorOptions'], -- '*set-state': ['BlkdebugSetStateOptions'] } } -+ '*set-state': ['BlkdebugSetStateOptions'], -+ '*take-child-perms': ['BlockPermission'], -+ '*unshare-child-perms': ['BlockPermission'] } } - - ## - # @BlockdevOptionsBlklogwrites: diff --git a/block-Activate-recursively-even-for-alre.patch b/block-Activate-recursively-even-for-alre.patch deleted file mode 100644 index b7c65d6..0000000 --- a/block-Activate-recursively-even-for-alre.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Kevin Wolf -Date: Tue, 17 Dec 2019 15:06:38 +0100 -Subject: block: Activate recursively even for already active nodes - -Git-commit: 7bb4941ace471fc7dd6ded4749b95b9622baa6ed - -bdrv_invalidate_cache_all() assumes that all nodes in a given subtree -are either active or inactive when it starts. Therefore, as soon as it -arrives at an already active node, it stops. - -However, this assumption is wrong. For example, it's possible to take a -snapshot of an inactive node, which results in an active overlay over an -inactive backing file. The active overlay is probably also the root node -of an inactive BlockBackend (blk->disable_perm == true). - -In this case, bdrv_invalidate_cache_all() does not need to do anything -to activate the overlay node, but it still needs to recurse into the -children and the parents to make sure that after returning success, -really everything is activated. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Kevin Wolf -Reviewed-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block.c | 50 ++++++++++++++++++++++++-------------------------- - 1 file changed, 24 insertions(+), 26 deletions(-) - -diff --git a/block.c b/block.c -index 473eb6eeaabacbaea4e74869e93e..2e5e8b639a88d430e52ef40973c7 100644 ---- a/block.c -+++ b/block.c -@@ -5335,10 +5335,6 @@ static void coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, - return; - } - -- if (!(bs->open_flags & BDRV_O_INACTIVE)) { -- return; -- } -- - QLIST_FOREACH(child, &bs->children, next) { - bdrv_co_invalidate_cache(child->bs, &local_err); - if (local_err) { -@@ -5360,34 +5356,36 @@ static void coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, - * just keep the extended permissions for the next time that an activation - * of the image is tried. - */ -- bs->open_flags &= ~BDRV_O_INACTIVE; -- bdrv_get_cumulative_perm(bs, &perm, &shared_perm); -- ret = bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, NULL, &local_err); -- if (ret < 0) { -- bs->open_flags |= BDRV_O_INACTIVE; -- error_propagate(errp, local_err); -- return; -- } -- bdrv_set_perm(bs, perm, shared_perm); -- -- if (bs->drv->bdrv_co_invalidate_cache) { -- bs->drv->bdrv_co_invalidate_cache(bs, &local_err); -- if (local_err) { -+ if (bs->open_flags & BDRV_O_INACTIVE) { -+ bs->open_flags &= ~BDRV_O_INACTIVE; -+ bdrv_get_cumulative_perm(bs, &perm, &shared_perm); -+ ret = bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, NULL, &local_err); -+ if (ret < 0) { - bs->open_flags |= BDRV_O_INACTIVE; - error_propagate(errp, local_err); - return; - } -- } -+ bdrv_set_perm(bs, perm, shared_perm); - -- FOR_EACH_DIRTY_BITMAP(bs, bm) { -- bdrv_dirty_bitmap_skip_store(bm, false); -- } -+ if (bs->drv->bdrv_co_invalidate_cache) { -+ bs->drv->bdrv_co_invalidate_cache(bs, &local_err); -+ if (local_err) { -+ bs->open_flags |= BDRV_O_INACTIVE; -+ error_propagate(errp, local_err); -+ return; -+ } -+ } - -- ret = refresh_total_sectors(bs, bs->total_sectors); -- if (ret < 0) { -- bs->open_flags |= BDRV_O_INACTIVE; -- error_setg_errno(errp, -ret, "Could not refresh total sector count"); -- return; -+ FOR_EACH_DIRTY_BITMAP(bs, bm) { -+ bdrv_dirty_bitmap_skip_store(bm, false); -+ } -+ -+ ret = refresh_total_sectors(bs, bs->total_sectors); -+ if (ret < 0) { -+ bs->open_flags |= BDRV_O_INACTIVE; -+ error_setg_errno(errp, -ret, "Could not refresh total sector count"); -+ return; -+ } - } - - QLIST_FOREACH(parent, &bs->parents, next_parent) { diff --git a/block-Add-bdrv_qapi_perm_to_blk_perm.patch b/block-Add-bdrv_qapi_perm_to_blk_perm.patch deleted file mode 100644 index a86f8bd..0000000 --- a/block-Add-bdrv_qapi_perm_to_blk_perm.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Max Reitz -Date: Fri, 8 Nov 2019 13:34:51 +0100 -Subject: block: Add bdrv_qapi_perm_to_blk_perm() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 7b1d9c4df0603fbc526226a9c5ef91118aa6c957 - -We need some way to correlate QAPI BlockPermission values with -BLK_PERM_* flags. We could: - -(1) have the same order in the QAPI definition as the the BLK_PERM_* - flags are in LSb-first order. However, then there is no guarantee - that they actually match (e.g. when someone modifies the QAPI schema - without thinking of the BLK_PERM_* definitions). - We could add static assertions, but these would break what’s good - about this solution, namely its simplicity. - -(2) define the BLK_PERM_* flags based on the BlockPermission values. - But this way whenever someone were to modify the QAPI order - (perfectly sensible in theory), the BLK_PERM_* values would change. - Because these values are used for file locking, this might break - file locking between different qemu versions. - -Therefore, go the slightly more cumbersome way: Add a function to -translate from the QAPI constants to the BLK_PERM_* flags. - -Signed-off-by: Max Reitz -Message-id: 20191108123455.39445-2-mreitz@redhat.com -Reviewed-by: Vladimir Sementsov-Ogievskiy -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block.c | 18 ++++++++++++++++++ - include/block/block.h | 1 + - 2 files changed, 19 insertions(+) - -diff --git a/block.c b/block.c -index 2e5e8b639a88d430e52ef40973c7..2cc16f99b352623272491c1cf254 100644 ---- a/block.c -+++ b/block.c -@@ -2227,6 +2227,24 @@ void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c, - *nshared = shared; - } - -+uint64_t bdrv_qapi_perm_to_blk_perm(BlockPermission qapi_perm) -+{ -+ static const uint64_t permissions[] = { -+ [BLOCK_PERMISSION_CONSISTENT_READ] = BLK_PERM_CONSISTENT_READ, -+ [BLOCK_PERMISSION_WRITE] = BLK_PERM_WRITE, -+ [BLOCK_PERMISSION_WRITE_UNCHANGED] = BLK_PERM_WRITE_UNCHANGED, -+ [BLOCK_PERMISSION_RESIZE] = BLK_PERM_RESIZE, -+ [BLOCK_PERMISSION_GRAPH_MOD] = BLK_PERM_GRAPH_MOD, -+ }; -+ -+ QEMU_BUILD_BUG_ON(ARRAY_SIZE(permissions) != BLOCK_PERMISSION__MAX); -+ QEMU_BUILD_BUG_ON(1UL << ARRAY_SIZE(permissions) != BLK_PERM_ALL + 1); -+ -+ assert(qapi_perm < BLOCK_PERMISSION__MAX); -+ -+ return permissions[qapi_perm]; -+} -+ - static void bdrv_replace_child_noperm(BdrvChild *child, - BlockDriverState *new_bs) - { -diff --git a/include/block/block.h b/include/block/block.h -index 1df9848e7436eec47e6251118a2f..e9dcfef7fa463e7655b4ec4a0d7c 100644 ---- a/include/block/block.h -+++ b/include/block/block.h -@@ -280,6 +280,7 @@ enum { - }; - - char *bdrv_perm_names(uint64_t perm); -+uint64_t bdrv_qapi_perm_to_blk_perm(BlockPermission qapi_perm); - - /* disk I/O throttling */ - void bdrv_init(void); diff --git a/block-Avoid-memleak-on-qcow2-image-info-.patch b/block-Avoid-memleak-on-qcow2-image-info-.patch deleted file mode 100644 index 4264609..0000000 --- a/block-Avoid-memleak-on-qcow2-image-info-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Eric Blake -Date: Fri, 20 Mar 2020 13:36:20 -0500 -Subject: block: Avoid memleak on qcow2 image info failure - -Git-commit: 71eaec2e8c7c8d266137b5c5f42da0bd6d6b5eb7 - -If we fail to get bitmap info, we must not leak the encryption info. - -Fixes: b8968c875f403 -Fixes: Coverity CID 1421894 -Signed-off-by: Eric Blake -Message-Id: <20200320183620.1112123-1-eblake@redhat.com> -Reviewed-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Andrey Shinkevich -Tested-by: Andrey Shinkevich -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/block/qcow2.c b/block/qcow2.c -index 7c18721741eacfb7f6c2c1f0efe6..13e118e16f02f371c0f23c7aaa8d 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -4800,6 +4800,7 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs, - if (local_err) { - error_propagate(errp, local_err); - qapi_free_ImageInfoSpecific(spec_info); -+ qapi_free_QCryptoBlockInfo(encrypt_info); - return NULL; - } - *spec_info->u.qcow2.data = (ImageInfoSpecificQCow2){ diff --git a/block-Fix-VM-size-field-width-in-snapsho.patch b/block-Fix-VM-size-field-width-in-snapsho.patch deleted file mode 100644 index 14855c3..0000000 --- a/block-Fix-VM-size-field-width-in-snapsho.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Max Reitz -Date: Fri, 17 Jan 2020 11:58:58 +0100 -Subject: block: Fix VM size field width in snapshot dump - -Git-commit: 804359b8b90f76d9d8fbe8d85a6544b68f107f10 - -When printing the snapshot list (e.g. with qemu-img snapshot -l), the VM -size field is only seven characters wide. As of de38b5005e9, this is -not necessarily sufficient: We generally print three digits, and this -may require a decimal point. Also, the unit field grew from something -as plain as "M" to " MiB". This means that number and unit may take up -eight characters in total; but we also want spaces in front. - -Considering previously the maximum width was four characters and the -field width was chosen to be three characters wider, let us adjust the -field width to be eleven now. - -Fixes: de38b5005e946aa3714963ea4c501e279e7d3666 -Buglink: https://bugs.launchpad.net/qemu/+bug/1859989 -Signed-off-by: Max Reitz -Message-Id: <20200117105859.241818-2-mreitz@redhat.com> -Reviewed-by: Eric Blake -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qapi.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/block/qapi.c b/block/qapi.c -index 9a5d0c9b27d85d77f3c6d49dcd0e..ffa539250dc8f0d01374517e8e5b 100644 ---- a/block/qapi.c -+++ b/block/qapi.c -@@ -657,7 +657,7 @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn) - char *sizing = NULL; - - if (!sn) { -- qemu_printf("%-10s%-20s%7s%20s%15s", -+ qemu_printf("%-10s%-20s%11s%20s%15s", - "ID", "TAG", "VM SIZE", "DATE", "VM CLOCK"); - } else { - ti = sn->date_sec; -@@ -672,7 +672,7 @@ void bdrv_snapshot_dump(QEMUSnapshotInfo *sn) - (int)(secs % 60), - (int)((sn->vm_clock_nsec / 1000000) % 1000)); - sizing = size_to_str(sn->vm_state_size); -- qemu_printf("%-10s%-20s%7s%20s%15s", -+ qemu_printf("%-10s%-20s%11s%20s%15s", - sn->id_str, sn->name, - sizing, - date_buf, diff --git a/block-backup-fix-memory-leak-in-bdrv_bac.patch b/block-backup-fix-memory-leak-in-bdrv_bac.patch deleted file mode 100644 index d366a7b..0000000 --- a/block-backup-fix-memory-leak-in-bdrv_bac.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Eiichi Tsukata -Date: Mon, 23 Dec 2019 18:06:32 +0900 -Subject: block/backup: fix memory leak in bdrv_backup_top_append() - -Git-commit: fb574de81bfdd71fdb0315105a3a7761efb68395 - -bdrv_open_driver() allocates bs->opaque according to drv->instance_size. -There is no need to allocate it and overwrite opaque in -bdrv_backup_top_append(). - -Reproducer: - - $ QTEST_QEMU_BINARY=./x86_64-softmmu/qemu-system-x86_64 valgrind -q --leak-check=full tests/test-replication -p /replication/secondary/start - ==29792== 24 bytes in 1 blocks are definitely lost in loss record 52 of 226 - ==29792== at 0x483AB1A: calloc (vg_replace_malloc.c:762) - ==29792== by 0x4B07CE0: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.6000.7) - ==29792== by 0x12BAB9: bdrv_open_driver (block.c:1289) - ==29792== by 0x12BEA9: bdrv_new_open_driver (block.c:1359) - ==29792== by 0x1D15CB: bdrv_backup_top_append (backup-top.c:190) - ==29792== by 0x1CC11A: backup_job_create (backup.c:439) - ==29792== by 0x1CD542: replication_start (replication.c:544) - ==29792== by 0x1401B9: replication_start_all (replication.c:52) - ==29792== by 0x128B50: test_secondary_start (test-replication.c:427) - ... - -Fixes: 7df7868b9640 ("block: introduce backup-top filter driver") -Signed-off-by: Eiichi Tsukata -Reviewed-by: Vladimir Sementsov-Ogievskiy -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/backup-top.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/block/backup-top.c b/block/backup-top.c -index 818d3f26b48da425ba061e21887f..64e9e4f576ab27889fb4c0d8aa0a 100644 ---- a/block/backup-top.c -+++ b/block/backup-top.c -@@ -196,7 +196,7 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, - } - - top->total_sectors = source->total_sectors; -- top->opaque = state = g_new0(BDRVBackupTopState, 1); -+ state = top->opaque; - - bdrv_ref(target); - state->target = bdrv_attach_child(top, target, "target", &child_file, errp); diff --git a/block-backup-top-fix-failure-path.patch b/block-backup-top-fix-failure-path.patch deleted file mode 100644 index 4d24d55..0000000 --- a/block-backup-top-fix-failure-path.patch +++ /dev/null @@ -1,91 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 21 Jan 2020 17:28:01 +0300 -Subject: block/backup-top: fix failure path - -Git-commit 0df62f45c1de6c020f1e6fba4eeafd248209b003 - -We can't access top after call bdrv_backup_top_drop, as it is already -freed at this time. - -Also, no needs to unref target child by hand, it will be unrefed on -bdrv_close() automatically. - -So, just do bdrv_backup_top_drop if append succeed and one bdrv_unref -otherwise. - -Note, that in !appended case bdrv_unref(top) moved into drained section -on source. It doesn't really matter, but just for code simplicity. - -Fixes: 7df7868b96404 -Cc: qemu-stable@nongnu.org # v4.2.0 -Signed-off-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Max Reitz -Message-id: 20200121142802.21467-2-vsementsov@virtuozzo.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/backup-top.c | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/block/backup-top.c b/block/backup-top.c -index 64e9e4f576ab27889fb4c0d8aa0a..d214139a4d2f2694df7610394003 100644 ---- a/block/backup-top.c -+++ b/block/backup-top.c -@@ -190,6 +190,7 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, - BlockDriverState *top = bdrv_new_open_driver(&bdrv_backup_top_filter, - filter_node_name, - BDRV_O_RDWR, errp); -+ bool appended = false; - - if (!top) { - return NULL; -@@ -212,8 +213,9 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, - bdrv_append(top, source, &local_err); - if (local_err) { - error_prepend(&local_err, "Cannot append backup-top filter: "); -- goto append_failed; -+ goto fail; - } -+ appended = true; - - /* - * bdrv_append() finished successfully, now we can require permissions -@@ -224,14 +226,14 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, - if (local_err) { - error_prepend(&local_err, - "Cannot set permissions for backup-top filter: "); -- goto failed_after_append; -+ goto fail; - } - - state->bcs = block_copy_state_new(top->backing, state->target, - cluster_size, write_flags, &local_err); - if (local_err) { - error_prepend(&local_err, "Cannot create block-copy-state: "); -- goto failed_after_append; -+ goto fail; - } - *bcs = state->bcs; - -@@ -239,14 +241,15 @@ BlockDriverState *bdrv_backup_top_append(BlockDriverState *source, - - return top; - --failed_after_append: -- state->active = false; -- bdrv_backup_top_drop(top); -+fail: -+ if (appended) { -+ state->active = false; -+ bdrv_backup_top_drop(top); -+ } else { -+ bdrv_unref(top); -+ } - --append_failed: - bdrv_drained_end(source); -- bdrv_unref_child(top, state->target); -- bdrv_unref(top); - error_propagate(errp, local_err); - - return NULL; diff --git a/block-bdrv_set_backing_bs-fix-use-after-.patch b/block-bdrv_set_backing_bs-fix-use-after-.patch deleted file mode 100644 index b53637f..0000000 --- a/block-bdrv_set_backing_bs-fix-use-after-.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Mon, 16 Mar 2020 09:06:30 +0300 -Subject: block: bdrv_set_backing_bs: fix use-after-free -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 6e57963a77df1e275a73dab4c6a7ec9a9d3468d4 - -There is a use-after-free possible: bdrv_unref_child() leaves -bs->backing freed but not NULL. bdrv_attach_child may produce nested -polling loop due to drain, than access of freed pointer is possible. - -I've produced the following crash on 30 iotest with modified code. It -does not reproduce on master, but still seems possible: - - #0 __strcmp_avx2 () at /lib64/libc.so.6 - #1 bdrv_backing_overridden (bs=0x55c9d3cc2060) at block.c:6350 - #2 bdrv_refresh_filename (bs=0x55c9d3cc2060) at block.c:6404 - #3 bdrv_backing_attach (c=0x55c9d48e5520) at block.c:1063 - #4 bdrv_replace_child_noperm - (child=child@entry=0x55c9d48e5520, - new_bs=new_bs@entry=0x55c9d3cc2060) at block.c:2290 - #5 bdrv_replace_child - (child=child@entry=0x55c9d48e5520, - new_bs=new_bs@entry=0x55c9d3cc2060) at block.c:2320 - #6 bdrv_root_attach_child - (child_bs=child_bs@entry=0x55c9d3cc2060, - child_name=child_name@entry=0x55c9d241d478 "backing", - child_role=child_role@entry=0x55c9d26ecee0 , - ctx=, perm=, shared_perm=21, - opaque=0x55c9d3c5a3d0, errp=0x7ffd117108e0) at block.c:2424 - #7 bdrv_attach_child - (parent_bs=parent_bs@entry=0x55c9d3c5a3d0, - child_bs=child_bs@entry=0x55c9d3cc2060, - child_name=child_name@entry=0x55c9d241d478 "backing", - child_role=child_role@entry=0x55c9d26ecee0 , - errp=errp@entry=0x7ffd117108e0) at block.c:5876 - #8 in bdrv_set_backing_hd - (bs=bs@entry=0x55c9d3c5a3d0, - backing_hd=backing_hd@entry=0x55c9d3cc2060, - errp=errp@entry=0x7ffd117108e0) - at block.c:2576 - #9 stream_prepare (job=0x55c9d49d84a0) at block/stream.c:150 - #10 job_prepare (job=0x55c9d49d84a0) at job.c:761 - #11 job_txn_apply (txn=, fn=) at - job.c:145 - #12 job_do_finalize (job=0x55c9d49d84a0) at job.c:778 - #13 job_completed_txn_success (job=0x55c9d49d84a0) at job.c:832 - #14 job_completed (job=0x55c9d49d84a0) at job.c:845 - #15 job_completed (job=0x55c9d49d84a0) at job.c:836 - #16 job_exit (opaque=0x55c9d49d84a0) at job.c:864 - #17 aio_bh_call (bh=0x55c9d471a160) at util/async.c:117 - #18 aio_bh_poll (ctx=ctx@entry=0x55c9d3c46720) at util/async.c:117 - #19 aio_poll (ctx=ctx@entry=0x55c9d3c46720, - blocking=blocking@entry=true) - at util/aio-posix.c:728 - #20 bdrv_parent_drained_begin_single (poll=true, c=0x55c9d3d558f0) - at block/io.c:121 - #21 bdrv_parent_drained_begin_single (c=c@entry=0x55c9d3d558f0, - poll=poll@entry=true) - at block/io.c:114 - #22 bdrv_replace_child_noperm - (child=child@entry=0x55c9d3d558f0, - new_bs=new_bs@entry=0x55c9d3d27300) at block.c:2258 - #23 bdrv_replace_child - (child=child@entry=0x55c9d3d558f0, - new_bs=new_bs@entry=0x55c9d3d27300) at block.c:2320 - #24 bdrv_root_attach_child - (child_bs=child_bs@entry=0x55c9d3d27300, - child_name=child_name@entry=0x55c9d241d478 "backing", - child_role=child_role@entry=0x55c9d26ecee0 , - ctx=, perm=, shared_perm=21, - opaque=0x55c9d3cc2060, errp=0x7ffd11710c60) at block.c:2424 - #25 bdrv_attach_child - (parent_bs=parent_bs@entry=0x55c9d3cc2060, - child_bs=child_bs@entry=0x55c9d3d27300, - child_name=child_name@entry=0x55c9d241d478 "backing", - child_role=child_role@entry=0x55c9d26ecee0 , - errp=errp@entry=0x7ffd11710c60) at block.c:5876 - #26 bdrv_set_backing_hd - (bs=bs@entry=0x55c9d3cc2060, - backing_hd=backing_hd@entry=0x55c9d3d27300, - errp=errp@entry=0x7ffd11710c60) - at block.c:2576 - #27 stream_prepare (job=0x55c9d495ead0) at block/stream.c:150 - ... - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-Id: <20200316060631.30052-2-vsementsov@virtuozzo.com> -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: John Snow -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/block.c b/block.c -index 8539f99ac47cdbf0e9b823751074..3d0134f00b55e0400efc70058d00 100644 ---- a/block.c -+++ b/block.c -@@ -2577,10 +2577,10 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd, - - if (bs->backing) { - bdrv_unref_child(bs, bs->backing); -+ bs->backing = NULL; - } - - if (!backing_hd) { -- bs->backing = NULL; - goto out; - } - diff --git a/block-block-copy-fix-progress-calculatio.patch b/block-block-copy-fix-progress-calculatio.patch deleted file mode 100644 index 00957bf..0000000 --- a/block-block-copy-fix-progress-calculatio.patch +++ /dev/null @@ -1,195 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Wed, 11 Mar 2020 13:29:57 +0300 -Subject: block/block-copy: fix progress calculation - -Git-commit: d0ebeca14a585f352938062ef8ddde47fe4d39f9 - -Assume we have two regions, A and B, and region B is in-flight now, -region A is not yet touched, but it is unallocated and should be -skipped. - -Correspondingly, as progress we have - - total = A + B - current = 0 - -If we reset unallocated region A and call progress_reset_callback, -it will calculate 0 bytes dirty in the bitmap and call -job_progress_set_remaining, which will set - - total = current + 0 = 0 + 0 = 0 - -So, B bytes are actually removed from total accounting. When job -finishes we'll have - - total = 0 - current = B - -, which doesn't sound good. - -This is because we didn't considered in-flight bytes, actually when -calculating remaining, we should have set (in_flight + dirty_bytes) -as remaining, not only dirty_bytes. - -To fix it, let's refactor progress calculation, moving it to block-copy -itself instead of fixing callback. And, of course, track in_flight -bytes count. - -We still have to keep one callback, to maintain backup job bytes_read -calculation, but it will go on soon, when we turn the whole backup -process into one block_copy call. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Andrey Shinkevich -Message-Id: <20200311103004.7649-3-vsementsov@virtuozzo.com> -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/backup.c | 13 ++----------- - block/block-copy.c | 16 ++++++++++++---- - include/block/block-copy.h | 15 +++++---------- - 3 files changed, 19 insertions(+), 25 deletions(-) - -diff --git a/block/backup.c b/block/backup.c -index cf62b1a38ceacaa6785f0ec0d197..5f3bd2415a125e845441deafe3b5 100644 ---- a/block/backup.c -+++ b/block/backup.c -@@ -57,15 +57,6 @@ static void backup_progress_bytes_callback(int64_t bytes, void *opaque) - BackupBlockJob *s = opaque; - - s->bytes_read += bytes; -- job_progress_update(&s->common.job, bytes); --} -- --static void backup_progress_reset_callback(void *opaque) --{ -- BackupBlockJob *s = opaque; -- uint64_t estimate = bdrv_get_dirty_count(s->bcs->copy_bitmap); -- -- job_progress_set_remaining(&s->common.job, estimate); - } - - static int coroutine_fn backup_do_cow(BackupBlockJob *job, -@@ -461,8 +452,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, - job->cluster_size = cluster_size; - job->len = len; - -- block_copy_set_callbacks(bcs, backup_progress_bytes_callback, -- backup_progress_reset_callback, job); -+ block_copy_set_progress_callback(bcs, backup_progress_bytes_callback, job); -+ block_copy_set_progress_meter(bcs, &job->common.job.progress); - - /* Required permissions are already taken by backup-top target */ - block_job_add_bdrv(&job->common, "target", target, 0, BLK_PERM_ALL, -diff --git a/block/block-copy.c b/block/block-copy.c -index 79798a1567b10d8b59b6bb045ca4..e2d7b3b887198b40a12a42073ac9 100644 ---- a/block/block-copy.c -+++ b/block/block-copy.c -@@ -127,17 +127,20 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, - return s; - } - --void block_copy_set_callbacks( -+void block_copy_set_progress_callback( - BlockCopyState *s, - ProgressBytesCallbackFunc progress_bytes_callback, -- ProgressResetCallbackFunc progress_reset_callback, - void *progress_opaque) - { - s->progress_bytes_callback = progress_bytes_callback; -- s->progress_reset_callback = progress_reset_callback; - s->progress_opaque = progress_opaque; - } - -+void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm) -+{ -+ s->progress = pm; -+} -+ - /* - * block_copy_do_copy - * -@@ -269,7 +272,9 @@ int64_t block_copy_reset_unallocated(BlockCopyState *s, - - if (!ret) { - bdrv_reset_dirty_bitmap(s->copy_bitmap, offset, bytes); -- s->progress_reset_callback(s->progress_opaque); -+ progress_set_remaining(s->progress, -+ bdrv_get_dirty_count(s->copy_bitmap) + -+ s->in_flight_bytes); - } - - *count = bytes; -@@ -331,15 +336,18 @@ int coroutine_fn block_copy(BlockCopyState *s, - trace_block_copy_process(s, start); - - bdrv_reset_dirty_bitmap(s->copy_bitmap, start, chunk_end - start); -+ s->in_flight_bytes += chunk_end - start; - - co_get_from_shres(s->mem, chunk_end - start); - ret = block_copy_do_copy(s, start, chunk_end, error_is_read); - co_put_to_shres(s->mem, chunk_end - start); -+ s->in_flight_bytes -= chunk_end - start; - if (ret < 0) { - bdrv_set_dirty_bitmap(s->copy_bitmap, start, chunk_end - start); - break; - } - -+ progress_work_done(s->progress, chunk_end - start); - s->progress_bytes_callback(chunk_end - start, s->progress_opaque); - start = chunk_end; - ret = 0; -diff --git a/include/block/block-copy.h b/include/block/block-copy.h -index 0a161724d77bddbb2e8bcfd0e913..9def00068c5ad12044cae0331853 100644 ---- a/include/block/block-copy.h -+++ b/include/block/block-copy.h -@@ -26,7 +26,6 @@ typedef struct BlockCopyInFlightReq { - } BlockCopyInFlightReq; - - typedef void (*ProgressBytesCallbackFunc)(int64_t bytes, void *opaque); --typedef void (*ProgressResetCallbackFunc)(void *opaque); - typedef struct BlockCopyState { - /* - * BdrvChild objects are not owned or managed by block-copy. They are -@@ -36,6 +35,7 @@ typedef struct BlockCopyState { - BdrvChild *source; - BdrvChild *target; - BdrvDirtyBitmap *copy_bitmap; -+ int64_t in_flight_bytes; - int64_t cluster_size; - bool use_copy_range; - int64_t copy_size; -@@ -60,15 +60,9 @@ typedef struct BlockCopyState { - */ - bool skip_unallocated; - -+ ProgressMeter *progress; - /* progress_bytes_callback: called when some copying progress is done. */ - ProgressBytesCallbackFunc progress_bytes_callback; -- -- /* -- * progress_reset_callback: called when some bytes reset from copy_bitmap -- * (see @skip_unallocated above). The callee is assumed to recalculate how -- * many bytes remain based on the dirty bit count of copy_bitmap. -- */ -- ProgressResetCallbackFunc progress_reset_callback; - void *progress_opaque; - - SharedResource *mem; -@@ -79,12 +73,13 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, - BdrvRequestFlags write_flags, - Error **errp); - --void block_copy_set_callbacks( -+void block_copy_set_progress_callback( - BlockCopyState *s, - ProgressBytesCallbackFunc progress_bytes_callback, -- ProgressResetCallbackFunc progress_reset_callback, - void *progress_opaque); - -+void block_copy_set_progress_meter(BlockCopyState *s, ProgressMeter *pm); -+ - void block_copy_state_free(BlockCopyState *s); - - int64_t block_copy_reset_unallocated(BlockCopyState *s, diff --git a/block-fix-crash-on-zero-length-unaligned.patch b/block-fix-crash-on-zero-length-unaligned.patch deleted file mode 100644 index 4caef8a..0000000 --- a/block-fix-crash-on-zero-length-unaligned.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Thu, 6 Feb 2020 19:42:45 +0300 -Subject: block: fix crash on zero-length unaligned write and read - -Git-commit: ac9d00bf7b47acae6b0e42910d9ed55fef3af5b8 - -Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped -aligning for zero-length request: bdrv_init_padding() blindly return -false if bytes == 0, like there is nothing to align. - -This leads the following command to crash: - -./qemu-io --image-opts -c 'write 1 0' \ - driver=blkdebug,align=512,image.driver=null-co,image.size=512 - ->> qemu-io: block/io.c:1955: bdrv_aligned_pwritev: Assertion - `(offset & (align - 1)) == 0' failed. ->> Aborted (core dumped) - -Prior to 7a3f542fbd we does aligning of such zero requests. Instead of -recovering this behavior let's just do nothing on such requests as it -is useless. - -Note that driver may have special meaning of zero-length reqeusts, like -qcow2_co_pwritev_compressed_part, so we can't skip any zero-length -operation. But for unaligned ones, we can't pass it to driver anyway. - -This commit also fixes crash in iotest 80 running with -nocache: - -./check -nocache -qcow2 80 - -which crashes on same assertion due to trying to read empty extra data -in qcow2_do_read_snapshots(). - -Cc: qemu-stable@nongnu.org # v4.2 -Fixes: 7a3f542fbd -Signed-off-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Max Reitz -Message-id: 20200206164245.17781-1-vsementsov@virtuozzo.com -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - block/io.c | 28 +++++++++++++++++++++++++++- - 1 file changed, 27 insertions(+), 1 deletion(-) - -diff --git a/block/io.c b/block/io.c -index f75777f5ea744aac5c9b5872f203..d1f1ee9138c7af82352e9277f22b 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -1567,10 +1567,12 @@ static bool bdrv_init_padding(BlockDriverState *bs, - pad->tail = align - pad->tail; - } - -- if ((!pad->head && !pad->tail) || !bytes) { -+ if (!pad->head && !pad->tail) { - return false; - } - -+ assert(bytes); /* Nothing good in aligning zero-length requests */ -+ - sum = pad->head + bytes + pad->tail; - pad->buf_len = (sum > align && pad->head && pad->tail) ? 2 * align : align; - pad->buf = qemu_blockalign(bs, pad->buf_len); -@@ -1708,6 +1710,18 @@ int coroutine_fn bdrv_co_preadv_part(BdrvChild *child, - return ret; - } - -+ if (bytes == 0 && !QEMU_IS_ALIGNED(offset, bs->bl.request_alignment)) { -+ /* -+ * Aligning zero request is nonsense. Even if driver has special meaning -+ * of zero-length (like qcow2_co_pwritev_compressed_part), we can't pass -+ * it to driver due to request_alignment. -+ * -+ * Still, no reason to return an error if someone do unaligned -+ * zero-length read occasionally. -+ */ -+ return 0; -+ } -+ - bdrv_inc_in_flight(bs); - - /* Don't do copy-on-read if we read data before write operation */ -@@ -2115,6 +2129,18 @@ int coroutine_fn bdrv_co_pwritev_part(BdrvChild *child, - return -ENOTSUP; - } - -+ if (bytes == 0 && !QEMU_IS_ALIGNED(offset, bs->bl.request_alignment)) { -+ /* -+ * Aligning zero request is nonsense. Even if driver has special meaning -+ * of zero-length (like qcow2_co_pwritev_compressed_part), we can't pass -+ * it to driver due to request_alignment. -+ * -+ * Still, no reason to return an error if someone do unaligned -+ * zero-length write occasionally. -+ */ -+ return 0; -+ } -+ - bdrv_inc_in_flight(bs); - /* - * Align write if necessary by performing a read-modify-write cycle. diff --git a/block-fix-memleaks-in-bdrv_refresh_filen.patch b/block-fix-memleaks-in-bdrv_refresh_filen.patch deleted file mode 100644 index 37a79a9..0000000 --- a/block-fix-memleaks-in-bdrv_refresh_filen.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Pan Nengyuan -Date: Thu, 16 Jan 2020 16:56:00 +0800 -Subject: block: fix memleaks in bdrv_refresh_filename - -Git-commit: cb8956144ccaccf23d5cc4167677e2c84fa5a9f8 - -If we call the qmp 'query-block' while qemu is working on -'block-commit', it will cause memleaks, the memory leak stack is as -follow: - -Indirect leak of 12360 byte(s) in 3 object(s) allocated from: - #0 0x7f80f0b6d970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) - #1 0x7f80ee86049d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d) - #2 0x55ea95b5bb67 in qdict_new /mnt/sdb/qemu-4.2.0-rc0/qobject/qdict.c:29 - #3 0x55ea956cd043 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6427 - #4 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399 - #5 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399 - #6 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399 - #7 0x55ea958818ea in bdrv_block_device_info /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:56 - #8 0x55ea958879de in bdrv_query_info /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:392 - #9 0x55ea9588b58f in qmp_query_block /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:578 - #10 0x55ea95567392 in qmp_marshal_query_block qapi/qapi-commands-block-core.c:95 - -Indirect leak of 4120 byte(s) in 1 object(s) allocated from: - #0 0x7f80f0b6d970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) - #1 0x7f80ee86049d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d) - #2 0x55ea95b5bb67 in qdict_new /mnt/sdb/qemu-4.2.0-rc0/qobject/qdict.c:29 - #3 0x55ea956cd043 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6427 - #4 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399 - #5 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399 - #6 0x55ea9569f301 in bdrv_backing_attach /mnt/sdb/qemu-4.2.0-rc0/block.c:1064 - #7 0x55ea956a99dd in bdrv_replace_child_noperm /mnt/sdb/qemu-4.2.0-rc0/block.c:2283 - #8 0x55ea956b9b53 in bdrv_replace_node /mnt/sdb/qemu-4.2.0-rc0/block.c:4196 - #9 0x55ea956b9e49 in bdrv_append /mnt/sdb/qemu-4.2.0-rc0/block.c:4236 - #10 0x55ea958c3472 in commit_start /mnt/sdb/qemu-4.2.0-rc0/block/commit.c:306 - #11 0x55ea94b68ab0 in qmp_block_commit /mnt/sdb/qemu-4.2.0-rc0/blockdev.c:3459 - #12 0x55ea9556a7a7 in qmp_marshal_block_commit qapi/qapi-commands-block-core.c:407 - -Fixes: bb808d5f5c0978828a974d547e6032402c339555 -Reported-by: Euler Robot -Signed-off-by: Pan Nengyuan -Message-id: 20200116085600.24056-1-pannengyuan@huawei.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/block.c b/block.c -index 2cc16f99b352623272491c1cf254..8539f99ac47cdbf0e9b823751074 100644 ---- a/block.c -+++ b/block.c -@@ -6426,6 +6426,7 @@ void bdrv_refresh_filename(BlockDriverState *bs) - child->bs->exact_filename); - pstrcpy(bs->filename, sizeof(bs->filename), child->bs->filename); - -+ qobject_unref(bs->full_open_options); - bs->full_open_options = qobject_ref(child->bs->full_open_options); - - return; diff --git a/block-io-fix-bdrv_co_do_copy_on_readv.patch b/block-io-fix-bdrv_co_do_copy_on_readv.patch deleted file mode 100644 index db99d1c..0000000 --- a/block-io-fix-bdrv_co_do_copy_on_readv.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Thu, 12 Mar 2020 11:19:49 +0300 -Subject: block/io: fix bdrv_co_do_copy_on_readv - -Git-commit: 4ab78b19189a81038e744728ed949d09aa477550 - -Prior to 1143ec5ebf4 it was OK to qemu_iovec_from_buf() from aligned-up -buffer to original qiov, as qemu_iovec_from_buf() will stop at qiov end -anyway. - -But after 1143ec5ebf4 we assume that bdrv_co_do_copy_on_readv works on -part of original qiov, defined by qiov_offset and bytes. So we must not -touch qiov behind qiov_offset+bytes bound. Fix it. - -Cc: qemu-stable@nongnu.org # v4.2 -Fixes: 1143ec5ebf4 -Signed-off-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: John Snow -Message-id: 20200312081949.5350-1-vsementsov@virtuozzo.com -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - block/io.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/block/io.c b/block/io.c -index d1f1ee9138c7af82352e9277f22b..c2c3aab9ee3d1d4d494ce98a6d8b 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -1395,7 +1395,7 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child, - if (!(flags & BDRV_REQ_PREFETCH)) { - qemu_iovec_from_buf(qiov, qiov_offset + progress, - bounce_buffer + skip_bytes, -- pnum - skip_bytes); -+ MIN(pnum - skip_bytes, bytes - progress)); - } - } else if (!(flags & BDRV_REQ_PREFETCH)) { - /* Read directly into the destination */ diff --git a/block-nbd-extract-the-common-cleanup-cod.patch b/block-nbd-extract-the-common-cleanup-cod.patch deleted file mode 100644 index 7d80149..0000000 --- a/block-nbd-extract-the-common-cleanup-cod.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: Pan Nengyuan -Date: Thu, 5 Dec 2019 11:45:27 +0800 -Subject: block/nbd: extract the common cleanup code - -Git-commit: 7f493662be4045146a8f45119d8834c9088a0ad6 - -The BDRVNBDState cleanup code is common in two places, add -nbd_clear_bdrvstate() function to do these cleanups. - -Suggested-by: Stefano Garzarella -Signed-off-by: Pan Nengyuan -Reviewed-by: Vladimir Sementsov-Ogievskiy -Message-Id: <1575517528-44312-2-git-send-email-pannengyuan@huawei.com> -Reviewed-by: Eric Blake -[eblake: fix compilation error and commit message] -Signed-off-by: Eric Blake -Signed-off-by: Bruce Rogers ---- - block/nbd.c | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/block/nbd.c b/block/nbd.c -index 5f18f78a9471b25c859bf8d4a743..6bb67152864954bb0e7b6f0145de 100644 ---- a/block/nbd.c -+++ b/block/nbd.c -@@ -94,6 +94,19 @@ typedef struct BDRVNBDState { - - static int nbd_client_connect(BlockDriverState *bs, Error **errp); - -+static void nbd_clear_bdrvstate(BDRVNBDState *s) -+{ -+ object_unref(OBJECT(s->tlscreds)); -+ qapi_free_SocketAddress(s->saddr); -+ s->saddr = NULL; -+ g_free(s->export); -+ s->export = NULL; -+ g_free(s->tlscredsid); -+ s->tlscredsid = NULL; -+ g_free(s->x_dirty_bitmap); -+ s->x_dirty_bitmap = NULL; -+} -+ - static void nbd_channel_error(BDRVNBDState *s, int ret) - { - if (ret == -EIO) { -@@ -1864,11 +1877,7 @@ static int nbd_process_options(BlockDriverState *bs, QDict *options, - - error: - if (ret < 0) { -- object_unref(OBJECT(s->tlscreds)); -- qapi_free_SocketAddress(s->saddr); -- g_free(s->export); -- g_free(s->tlscredsid); -- g_free(s->x_dirty_bitmap); -+ nbd_clear_bdrvstate(s); - } - qemu_opts_del(opts); - return ret; -@@ -1947,12 +1956,7 @@ static void nbd_close(BlockDriverState *bs) - BDRVNBDState *s = bs->opaque; - - nbd_client_close(bs); -- -- object_unref(OBJECT(s->tlscreds)); -- qapi_free_SocketAddress(s->saddr); -- g_free(s->export); -- g_free(s->tlscredsid); -- g_free(s->x_dirty_bitmap); -+ nbd_clear_bdrvstate(s); - } - - static int64_t nbd_getlength(BlockDriverState *bs) diff --git a/block-nbd-fix-memory-leak-in-nbd_open.patch b/block-nbd-fix-memory-leak-in-nbd_open.patch deleted file mode 100644 index bd62fd9..0000000 --- a/block-nbd-fix-memory-leak-in-nbd_open.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Pan Nengyuan -Date: Thu, 5 Dec 2019 11:45:28 +0800 -Subject: block/nbd: fix memory leak in nbd_open() - -Git-commit: 8198cf5ef0ef98118b4176970d1cd998d93ec849 - -In currently implementation there will be a memory leak when -nbd_client_connect() returns error status. Here is an easy way to -reproduce: - -1. run qemu-iotests as follow and check the result with asan: - ./check -raw 143 - -Following is the asan output backtrack: -Direct leak of 40 byte(s) in 1 object(s) allocated from: - #0 0x7f629688a560 in calloc (/usr/lib64/libasan.so.3+0xc7560) - #1 0x7f6295e7e015 in g_malloc0 (/usr/lib64/libglib-2.0.so.0+0x50015) - #2 0x56281dab4642 in qobject_input_start_struct /mnt/sdb/qemu-4.2.0-rc0/qapi/qobject-input-visitor.c:295 - #3 0x56281dab1a04 in visit_start_struct /mnt/sdb/qemu-4.2.0-rc0/qapi/qapi-visit-core.c:49 - #4 0x56281dad1827 in visit_type_SocketAddress qapi/qapi-visit-sockets.c:386 - #5 0x56281da8062f in nbd_config /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1716 - #6 0x56281da8062f in nbd_process_options /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1829 - #7 0x56281da8062f in nbd_open /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1873 - -Direct leak of 15 byte(s) in 1 object(s) allocated from: - #0 0x7f629688a3a0 in malloc (/usr/lib64/libasan.so.3+0xc73a0) - #1 0x7f6295e7dfbd in g_malloc (/usr/lib64/libglib-2.0.so.0+0x4ffbd) - #2 0x7f6295e96ace in g_strdup (/usr/lib64/libglib-2.0.so.0+0x68ace) - #3 0x56281da804ac in nbd_process_options /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1834 - #4 0x56281da804ac in nbd_open /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1873 - -Indirect leak of 24 byte(s) in 1 object(s) allocated from: - #0 0x7f629688a3a0 in malloc (/usr/lib64/libasan.so.3+0xc73a0) - #1 0x7f6295e7dfbd in g_malloc (/usr/lib64/libglib-2.0.so.0+0x4ffbd) - #2 0x7f6295e96ace in g_strdup (/usr/lib64/libglib-2.0.so.0+0x68ace) - #3 0x56281dab41a3 in qobject_input_type_str_keyval /mnt/sdb/qemu-4.2.0-rc0/qapi/qobject-input-visitor.c:536 - #4 0x56281dab2ee9 in visit_type_str /mnt/sdb/qemu-4.2.0-rc0/qapi/qapi-visit-core.c:297 - #5 0x56281dad0fa1 in visit_type_UnixSocketAddress_members qapi/qapi-visit-sockets.c:141 - #6 0x56281dad17b6 in visit_type_SocketAddress_members qapi/qapi-visit-sockets.c:366 - #7 0x56281dad186a in visit_type_SocketAddress qapi/qapi-visit-sockets.c:393 - #8 0x56281da8062f in nbd_config /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1716 - #9 0x56281da8062f in nbd_process_options /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1829 - #10 0x56281da8062f in nbd_open /mnt/sdb/qemu-4.2.0-rc0/block/nbd.c:1873 - -Fixes: 8f071c9db506e03ab -Reported-by: Euler Robot -Signed-off-by: Pan Nengyuan -Reviewed-by: Vladimir Sementsov-Ogievskiy -Cc: qemu-stable -Cc: Vladimir Sementsov-Ogievskiy -Message-Id: <1575517528-44312-3-git-send-email-pannengyuan@huawei.com> -Reviewed-by: Stefano Garzarella -Signed-off-by: Eric Blake -Signed-off-by: Bruce Rogers ---- - block/nbd.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/block/nbd.c b/block/nbd.c -index 6bb67152864954bb0e7b6f0145de..3d369fc8eb79df642bfd22cd8e88 100644 ---- a/block/nbd.c -+++ b/block/nbd.c -@@ -1900,6 +1900,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags, - - ret = nbd_client_connect(bs, errp); - if (ret < 0) { -+ nbd_clear_bdrvstate(s); - return ret; - } - /* successfully connected */ diff --git a/block-qcow2-threads-fix-qcow2_decompress.patch b/block-qcow2-threads-fix-qcow2_decompress.patch deleted file mode 100644 index 0170f33..0000000 --- a/block-qcow2-threads-fix-qcow2_decompress.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Mon, 2 Mar 2020 18:09:30 +0300 -Subject: block/qcow2-threads: fix qcow2_decompress -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: e7266570f2cf7b3ca2a156c677ee0a59d563458b - -On success path we return what inflate() returns instead of 0. And it -most probably works for Z_STREAM_END as it is positive, but is -definitely broken for Z_BUF_ERROR. - -While being here, switch to errno return code, to be closer to -qcow2_compress API (and usual expectations). - -Revert condition in if to be more positive. Drop dead initialization of -ret. - -Cc: qemu-stable@nongnu.org # v4.0 -Fixes: 341926ab83e2b -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-Id: <20200302150930.16218-1-vsementsov@virtuozzo.com> -Reviewed-by: Alberto Garcia -Reviewed-by: Ján Tomko -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2-threads.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/block/qcow2-threads.c b/block/qcow2-threads.c -index 8f5a0d1ebe7182151ba99d9aeeff..0d193d16147cf2fc6a8dac23d885 100644 ---- a/block/qcow2-threads.c -+++ b/block/qcow2-threads.c -@@ -128,12 +128,12 @@ static ssize_t qcow2_compress(void *dest, size_t dest_size, - * @src - source buffer, @src_size bytes - * - * Returns: 0 on success -- * -1 on fail -+ * -EIO on fail - */ - static ssize_t qcow2_decompress(void *dest, size_t dest_size, - const void *src, size_t src_size) - { -- int ret = 0; -+ int ret; - z_stream strm; - - memset(&strm, 0, sizeof(strm)); -@@ -144,17 +144,19 @@ static ssize_t qcow2_decompress(void *dest, size_t dest_size, - - ret = inflateInit2(&strm, -12); - if (ret != Z_OK) { -- return -1; -+ return -EIO; - } - - ret = inflate(&strm, Z_FINISH); -- if ((ret != Z_STREAM_END && ret != Z_BUF_ERROR) || strm.avail_out != 0) { -+ if ((ret == Z_STREAM_END || ret == Z_BUF_ERROR) && strm.avail_out == 0) { - /* - * We approve Z_BUF_ERROR because we need @dest buffer to be filled, but - * @src buffer may be processed partly (because in qcow2 we know size of - * compressed data with precision of one sector) - */ -- ret = -1; -+ ret = 0; -+ } else { -+ ret = -EIO; - } - - inflateEnd(&strm); diff --git a/bundles.tar.xz b/bundles.tar.xz index df16580..11b7010 100644 --- a/bundles.tar.xz +++ b/bundles.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b749677c0f64b90dcc12394d2fa25dd94a3e278a26fa16939c3a641f18c3b7b -size 153360 +oid sha256:7b48585377489cd7edb49ea0ca8195b1340f2d70d1c487aad8a71dd15dc333b3 +size 64676 diff --git a/compat-disable-edid-on-correct-virtio-gp.patch b/compat-disable-edid-on-correct-virtio-gp.patch deleted file mode 100644 index c6384b5..0000000 --- a/compat-disable-edid-on-correct-virtio-gp.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Cornelia Huck -Date: Wed, 18 Mar 2020 10:39:19 +0100 -Subject: compat: disable edid on correct virtio-gpu device -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 02501fc39381c4dabaf6becdd12c2a4754c3847c - -Commit bb15791166c1 ("compat: disable edid on virtio-gpu base -device") tried to disable 'edid' on the virtio-gpu base device. -However, that device is not 'virtio-gpu', but 'virtio-gpu-device'. -Fix it. - -Fixes: bb15791166c1 ("compat: disable edid on virtio-gpu base device") -Reported-by: Lukáš Doktor -Tested-by: Lukáš Doktor -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Cornelia Huck -Message-id: 20200318093919.24942-1-cohuck@redhat.com -Cc: qemu-stable@nongnu.org -Signed-off-by: Cornelia Huck -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - hw/core/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index a15c5a8673ade765965b4e2c8237..cfab784b02ce6076c827c10c9e9c 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -37,7 +37,7 @@ GlobalProperty hw_compat_4_0[] = { - { "secondary-vga", "edid", "false" }, - { "bochs-display", "edid", "false" }, - { "virtio-vga", "edid", "false" }, -- { "virtio-gpu", "edid", "false" }, -+ { "virtio-gpu-device", "edid", "false" }, - { "virtio-device", "use-started", "false" }, - { "virtio-balloon-device", "qemu-4-0-config-size", "true" }, - { "pl031", "migrate-tick-offset", "false" }, diff --git a/config.sh b/config.sh index 5e469f9..eaa12e4 100644 --- a/config.sh +++ b/config.sh @@ -7,17 +7,17 @@ # 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=v4.2.0 +GIT_UPSTREAM_COMMIT_ISH=v5.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. # We can do so by specifing the value here: -SEABIOS_VERSION=1.12.1+ +#SEABIOS_VERSION=1.13.0 # The shared git repo, on which $GIT_LOCAL_TREE is based GIT_TREE=git://github.com/openSUSE/qemu.git @@ -31,7 +31,7 @@ BUNDLE_DIR=/dev/shm/qemu-factory-bundle-dir NUMBERED_PATCHES=0 PATCH_RANGE=1000 -REPO_COUNT=27 +REPO_COUNT=26 # Perhaps we need to instead use the terminal local dirname as the index # and store the ~/git/ as a separate VARIABLE @@ -49,7 +49,6 @@ LOCAL_REPO_MAP=( ~/git/qemu-keycodemapdb ~/git/qemu-slirp ~/git/qemu-u-boot - ~/git/qemu-openhackware ~/git/qemu-qboot ~/git/qemu-dtc ~/git/qemu-opensbi @@ -74,7 +73,6 @@ REQUIRED_LOCAL_REPO_MAP=( ~/git/qemu-ipxe ~/git/qemu-sgabios ~/git/qemu-keycodemapdb - ~/git/qemu-slirp ~/git/qemu-qboot ) @@ -90,7 +88,6 @@ PATCH_PATH_MAP=( "ui/keycodemapdb/" "slirp/" "roms/u-boot/" - "roms/openhackware/" "roms/qboot/" "dtc/" "roms/opensbi/" diff --git a/configure-only-populate-roms-if-softmmu.patch b/configure-only-populate-roms-if-softmmu.patch index ad8753b..e442830 100644 --- a/configure-only-populate-roms-if-softmmu.patch +++ b/configure-only-populate-roms-if-softmmu.patch @@ -12,10 +12,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 09a33aecfd6ef543eeee8c5023b6..94984691ab378620ac2e0ae771ca 100755 +index ef127fb1e0715da446b4a822e3ab..5a0a52e842df70b757252f89b74a 100755 --- a/configure +++ b/configure -@@ -6327,7 +6327,7 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \ +@@ -6495,7 +6495,7 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \ fi # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900 diff --git a/configure-remove-pkgversion-from-CONFIG_.patch b/configure-remove-pkgversion-from-CONFIG_.patch index f273a1d..f492392 100644 --- a/configure-remove-pkgversion-from-CONFIG_.patch +++ b/configure-remove-pkgversion-from-CONFIG_.patch @@ -18,10 +18,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 94984691ab378620ac2e0ae771ca..c68e378776336748b227013a1a3f 100755 +index 5a0a52e842df70b757252f89b74a..790337b204cdfa6d84b1f8524f90 100755 --- a/configure +++ b/configure -@@ -6811,7 +6811,7 @@ fi +@@ -6939,7 +6939,7 @@ fi 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 @@ -29,4 +29,4 @@ index 94984691ab378620ac2e0ae771ca..c68e378776336748b227013a1a3f 100755 + echo "CONFIG_STAMP=_$( (echo $qemu_version; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=y" >> $config_host_mak fi - if test "$have_x11" = "yes" && test "$need_x11" = "yes"; then + if test "$module_upgrades" = "yes"; then diff --git a/display-bochs-display-fix-memory-leak.patch b/display-bochs-display-fix-memory-leak.patch deleted file mode 100644 index 51ace31..0000000 --- a/display-bochs-display-fix-memory-leak.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Cameron Esfahani -Date: Tue, 10 Dec 2019 13:27:54 -0800 -Subject: display/bochs-display: fix memory leak -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit 0d82411d0e38a0de7829f97d04406765c8d2210d - -Fix memory leak in bochs_display_update(). Leaks 304 bytes per frame. - -Fixes: 33ebad54056 -Signed-off-by: Cameron Esfahani -Message-Id: -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - hw/display/bochs-display.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c -index dc1bd1641d3428247204993da0c3..215db9a231d3564289a3e7971098 100644 ---- a/hw/display/bochs-display.c -+++ b/hw/display/bochs-display.c -@@ -252,6 +252,8 @@ static void bochs_display_update(void *opaque) - dpy_gfx_update(s->con, 0, ys, - mode.width, y - ys); - } -+ -+ g_free(snap); - } - } - diff --git a/docs-add-SUSE-support-statements-to-html.patch b/docs-add-SUSE-support-statements-to-html.patch new file mode 100644 index 0000000..3c9612a --- /dev/null +++ b/docs-add-SUSE-support-statements-to-html.patch @@ -0,0 +1,27 @@ +From: Bruce Rogers +Date: Tue, 28 Apr 2020 09:53:49 -0600 +Subject: docs: add SUSE support statements to html docs + +Include-If: %if %{legacy_qemu_kvm} && 0%{?is_opensuse} == 0 + +We can fairly easily produce an html version of our support statements. +Now that qemu includes fairly good html-based documentation, leverage it +to expose our SUSE specific in-package support documentation. + +Signed-off-by: Bruce Rogers +--- + docs/index.html.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/docs/index.html.in b/docs/index.html.in +index e9a160384cfe939a3bccc51e5da9..2a76ade7bfd053f359d7782c7473 100644 +--- a/docs/index.html.in ++++ b/docs/index.html.in +@@ -7,6 +7,7 @@ + +

QEMU @@VERSION@@ Documentation

+
    ++
  • SUSE Support Statements
  • +
  • System Emulation User's Guide
  • +
  • User Mode Emulation User's Guide
  • +
  • Tools Guide
  • diff --git a/gcc10-maybe-uninitialized.patch b/gcc10-maybe-uninitialized.patch index 27f1095..db97a21 100644 --- a/gcc10-maybe-uninitialized.patch +++ b/gcc10-maybe-uninitialized.patch @@ -17,7 +17,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c -index 79e70493fc77e50556a4a92a4231..bc4b71059ff6d922e3cdc83bfc79 100644 +index d08ce6181199aa1e75a7c5bc2157..02f5259e5e33272b17bba701f5d5 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -134,6 +134,7 @@ static void openrisc_sim_init(MachineState *machine) diff --git a/hmat-acpi-Build-Memory-Proximity-Domain-.patch b/hmat-acpi-Build-Memory-Proximity-Domain-.patch deleted file mode 100644 index 980d951..0000000 --- a/hmat-acpi-Build-Memory-Proximity-Domain-.patch +++ /dev/null @@ -1,258 +0,0 @@ -From: Liu Jingqi -Date: Fri, 13 Dec 2019 09:19:25 +0800 -Subject: hmat acpi: Build Memory Proximity Domain Attributes Structure(s) - -Git-commit: e6f123c3b81241be33f1b763d0ff8b36d1ae9c1e -References: jsc#SLE-8897 - -HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table -(HMAT). The specification references below link: -http://www.uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf - -It describes the memory attributes, such as memory side cache -attributes and bandwidth and latency details, related to the -Memory Proximity Domain. The software is -expected to use this information as hint for optimization. - -This structure describes Memory Proximity Domain Attributes by memory -subsystem and its associativity with processor proximity domain as well as -hint for memory usage. - -In the linux kernel, the codes in drivers/acpi/hmat/hmat.c parse and report -the platform's HMAT tables. - -Acked-by: Markus Armbruster -Reviewed-by: Igor Mammedov -Reviewed-by: Daniel Black -Reviewed-by: Jonathan Cameron -Signed-off-by: Liu Jingqi -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-5-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/acpi/Kconfig | 7 ++- - hw/acpi/Makefile.objs | 1 + - hw/acpi/hmat.c | 99 +++++++++++++++++++++++++++++++++++++++++++ - hw/acpi/hmat.h | 42 ++++++++++++++++++ - hw/i386/acpi-build.c | 5 +++ - 5 files changed, 152 insertions(+), 2 deletions(-) - -diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig -index 12e3f1e86e62256bf274b554938b..54209c6f2f17d4ca0a737cb25403 100644 ---- a/hw/acpi/Kconfig -+++ b/hw/acpi/Kconfig -@@ -7,6 +7,7 @@ config ACPI_X86 - select ACPI_NVDIMM - select ACPI_CPU_HOTPLUG - select ACPI_MEMORY_HOTPLUG -+ select ACPI_HMAT - - config ACPI_X86_ICH - bool -@@ -23,6 +24,10 @@ config ACPI_NVDIMM - bool - depends on ACPI - -+config ACPI_HMAT -+ bool -+ depends on ACPI -+ - config ACPI_PCI - bool - depends on ACPI && PCI -@@ -33,5 +38,3 @@ config ACPI_VMGENID - depends on PC - - config ACPI_HW_REDUCED -- bool -- depends on ACPI -diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs -index 655a9c197341fed6fcea2062a30c..517bd88704769d8605dde18a6776 100644 ---- a/hw/acpi/Makefile.objs -+++ b/hw/acpi/Makefile.objs -@@ -7,6 +7,7 @@ common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o - common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o - common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o - common-obj-$(CONFIG_ACPI_HW_REDUCED) += generic_event_device.o -+common-obj-$(CONFIG_ACPI_HMAT) += hmat.o - common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o - - common-obj-y += acpi_interface.o -diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c -new file mode 100644 -index 0000000000000000000000000000000000000000..9ff79308a497fe40a1b0a2f9a043ad3bebb2c3cb ---- /dev/null -+++ b/hw/acpi/hmat.c -@@ -0,0 +1,99 @@ -+/* -+ * HMAT ACPI Implementation -+ * -+ * Copyright(C) 2019 Intel Corporation. -+ * -+ * Author: -+ * Liu jingqi -+ * Tao Xu -+ * -+ * HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table -+ * (HMAT) -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, see -+ */ -+ -+#include "qemu/osdep.h" -+#include "sysemu/numa.h" -+#include "hw/acpi/hmat.h" -+ -+/* -+ * ACPI 6.3: -+ * 5.2.27.3 Memory Proximity Domain Attributes Structure: Table 5-145 -+ */ -+static void build_hmat_mpda(GArray *table_data, uint16_t flags, -+ uint32_t initiator, uint32_t mem_node) -+{ -+ -+ /* Memory Proximity Domain Attributes Structure */ -+ /* Type */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Length */ -+ build_append_int_noprefix(table_data, 40, 4); -+ /* Flags */ -+ build_append_int_noprefix(table_data, flags, 2); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Proximity Domain for the Attached Initiator */ -+ build_append_int_noprefix(table_data, initiator, 4); -+ /* Proximity Domain for the Memory */ -+ build_append_int_noprefix(table_data, mem_node, 4); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 4); -+ /* -+ * Reserved: -+ * Previously defined as the Start Address of the System Physical -+ * Address Range. Deprecated since ACPI Spec 6.3. -+ */ -+ build_append_int_noprefix(table_data, 0, 8); -+ /* -+ * Reserved: -+ * Previously defined as the Range Length of the region in bytes. -+ * Deprecated since ACPI Spec 6.3. -+ */ -+ build_append_int_noprefix(table_data, 0, 8); -+} -+ -+/* Build HMAT sub table structures */ -+static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state) -+{ -+ uint16_t flags; -+ int i; -+ -+ for (i = 0; i < numa_state->num_nodes; i++) { -+ flags = 0; -+ -+ if (numa_state->nodes[i].initiator < MAX_NODES) { -+ flags |= HMAT_PROXIMITY_INITIATOR_VALID; -+ } -+ -+ build_hmat_mpda(table_data, flags, numa_state->nodes[i].initiator, i); -+ } -+} -+ -+void build_hmat(GArray *table_data, BIOSLinker *linker, NumaState *numa_state) -+{ -+ int hmat_start = table_data->len; -+ -+ /* reserve space for HMAT header */ -+ acpi_data_push(table_data, 40); -+ -+ hmat_build_table_structs(table_data, numa_state); -+ -+ build_header(linker, table_data, -+ (void *)(table_data->data + hmat_start), -+ "HMAT", table_data->len - hmat_start, 2, NULL, NULL); -+} -diff --git a/hw/acpi/hmat.h b/hw/acpi/hmat.h -new file mode 100644 -index 0000000000000000000000000000000000000000..437dbc6872e82e4c1ae42a9ff16299465eec052f ---- /dev/null -+++ b/hw/acpi/hmat.h -@@ -0,0 +1,42 @@ -+/* -+ * HMAT ACPI Implementation Header -+ * -+ * Copyright(C) 2019 Intel Corporation. -+ * -+ * Author: -+ * Liu jingqi -+ * Tao Xu -+ * -+ * HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table -+ * (HMAT) -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, see -+ */ -+ -+#ifndef HMAT_H -+#define HMAT_H -+ -+#include "hw/acpi/aml-build.h" -+ -+/* -+ * ACPI 6.3: 5.2.27.3 Memory Proximity Domain Attributes Structure, -+ * Table 5-145, Field "flag", Bit [0]: set to 1 to indicate that data in -+ * the Proximity Domain for the Attached Initiator field is valid. -+ * Other bits reserved. -+ */ -+#define HMAT_PROXIMITY_INITIATOR_VALID 0x1 -+ -+void build_hmat(GArray *table_data, BIOSLinker *linker, NumaState *numa_state); -+ -+#endif -diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c -index 12ff55fcfb543208c18ba44d569e..90a9c2ce6f8c01221efc56f63f79 100644 ---- a/hw/i386/acpi-build.c -+++ b/hw/i386/acpi-build.c -@@ -67,6 +67,7 @@ - #include "hw/i386/intel_iommu.h" - - #include "hw/acpi/ipmi.h" -+#include "hw/acpi/hmat.h" - - /* These are used to size the ACPI tables for -M pc-i440fx-1.7 and - * -M pc-i440fx-2.0. Even if the actual amount of AML generated grows -@@ -2834,6 +2835,10 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) - acpi_add_table(table_offsets, tables_blob); - build_slit(tables_blob, tables->linker, machine); - } -+ if (machine->numa_state->hmat_enabled) { -+ acpi_add_table(table_offsets, tables_blob); -+ build_hmat(tables_blob, tables->linker, machine->numa_state); -+ } - } - if (acpi_get_mcfg(&mcfg)) { - acpi_add_table(table_offsets, tables_blob); diff --git a/hmat-acpi-Build-Memory-Side-Cache-Inform.patch b/hmat-acpi-Build-Memory-Side-Cache-Inform.patch deleted file mode 100644 index c75c89d..0000000 --- a/hmat-acpi-Build-Memory-Side-Cache-Inform.patch +++ /dev/null @@ -1,122 +0,0 @@ -From: Liu Jingqi -Date: Fri, 13 Dec 2019 09:19:27 +0800 -Subject: hmat acpi: Build Memory Side Cache Information Structure(s) - -Git-commit: a9c2b841af002db6e21e1297c9026b63fc22c875 -References: jsc#SLE-8897 - -This structure describes memory side cache information for memory -proximity domains if the memory side cache is present and the -physical device forms the memory side cache. -The software could use this information to effectively place -the data in memory to maximize the performance of the system -memory that use the memory side cache. - -Acked-by: Markus Armbruster -Reviewed-by: Igor Mammedov -Reviewed-by: Daniel Black -Reviewed-by: Jonathan Cameron -Signed-off-by: Liu Jingqi -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-7-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/acpi/hmat.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 68 insertions(+), 1 deletion(-) - -diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c -index 4635d45deeccd34659f6c8325d66..7c24bb53719e497d5cc6cf3f262e 100644 ---- a/hw/acpi/hmat.c -+++ b/hw/acpi/hmat.c -@@ -143,14 +143,62 @@ static void build_hmat_lb(GArray *table_data, HMAT_LB_Info *hmat_lb, - g_free(entry_list); - } - -+/* ACPI 6.3: 5.2.27.5 Memory Side Cache Information Structure: Table 5-147 */ -+static void build_hmat_cache(GArray *table_data, uint8_t total_levels, -+ NumaHmatCacheOptions *hmat_cache) -+{ -+ /* -+ * Cache Attributes: Bits [3:0] – Total Cache Levels -+ * for this Memory Proximity Domain -+ */ -+ uint32_t cache_attr = total_levels; -+ -+ /* Bits [7:4] : Cache Level described in this structure */ -+ cache_attr |= (uint32_t) hmat_cache->level << 4; -+ -+ /* Bits [11:8] - Cache Associativity */ -+ cache_attr |= (uint32_t) hmat_cache->associativity << 8; -+ -+ /* Bits [15:12] - Write Policy */ -+ cache_attr |= (uint32_t) hmat_cache->policy << 12; -+ -+ /* Bits [31:16] - Cache Line size in bytes */ -+ cache_attr |= (uint32_t) hmat_cache->line << 16; -+ -+ /* Type */ -+ build_append_int_noprefix(table_data, 2, 2); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Length */ -+ build_append_int_noprefix(table_data, 32, 4); -+ /* Proximity Domain for the Memory */ -+ build_append_int_noprefix(table_data, hmat_cache->node_id, 4); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 4); -+ /* Memory Side Cache Size */ -+ build_append_int_noprefix(table_data, hmat_cache->size, 8); -+ /* Cache Attributes */ -+ build_append_int_noprefix(table_data, cache_attr, 4); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* -+ * Number of SMBIOS handles (n) -+ * Linux kernel uses Memory Side Cache Information Structure -+ * without SMBIOS entries for now, so set Number of SMBIOS handles -+ * as 0. -+ */ -+ build_append_int_noprefix(table_data, 0, 2); -+} -+ - /* Build HMAT sub table structures */ - static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state) - { - uint16_t flags; - uint32_t num_initiator = 0; - uint32_t initiator_list[MAX_NODES]; -- int i, hierarchy, type; -+ int i, hierarchy, type, cache_level, total_levels; - HMAT_LB_Info *hmat_lb; -+ NumaHmatCacheOptions *hmat_cache; - - for (i = 0; i < numa_state->num_nodes; i++) { - flags = 0; -@@ -184,6 +232,25 @@ static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state) - } - } - } -+ -+ /* -+ * ACPI 6.3: 5.2.27.5 Memory Side Cache Information Structure: -+ * Table 5-147 -+ */ -+ for (i = 0; i < numa_state->num_nodes; i++) { -+ total_levels = 0; -+ for (cache_level = 1; cache_level < HMAT_LB_LEVELS; cache_level++) { -+ if (numa_state->hmat_cache[i][cache_level]) { -+ total_levels++; -+ } -+ } -+ for (cache_level = 0; cache_level <= total_levels; cache_level++) { -+ hmat_cache = numa_state->hmat_cache[i][cache_level]; -+ if (hmat_cache) { -+ build_hmat_cache(table_data, total_levels, hmat_cache); -+ } -+ } -+ } - } - - void build_hmat(GArray *table_data, BIOSLinker *linker, NumaState *numa_state) diff --git a/hmat-acpi-Build-System-Locality-Latency-.patch b/hmat-acpi-Build-System-Locality-Latency-.patch deleted file mode 100644 index 5ae76f5..0000000 --- a/hmat-acpi-Build-System-Locality-Latency-.patch +++ /dev/null @@ -1,159 +0,0 @@ -From: Liu Jingqi -Date: Fri, 13 Dec 2019 09:19:26 +0800 -Subject: hmat acpi: Build System Locality Latency and Bandwidth Information - Structure(s) - -Git-commit: 4586a2cb833f80b19c80ebe364a005ac2fa0974a -References: jsc#SLE-8897 - -This structure describes the memory access latency and bandwidth -information from various memory access initiator proximity domains. -The latency and bandwidth numbers represented in this structure -correspond to rated latency and bandwidth for the platform. -The software could use this information as hint for optimization. - -Acked-by: Markus Armbruster -Reviewed-by: Igor Mammedov -Signed-off-by: Liu Jingqi -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-6-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/acpi/hmat.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 103 insertions(+), 1 deletion(-) - -diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c -index 9ff79308a497fe40a1b0a2f9a043..4635d45deeccd34659f6c8325d66 100644 ---- a/hw/acpi/hmat.c -+++ b/hw/acpi/hmat.c -@@ -25,6 +25,7 @@ - */ - - #include "qemu/osdep.h" -+#include "qemu/units.h" - #include "sysemu/numa.h" - #include "hw/acpi/hmat.h" - -@@ -67,11 +68,89 @@ static void build_hmat_mpda(GArray *table_data, uint16_t flags, - build_append_int_noprefix(table_data, 0, 8); - } - -+/* -+ * ACPI 6.3: 5.2.27.4 System Locality Latency and Bandwidth Information -+ * Structure: Table 5-146 -+ */ -+static void build_hmat_lb(GArray *table_data, HMAT_LB_Info *hmat_lb, -+ uint32_t num_initiator, uint32_t num_target, -+ uint32_t *initiator_list) -+{ -+ int i, index; -+ HMAT_LB_Data *lb_data; -+ uint16_t *entry_list; -+ uint32_t base; -+ /* Length in bytes for entire structure */ -+ uint32_t lb_length -+ = 32 /* Table length upto and including Entry Base Unit */ -+ + 4 * num_initiator /* Initiator Proximity Domain List */ -+ + 4 * num_target /* Target Proximity Domain List */ -+ + 2 * num_initiator * num_target; /* Latency or Bandwidth Entries */ -+ -+ /* Type */ -+ build_append_int_noprefix(table_data, 1, 2); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Length */ -+ build_append_int_noprefix(table_data, lb_length, 4); -+ /* Flags: Bits [3:0] Memory Hierarchy, Bits[7:4] Reserved */ -+ assert(!(hmat_lb->hierarchy >> 4)); -+ build_append_int_noprefix(table_data, hmat_lb->hierarchy, 1); -+ /* Data Type */ -+ build_append_int_noprefix(table_data, hmat_lb->data_type, 1); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 2); -+ /* Number of Initiator Proximity Domains (s) */ -+ build_append_int_noprefix(table_data, num_initiator, 4); -+ /* Number of Target Proximity Domains (t) */ -+ build_append_int_noprefix(table_data, num_target, 4); -+ /* Reserved */ -+ build_append_int_noprefix(table_data, 0, 4); -+ -+ /* Entry Base Unit */ -+ if (hmat_lb->data_type <= HMAT_LB_DATA_WRITE_LATENCY) { -+ /* Convert latency base from nanoseconds to picosecond */ -+ base = hmat_lb->base * 1000; -+ } else { -+ /* Convert bandwidth base from Byte to Megabyte */ -+ base = hmat_lb->base / MiB; -+ } -+ build_append_int_noprefix(table_data, base, 8); -+ -+ /* Initiator Proximity Domain List */ -+ for (i = 0; i < num_initiator; i++) { -+ build_append_int_noprefix(table_data, initiator_list[i], 4); -+ } -+ -+ /* Target Proximity Domain List */ -+ for (i = 0; i < num_target; i++) { -+ build_append_int_noprefix(table_data, i, 4); -+ } -+ -+ /* Latency or Bandwidth Entries */ -+ entry_list = g_malloc0(num_initiator * num_target * sizeof(uint16_t)); -+ for (i = 0; i < hmat_lb->list->len; i++) { -+ lb_data = &g_array_index(hmat_lb->list, HMAT_LB_Data, i); -+ index = lb_data->initiator * num_target + lb_data->target; -+ -+ entry_list[index] = (uint16_t)(lb_data->data / hmat_lb->base); -+ } -+ -+ for (i = 0; i < num_initiator * num_target; i++) { -+ build_append_int_noprefix(table_data, entry_list[i], 2); -+ } -+ -+ g_free(entry_list); -+} -+ - /* Build HMAT sub table structures */ - static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state) - { - uint16_t flags; -- int i; -+ uint32_t num_initiator = 0; -+ uint32_t initiator_list[MAX_NODES]; -+ int i, hierarchy, type; -+ HMAT_LB_Info *hmat_lb; - - for (i = 0; i < numa_state->num_nodes; i++) { - flags = 0; -@@ -82,6 +161,29 @@ static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state) - - build_hmat_mpda(table_data, flags, numa_state->nodes[i].initiator, i); - } -+ -+ for (i = 0; i < numa_state->num_nodes; i++) { -+ if (numa_state->nodes[i].has_cpu) { -+ initiator_list[num_initiator++] = i; -+ } -+ } -+ -+ /* -+ * ACPI 6.3: 5.2.27.4 System Locality Latency and Bandwidth Information -+ * Structure: Table 5-146 -+ */ -+ for (hierarchy = HMAT_LB_MEM_MEMORY; -+ hierarchy <= HMAT_LB_MEM_CACHE_3RD_LEVEL; hierarchy++) { -+ for (type = HMAT_LB_DATA_ACCESS_LATENCY; -+ type <= HMAT_LB_DATA_WRITE_BANDWIDTH; type++) { -+ hmat_lb = numa_state->hmat_lb[hierarchy][type]; -+ -+ if (hmat_lb && hmat_lb->list->len) { -+ build_hmat_lb(table_data, hmat_lb, num_initiator, -+ numa_state->num_nodes, initiator_list); -+ } -+ } -+ } - } - - void build_hmat(GArray *table_data, BIOSLinker *linker, NumaState *numa_state) diff --git a/hmp-vnc-Fix-info-vnc-list-leak.patch b/hmp-vnc-Fix-info-vnc-list-leak.patch deleted file mode 100644 index 2921f74..0000000 --- a/hmp-vnc-Fix-info-vnc-list-leak.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: "Dr. David Alan Gilbert" -Date: Mon, 23 Mar 2020 12:08:22 +0000 -Subject: hmp/vnc: Fix info vnc list leak - -Git-commit: d4ff109373ce871928c7e9ef648973eba642b484 - -We're iterating the list, and then freeing the iteration pointer rather -than the list head. - -Fixes: 0a9667ecdb6d ("hmp: Update info vnc") -Reported-by: Coverity (CID 1421932) -Signed-off-by: Dr. David Alan Gilbert -Message-Id: <20200323120822.51266-1-dgilbert@redhat.com> -Reviewed-by: Peter Maydell -Signed-off-by: Dr. David Alan Gilbert -Signed-off-by: Bruce Rogers ---- - monitor/hmp-cmds.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c -index b2551c16d129291068ce64b5f1fd..2fdc84ec995449b5139a89575e18 100644 ---- a/monitor/hmp-cmds.c -+++ b/monitor/hmp-cmds.c -@@ -729,10 +729,11 @@ static void hmp_info_vnc_servers(Monitor *mon, VncServerInfo2List *server) - - void hmp_info_vnc(Monitor *mon, const QDict *qdict) - { -- VncInfo2List *info2l; -+ VncInfo2List *info2l, *info2l_head; - Error *err = NULL; - - info2l = qmp_query_vnc_servers(&err); -+ info2l_head = info2l; - if (err) { - hmp_handle_error(mon, &err); - return; -@@ -761,7 +762,7 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict) - info2l = info2l->next; - } - -- qapi_free_VncInfo2List(info2l); -+ qapi_free_VncInfo2List(info2l_head); - - } - #endif diff --git a/hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch b/hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch deleted file mode 100644 index df2acb2..0000000 --- a/hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Niek Linnenbank -Date: Thu, 5 Mar 2020 16:09:19 +0000 -Subject: hw/arm/cubieboard: use ARM Cortex-A8 as the default CPU in machine - definition -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 2104df2a1fbf44b2564427aa72fd58d66ce290a7 - -The Cubieboard is a singleboard computer with an Allwinner A10 System-on-Chip [1]. -As documented in the Allwinner A10 User Manual V1.5 [2], the SoC has an ARM -Cortex-A8 processor. Currently the Cubieboard machine definition specifies the -ARM Cortex-A9 in its description and as the default CPU. - -This patch corrects the Cubieboard machine definition to use the ARM Cortex-A8. - -The only user-visible effect is that our textual description of the -machine was wrong, because hw/arm/allwinner-a10.c always creates a -Cortex-A8 CPU regardless of the default value in the MachineClass struct. - - [1] http://docs.cubieboard.org/products/start#cubieboard1 - [2] https://linux-sunxi.org/File:Allwinner_A10_User_manual_V1.5.pdf - -Fixes: 8a863c8120994981a099 -Signed-off-by: Niek Linnenbank -Message-id: 20200227220149.6845-2-nieklinnenbank@gmail.com -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: Peter Maydell -[note in commit message that the bug didn't have much visible effect] -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/cubieboard.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c -index 6dc2f1d6b6f6c87e5241c6bb7718..d8e8919e796d43c9a8a2ca6aa836 100644 ---- a/hw/arm/cubieboard.c -+++ b/hw/arm/cubieboard.c -@@ -78,8 +78,8 @@ static void cubieboard_init(MachineState *machine) - - static void cubieboard_machine_init(MachineClass *mc) - { -- mc->desc = "cubietech cubieboard (Cortex-A9)"; -- mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9"); -+ mc->desc = "cubietech cubieboard (Cortex-A8)"; -+ mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8"); - mc->init = cubieboard_init; - mc->block_default_type = IF_IDE; - mc->units_per_default_bus = 1; diff --git a/hw-arm-smmuv3-Align-stream-table-base-ad.patch b/hw-arm-smmuv3-Align-stream-table-base-ad.patch deleted file mode 100644 index 8103520..0000000 --- a/hw-arm-smmuv3-Align-stream-table-base-ad.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Align stream table base address to table size - -Git-commit: 41678c33aac61261522b74f08595ccf2221a430a - -Per the specification, and as observed in hardware, the SMMUv3 aligns -the SMMU_STRTAB_BASE address to the size of the table by masking out the -respective least significant bits in the ADDR field. - -Apply this masking logic to our smmu_find_ste() lookup function per the -specification. - -ref. ARM IHI 0070C, section 6.3.23. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-5-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c -index 727558bcfa5e782b8a9225adb302..31ac3ca32ebe3c1073350843c8ab 100644 ---- a/hw/arm/smmuv3.c -+++ b/hw/arm/smmuv3.c -@@ -376,8 +376,9 @@ bad_ste: - static int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, - SMMUEventInfo *event) - { -- dma_addr_t addr; -+ dma_addr_t addr, strtab_base; - uint32_t log2size; -+ int strtab_size_shift; - int ret; - - trace_smmuv3_find_ste(sid, s->features, s->sid_split); -@@ -391,10 +392,16 @@ static int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, - } - if (s->features & SMMU_FEATURE_2LVL_STE) { - int l1_ste_offset, l2_ste_offset, max_l2_ste, span; -- dma_addr_t strtab_base, l1ptr, l2ptr; -+ dma_addr_t l1ptr, l2ptr; - STEDesc l1std; - -- strtab_base = s->strtab_base & SMMU_BASE_ADDR_MASK; -+ /* -+ * Align strtab base address to table size. For this purpose, assume it -+ * is not bounded by SMMU_IDR1_SIDSIZE. -+ */ -+ strtab_size_shift = MAX(5, (int)log2size - s->sid_split - 1 + 3); -+ strtab_base = s->strtab_base & SMMU_BASE_ADDR_MASK & -+ ~MAKE_64BIT_MASK(0, strtab_size_shift); - l1_ste_offset = sid >> s->sid_split; - l2_ste_offset = sid & ((1 << s->sid_split) - 1); - l1ptr = (dma_addr_t)(strtab_base + l1_ste_offset * sizeof(l1std)); -@@ -433,7 +440,10 @@ static int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, - } - addr = l2ptr + l2_ste_offset * sizeof(*ste); - } else { -- addr = (s->strtab_base & SMMU_BASE_ADDR_MASK) + sid * sizeof(*ste); -+ strtab_size_shift = log2size + 5; -+ strtab_base = s->strtab_base & SMMU_BASE_ADDR_MASK & -+ ~MAKE_64BIT_MASK(0, strtab_size_shift); -+ addr = strtab_base + sid * sizeof(*ste); - } - - if (smmu_get_ste(s, addr, ste, event)) { diff --git a/hw-arm-smmuv3-Apply-address-mask-to-line.patch b/hw-arm-smmuv3-Apply-address-mask-to-line.patch deleted file mode 100644 index 2742280..0000000 --- a/hw-arm-smmuv3-Apply-address-mask-to-line.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Apply address mask to linear strtab base address - -Git-commit: 3d44c60500785f18bb469c9de0aeba7415c0f28f - -In the SMMU_STRTAB_BASE register, the stream table base address only -occupies bits [51:6]. Other bits, such as RA (bit [62]), must be masked -out to obtain the base address. - -The branch for 2-level stream tables correctly applies this mask by way -of SMMU_BASE_ADDR_MASK, but the one for linear stream tables does not. - -Apply the missing mask in that case as well so that the correct stream -base address is used by guests which configure a linear stream table. - -Linux guests are unaffected by this change because they choose a 2-level -stream table layout for the QEMU SMMUv3, based on the size of its stream -ID space. - -ref. ARM IHI 0070C, section 6.3.23. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-2-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Acked-by: Eric Auger -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c -index e2fbb8357ea521cd4ca6185b3c7a..eef9a18d70f891af08ef7b03235c 100644 ---- a/hw/arm/smmuv3.c -+++ b/hw/arm/smmuv3.c -@@ -429,7 +429,7 @@ static int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, - } - addr = l2ptr + l2_ste_offset * sizeof(*ste); - } else { -- addr = s->strtab_base + sid * sizeof(*ste); -+ addr = (s->strtab_base & SMMU_BASE_ADDR_MASK) + sid * sizeof(*ste); - } - - if (smmu_get_ste(s, addr, ste, event)) { diff --git a/hw-arm-smmuv3-Check-stream-IDs-against-a.patch b/hw-arm-smmuv3-Check-stream-IDs-against-a.patch deleted file mode 100644 index f78c79c..0000000 --- a/hw-arm-smmuv3-Check-stream-IDs-against-a.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Check stream IDs against actual table LOG2SIZE - -Git-commit: 05ff2fb80ce4ca85d8a39d48ff8156de739b4f51 - -When checking whether a stream ID is in range of the stream table, we -have so far been only checking it against our implementation limit -(SMMU_IDR1_SIDSIZE). However, the guest can program the -STRTAB_BASE_CFG.LOG2SIZE field to a size that is smaller than this -limit. - -Check the stream ID against this limit as well to match the hardware -behavior of raising C_BAD_STREAMID events in case the limit is exceeded. -Also, ensure that we do not go one entry beyond the end of the table by -checking that its index is strictly smaller than the table size. - -ref. ARM IHI 0070C, section 6.3.24. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-4-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c -index eef9a18d70f891af08ef7b03235c..727558bcfa5e782b8a9225adb302 100644 ---- a/hw/arm/smmuv3.c -+++ b/hw/arm/smmuv3.c -@@ -377,11 +377,15 @@ static int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, - SMMUEventInfo *event) - { - dma_addr_t addr; -+ uint32_t log2size; - int ret; - - trace_smmuv3_find_ste(sid, s->features, s->sid_split); -- /* Check SID range */ -- if (sid > (1 << SMMU_IDR1_SIDSIZE)) { -+ log2size = FIELD_EX32(s->strtab_base_cfg, STRTAB_BASE_CFG, LOG2SIZE); -+ /* -+ * Check SID range against both guest-configured and implementation limits -+ */ -+ if (sid >= (1 << MIN(log2size, SMMU_IDR1_SIDSIZE))) { - event->type = SMMU_EVT_C_BAD_STREAMID; - return -EINVAL; - } diff --git a/hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch b/hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch deleted file mode 100644 index cac8e9c..0000000 --- a/hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Correct SMMU_BASE_ADDR_MASK value - -Git-commit: 3293b9f514a413e019b7dbc9d543458075b4849e - -There are two issues with the current value of SMMU_BASE_ADDR_MASK: - -- At the lower end, we are clearing bits [4:0]. Per the SMMUv3 spec, - we should also be treating bit 5 as zero in the base address. -- At the upper end, we are clearing bits [63:48]. Per the SMMUv3 spec, - only bits [63:52] must be explicitly treated as zero. - -Update the SMMU_BASE_ADDR_MASK value to mask out bits [63:52] and [5:0]. - -ref. ARM IHI 0070C, section 6.3.23. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-3-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3-internal.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h -index d190181ef1bf3d116ecc48abc1bc..042b4358084b6b87e8b9e42d5622 100644 ---- a/hw/arm/smmuv3-internal.h -+++ b/hw/arm/smmuv3-internal.h -@@ -99,7 +99,7 @@ REG32(GERROR_IRQ_CFG2, 0x74) - - #define A_STRTAB_BASE 0x80 /* 64b */ - --#define SMMU_BASE_ADDR_MASK 0xffffffffffe0 -+#define SMMU_BASE_ADDR_MASK 0xfffffffffffc0 - - REG32(STRTAB_BASE_CFG, 0x88) - FIELD(STRTAB_BASE_CFG, FMT, 16, 2) diff --git a/hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch b/hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch deleted file mode 100644 index 84a7b8c..0000000 --- a/hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Report F_STE_FETCH fault address in correct word - position - -Git-commit: b255cafb59578d16716186ed955717bc8f87bdb7 - -The smmuv3_record_event() function that generates the F_STE_FETCH error -uses the EVT_SET_ADDR macro to record the fetch address, placing it in -32-bit words 4 and 5. - -The correct position for this address is in words 6 and 7, per the -SMMUv3 Architecture Specification. - -Update the function to use the EVT_SET_ADDR2 macro instead, which is the -macro intended for writing to these words. - -ref. ARM IHI 0070C, section 7.3.4. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-7-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Acked-by: Eric Auger -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c -index 31ac3ca32ebe3c1073350843c8ab..8b5f157dc702322b5424ab585b8a 100644 ---- a/hw/arm/smmuv3.c -+++ b/hw/arm/smmuv3.c -@@ -172,7 +172,7 @@ void smmuv3_record_event(SMMUv3State *s, SMMUEventInfo *info) - case SMMU_EVT_F_STE_FETCH: - EVT_SET_SSID(&evt, info->u.f_ste_fetch.ssid); - EVT_SET_SSV(&evt, info->u.f_ste_fetch.ssv); -- EVT_SET_ADDR(&evt, info->u.f_ste_fetch.addr); -+ EVT_SET_ADDR2(&evt, info->u.f_ste_fetch.addr); - break; - case SMMU_EVT_C_BAD_STE: - EVT_SET_SSID(&evt, info->u.c_bad_ste.ssid); diff --git a/hw-arm-smmuv3-Use-correct-bit-positions-.patch b/hw-arm-smmuv3-Use-correct-bit-positions-.patch deleted file mode 100644 index 12149d4..0000000 --- a/hw-arm-smmuv3-Use-correct-bit-positions-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Simon Veith -Date: Fri, 20 Dec 2019 14:03:00 +0000 -Subject: hw/arm/smmuv3: Use correct bit positions in EVT_SET_ADDR2 macro - -Git-commit: a7f65ceb851af5a5b639c6e30801076d848db2c2 - -The bit offsets in the EVT_SET_ADDR2 macro do not match those specified -in the ARM SMMUv3 Architecture Specification. In all events that use -this macro, e.g. F_WALK_EABT, the faulting fetch address or IPA actually -occupies the 32-bit words 6 and 7 in the event record contiguously, with -the upper and lower unused bits clear due to alignment or maximum -supported address bits. How many bits are clear depends on the -individual event type. - -Update the macro to write to the correct words in the event record so -that guest drivers can obtain accurate address information on events. - -ref. ARM IHI 0070C, sections 7.3.12 through 7.3.16. - -Signed-off-by: Simon Veith -Acked-by: Eric Auger -Tested-by: Eric Auger -Message-id: 1576509312-13083-6-git-send-email-sveith@amazon.de -Cc: Eric Auger -Cc: qemu-devel@nongnu.org -Cc: qemu-arm@nongnu.org -Acked-by: Eric Auger -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/arm/smmuv3-internal.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h -index 042b4358084b6b87e8b9e42d5622..4112394129e0069018a5967cb685 100644 ---- a/hw/arm/smmuv3-internal.h -+++ b/hw/arm/smmuv3-internal.h -@@ -461,8 +461,8 @@ typedef struct SMMUEventInfo { - } while (0) - #define EVT_SET_ADDR2(x, addr) \ - do { \ -- (x)->word[7] = deposit32((x)->word[7], 3, 29, addr >> 16); \ -- (x)->word[7] = deposit32((x)->word[7], 0, 16, addr & 0xffff);\ -+ (x)->word[7] = (uint32_t)(addr >> 32); \ -+ (x)->word[6] = (uint32_t)(addr & 0xffffffff); \ - } while (0) - - void smmuv3_record_event(SMMUv3State *s, SMMUEventInfo *event); diff --git a/hw-i386-disable-smbus-migration-for-xenf.patch b/hw-i386-disable-smbus-migration-for-xenf.patch deleted file mode 100644 index 8053484..0000000 --- a/hw-i386-disable-smbus-migration-for-xenf.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Olaf Hering -Date: Wed, 19 Feb 2020 15:15:15 +0100 -Subject: hw/i386: disable smbus migration for xenfv - -References: bsc#1159755 - -With commit 7fccf2a06890e3bc3b30e29827ad3fb93fe88fea a new member -smbus_no_migration_support was added, and enabled in two places. -With commit 4ab2f2a8aabfea95cc53c64e13b3f67960b27fdf the vmstate_acpi -got new elements, which are conditionally filled. As a result, an -incoming migration expected smbus related data unless smbus migration -was disabled for a given MachineClass. - -Since commit 7fccf2a06890e3bc3b30e29827ad3fb93fe88fea forgot to handle -xenfv, live migration to receiving hosts using qemu-4.0 and later is broken. - -Adjust 'xenfv' to stay compatible with with 'pc-i440fx-3.1': - - the toolstack can not use '-M pc-i440fx-3.1,accel=xen -device xen-platform' - because this would move the PCI device from 00:02.0 to 00:04.0 - - disable pvh. - Running PVH may require dedicated device_model_args= options which select - 'pc-i440fx-4.x' - -Signed-off-by: Olaf Hering -Signed-off-by: Bruce Rogers -[BR: Adjust implementation to simply call pc_i440fx_3_1_machine_options] ---- - hw/i386/pc_piix.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index d760d3589607daf4997ea76854c4..000e692d0e5af449270214ea9345 100644 ---- a/hw/i386/pc_piix.c -+++ b/hw/i386/pc_piix.c -@@ -1043,6 +1043,8 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, - #ifdef CONFIG_XEN - static void xenfv_machine_options(MachineClass *m) - { -+ /* compat with pc_i440fx_3_1_machine_options */ -+ pc_i440fx_3_1_machine_options(m); - m->desc = "Xen Fully-virtualized PC"; - m->max_cpus = HVM_MAX_VCPUS; - m->default_machine_opts = "accel=xen"; diff --git a/hw-i386-pc-fix-regression-in-parsing-vga.patch b/hw-i386-pc-fix-regression-in-parsing-vga.patch deleted file mode 100644 index 730b8a9..0000000 --- a/hw-i386-pc-fix-regression-in-parsing-vga.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Peter Wu -Date: Sat, 21 Dec 2019 17:21:24 +0100 -Subject: hw/i386/pc: fix regression in parsing vga cmdline parameter - -Git-commit: a88c40f02ace88f09b2a85a64831b277b2ebc88c - -When the 'vga=' parameter is succeeded by another parameter, QEMU 4.2.0 -would refuse to start with a rather cryptic message: - - $ qemu-system-x86_64 -kernel /boot/vmlinuz-linux -append 'vga=792 quiet' - qemu: can't parse 'vga' parameter: Invalid argument - -It was not clear whether this applied to the '-vga std' parameter or the -'-append' one. Fix the parsing regression and clarify the error. - -Fixes: 133ef074bd ("hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux()") -Cc: Sergio Lopez -Signed-off-by: Peter Wu -Message-Id: <20191221162124.1159291-1-peter@lekensteyn.nl> -Cc: qemu-stable@nongnu.org -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - hw/i386/x86.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/hw/i386/x86.c b/hw/i386/x86.c -index 394edc2f720985c0910396181eeb..121650ae511c3814dcdbb908abdc 100644 ---- a/hw/i386/x86.c -+++ b/hw/i386/x86.c -@@ -508,6 +508,7 @@ void x86_load_linux(X86MachineState *x86ms, - vmode = strstr(kernel_cmdline, "vga="); - if (vmode) { - unsigned int video_mode; -+ const char *end; - int ret; - /* skip "vga=" */ - vmode += 4; -@@ -518,10 +519,9 @@ void x86_load_linux(X86MachineState *x86ms, - } else if (!strncmp(vmode, "ask", 3)) { - video_mode = 0xfffd; - } else { -- ret = qemu_strtoui(vmode, NULL, 0, &video_mode); -- if (ret != 0) { -- fprintf(stderr, "qemu: can't parse 'vga' parameter: %s\n", -- strerror(-ret)); -+ ret = qemu_strtoui(vmode, &end, 0, &video_mode); -+ if (ret != 0 || (*end && *end != ' ')) { -+ fprintf(stderr, "qemu: invalid 'vga=' kernel parameter.\n"); - exit(1); - } - } diff --git a/hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch b/hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch deleted file mode 100644 index ca8a343..0000000 --- a/hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Zenghui Yu -Date: Thu, 30 Jan 2020 16:02:05 +0000 -Subject: hw/intc/arm_gicv3_kvm: Stop wrongly programming GICR_PENDBASER.PTZ - bit - -Git-commit: 618bacabd3c8c3360be795cd8763bacdf5bec101 - -If LPIs are disabled, KVM will just ignore the GICR_PENDBASER.PTZ bit when -restoring GICR_CTLR. Setting PTZ here makes littlt sense in "reduce GIC -initialization time". - -And what's worse, PTZ is generally programmed by guest to indicate to the -Redistributor whether the LPI Pending table is zero when enabling LPIs. -If migration is triggered when the PTZ has just been cleared by guest (and -before enabling LPIs), we will see PTZ==1 on the destination side, which -is not as expected. Let's just drop this hackish userspace behavior. - -Also take this chance to refine the comment a bit. - -Fixes: 367b9f527bec ("hw/intc/arm_gicv3_kvm: Implement get/put functions") -Signed-off-by: Zenghui Yu -Message-id: 20200119133051.642-1-yuzenghui@huawei.com -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - hw/intc/arm_gicv3_kvm.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - -diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c -index 9c7f4ab8711cd7ba780727089a1c..49304ca589d1f016cdfb217bf719 100644 ---- a/hw/intc/arm_gicv3_kvm.c -+++ b/hw/intc/arm_gicv3_kvm.c -@@ -336,7 +336,10 @@ static void kvm_arm_gicv3_put(GICv3State *s) - kvm_gicd_access(s, GICD_CTLR, ®, true); - - if (redist_typer & GICR_TYPER_PLPIS) { -- /* Set base addresses before LPIs are enabled by GICR_CTLR write */ -+ /* -+ * Restore base addresses before LPIs are potentially enabled by -+ * GICR_CTLR write -+ */ - for (ncpu = 0; ncpu < s->num_cpu; ncpu++) { - GICv3CPUState *c = &s->cpu[ncpu]; - -@@ -347,12 +350,6 @@ static void kvm_arm_gicv3_put(GICv3State *s) - kvm_gicr_access(s, GICR_PROPBASER + 4, ncpu, ®h, true); - - reg64 = c->gicr_pendbaser; -- if (!(c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS)) { -- /* Setting PTZ is advised if LPIs are disabled, to reduce -- * GIC initialization time. -- */ -- reg64 |= GICR_PENDBASER_PTZ; -- } - regl = (uint32_t)reg64; - kvm_gicr_access(s, GICR_PENDBASER, ncpu, ®l, true); - regh = (uint32_t)(reg64 >> 32); diff --git a/hw-intc-exynos4210_gic-provide-more-room.patch b/hw-intc-exynos4210_gic-provide-more-room.patch index 760b054..a29c958 100644 --- a/hw-intc-exynos4210_gic-provide-more-room.patch +++ b/hw-intc-exynos4210_gic-provide-more-room.patch @@ -41,7 +41,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c -index a1b699b6babc3105bfd4ad9a8383..17317c961caa9a09c476e9ecbd3f 100644 +index 82c8f4192cbc34fe4c8762846728..50958b31c9173aba84b7443950cb 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -290,8 +290,8 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) @@ -53,5 +53,5 @@ index a1b699b6babc3105bfd4ad9a8383..17317c961caa9a09c476e9ecbd3f 100644 + char cpu_alias_name[sizeof(cpu_prefix) + 7]; + char dist_alias_name[sizeof(cpu_prefix) + 8]; SysBusDevice *gicbusdev; + uint32_t n = s->num_cpu; uint32_t i; - diff --git a/hw-smbios-handle-both-file-formats-regar.patch b/hw-smbios-handle-both-file-formats-regar.patch index bb18a7d..53aa55e 100644 --- a/hw-smbios-handle-both-file-formats-regar.patch +++ b/hw-smbios-handle-both-file-formats-regar.patch @@ -16,10 +16,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c -index 11d476c4a2cbdabc546c02b4f076..570ffa3acfa48b3721bdc578ee57 100644 +index ffd98727ee9e503dfce5e5c92241..a50b5aea6545f1d702278e838cf2 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c -@@ -964,6 +964,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -963,6 +963,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 @@ index 11d476c4a2cbdabc546c02b4f076..570ffa3acfa48b3721bdc578ee57 100644 qemu_opts_validate(opts, qemu_smbios_file_opts, &err); if (err) { -@@ -978,11 +979,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -977,11 +978,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) } /* @@ -53,7 +53,7 @@ index 11d476c4a2cbdabc546c02b4f076..570ffa3acfa48b3721bdc578ee57 100644 header = (struct smbios_structure_header *)(smbios_tables + smbios_tables_len); -@@ -997,6 +1008,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -996,6 +1007,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) header->type); return; } @@ -73,7 +73,7 @@ index 11d476c4a2cbdabc546c02b4f076..570ffa3acfa48b3721bdc578ee57 100644 set_bit(header->type, have_binfile_bitmap); if (header->type == 4) { -@@ -1017,6 +1041,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1016,6 +1040,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. */ diff --git a/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch b/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch index 78ddf5d..ec63d8f 100644 --- a/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +++ b/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch @@ -17,7 +17,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 13 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c -index 7c07295519d33d13fd3755ea7e0a..13815df4737ef8f46e6f857153b1 100644 +index 20717f026bc03922944317f73a68..e640fe183a0b407db555aade6e16 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1722,9 +1722,22 @@ static void usb_mtp_write_metadata(MTPState *s, uint64_t dlen) diff --git a/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch b/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch index a7eac2c..21cb771 100644 --- a/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +++ b/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch @@ -28,10 +28,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index 80988bb305a149f2974d329576a0..00b59bee44f4780727ca0279ced5 100644 +index b330e36fe6cc69a3b47ddd51ccba..8c4e4b66dd33ee482125b98846b7 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3330,6 +3330,7 @@ static void usb_xhci_init(XHCIState *xhci) +@@ -3340,6 +3340,7 @@ static void usb_xhci_init(XHCIState *xhci) usb_bus_new(&xhci->bus, sizeof(xhci->bus), &xhci_bus_ops, dev); for (i = 0; i < usbports; i++) { diff --git a/i386-Add-MSR-feature-bit-for-MDS-NO.patch b/i386-Add-MSR-feature-bit-for-MDS-NO.patch deleted file mode 100644 index ec8800e..0000000 --- a/i386-Add-MSR-feature-bit-for-MDS-NO.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Cathy Zhang -Date: Tue, 22 Oct 2019 15:35:26 +0800 -Subject: i386: Add MSR feature bit for MDS-NO - -Git-commit: 77b168d221191156c47fcd8d1c47329dfdb9439e -References: jsc#SLE-7923 - -Define MSR_ARCH_CAP_MDS_NO in the IA32_ARCH_CAPABILITIES MSR to allow -CPU models to report the feature when host supports it. - -Signed-off-by: Cathy Zhang -Reviewed-by: Xiaoyao Li -Reviewed-by: Tao Xu -Message-Id: <1571729728-23284-2-git-send-email-cathy.zhang@intel.com> -Signed-off-by: Eduardo Habkost -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/target/i386/cpu.h b/target/i386/cpu.h -index cde2a16b941adeb1123d5d7411f3..39d37e12256069b92c7998590849 100644 ---- a/target/i386/cpu.h -+++ b/target/i386/cpu.h -@@ -838,6 +838,7 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; - #define MSR_ARCH_CAP_RSBA (1U << 2) - #define MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY (1U << 3) - #define MSR_ARCH_CAP_SSB_NO (1U << 4) -+#define MSR_ARCH_CAP_MDS_NO (1U << 5) - - #define MSR_CORE_CAP_SPLIT_LOCK_DETECT (1U << 5) - diff --git a/i386-Add-macro-for-stibp.patch b/i386-Add-macro-for-stibp.patch deleted file mode 100644 index bf85f83..0000000 --- a/i386-Add-macro-for-stibp.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Cathy Zhang -Date: Tue, 22 Oct 2019 15:35:27 +0800 -Subject: i386: Add macro for stibp - -Git-commit: 5af514d0cb314f43bc53f2aefb437f6451d64d0c -References: jsc#SLE-7923 - -stibp feature is already added through the following commit. -https://github.com/qemu/qemu/commit/0e8916582991b9fd0b94850a8444b8b80d0a0955 - -Add a macro for it to allow CPU models to report it when host supports. - -Signed-off-by: Cathy Zhang -Reviewed-by: Xiaoyao Li -Reviewed-by: Tao Xu -Message-Id: <1571729728-23284-3-git-send-email-cathy.zhang@intel.com> -Signed-off-by: Eduardo Habkost -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/target/i386/cpu.h b/target/i386/cpu.h -index 39d37e12256069b92c7998590849..af282936a785a25f651d0db1a8cf 100644 ---- a/target/i386/cpu.h -+++ b/target/i386/cpu.h -@@ -771,6 +771,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; - #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) - /* Speculation Control */ - #define CPUID_7_0_EDX_SPEC_CTRL (1U << 26) -+/* Single Thread Indirect Branch Predictors */ -+#define CPUID_7_0_EDX_STIBP (1U << 27) - /* Arch Capabilities */ - #define CPUID_7_0_EDX_ARCH_CAPABILITIES (1U << 29) - /* Core Capability */ diff --git a/i386-Add-new-CPU-model-Cooperlake.patch b/i386-Add-new-CPU-model-Cooperlake.patch deleted file mode 100644 index 4e28774..0000000 --- a/i386-Add-new-CPU-model-Cooperlake.patch +++ /dev/null @@ -1,94 +0,0 @@ -From: Cathy Zhang -Date: Tue, 22 Oct 2019 15:35:28 +0800 -Subject: i386: Add new CPU model Cooperlake - -Git-commit: 22a866b6166db5caa4abaa6e656c2a431fa60726 -References: jsc#SLE-7923 - -Cooper Lake is intel's successor to Cascade Lake, the new -CPU model inherits features from Cascadelake-Server, while -add one platform associated new feature: AVX512_BF16. Meanwhile, -add STIBP for speculative execution. - -Signed-off-by: Cathy Zhang -Reviewed-by: Xiaoyao Li -Reviewed-by: Tao Xu -Message-Id: <1571729728-23284-4-git-send-email-cathy.zhang@intel.com> -Reviewed-by: Bruce Rogers -Signed-off-by: Eduardo Habkost -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 60 insertions(+) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 69f518a21a9b625269b15d9e8ad3..de828e29d8d6a35c1f03bc4a456a 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -3159,6 +3159,66 @@ static X86CPUDefinition builtin_x86_defs[] = { - { /* end of list */ } - } - }, -+ { -+ .name = "Cooperlake", -+ .level = 0xd, -+ .vendor = CPUID_VENDOR_INTEL, -+ .family = 6, -+ .model = 85, -+ .stepping = 10, -+ .features[FEAT_1_EDX] = -+ CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX | -+ CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA | -+ CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 | -+ CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE | -+ CPUID_DE | CPUID_FP87, -+ .features[FEAT_1_ECX] = -+ CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES | -+ CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 | -+ CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 | -+ CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 | -+ CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE | -+ CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND, -+ .features[FEAT_8000_0001_EDX] = -+ CPUID_EXT2_LM | CPUID_EXT2_PDPE1GB | CPUID_EXT2_RDTSCP | -+ CPUID_EXT2_NX | CPUID_EXT2_SYSCALL, -+ .features[FEAT_8000_0001_ECX] = -+ CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH, -+ .features[FEAT_7_0_EBX] = -+ CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 | -+ CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP | -+ CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID | -+ CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX | -+ CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_CLWB | -+ CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ | -+ CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD | -+ CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT, -+ .features[FEAT_7_0_ECX] = -+ CPUID_7_0_ECX_PKU | -+ CPUID_7_0_ECX_AVX512VNNI, -+ .features[FEAT_7_0_EDX] = -+ CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_STIBP | -+ CPUID_7_0_EDX_SPEC_CTRL_SSBD | CPUID_7_0_EDX_ARCH_CAPABILITIES, -+ .features[FEAT_ARCH_CAPABILITIES] = -+ MSR_ARCH_CAP_RDCL_NO | MSR_ARCH_CAP_IBRS_ALL | -+ MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY | MSR_ARCH_CAP_MDS_NO, -+ .features[FEAT_7_1_EAX] = -+ CPUID_7_1_EAX_AVX512_BF16, -+ /* -+ * Missing: XSAVES (not supported by some Linux versions, -+ * including v4.1 to v4.12). -+ * KVM doesn't yet expose any XSAVES state save component, -+ * and the only one defined in Skylake (processor tracing) -+ * probably will block migration anyway. -+ */ -+ .features[FEAT_XSAVE] = -+ CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC | -+ CPUID_XSAVE_XGETBV1, -+ .features[FEAT_6_EAX] = -+ CPUID_6_EAX_ARAT, -+ .xlevel = 0x80000008, -+ .model_id = "Intel Xeon Processor (Cooperlake)", -+ }, - { - .name = "Icelake-Client", - .level = 0xd, diff --git a/i386-Resolve-CPU-models-to-v1-by-default.patch b/i386-Resolve-CPU-models-to-v1-by-default.patch deleted file mode 100644 index eca9a2d..0000000 --- a/i386-Resolve-CPU-models-to-v1-by-default.patch +++ /dev/null @@ -1,83 +0,0 @@ -From: Eduardo Habkost -Date: Thu, 5 Dec 2019 19:33:39 -0300 -Subject: i386: Resolve CPU models to v1 by default - -Git-commit: ad18392892c04637fb56956d997f4bc600224356 - -When using `query-cpu-definitions` using `-machine none`, -QEMU is resolving all CPU models to their latest versions. The -actual CPU model version being used by another machine type (e.g. -`pc-q35-4.0`) might be different. - -In theory, this was OK because the correct CPU model -version is returned when using the correct `-machine` argument. - -Except that in practice, this breaks libvirt expectations: -libvirt always use `-machine none` when checking if a CPU model -is runnable, because runnability is not expected to be affected -when the machine type is changed. - -For example, when running on a Haswell host without TSX, -Haswell-v4 is runnable, but Haswell-v1 is not. On those hosts, -`query-cpu-definitions` says Haswell is runnable if using -`-machine none`, but Haswell is actually not runnable using any -of the `pc-*` machine types (because they resolve Haswell to -Haswell-v1). In other words, we're breaking the "runnability -guarantee" we promised to not break for a few releases (see -qemu-deprecated.texi). - -To address this issue, change the default CPU model version to v1 -on all machine types, so we make `query-cpu-definitions` output -when using `-machine none` match the results when using `pc-*`. -This will change in the future (the plan is to always return the -latest CPU model version if using `-machine none`), but only -after giving libvirt the opportunity to adapt. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1779078 -Signed-off-by: Eduardo Habkost -Message-Id: <20191205223339.764534-1-ehabkost@redhat.com> -Signed-off-by: Eduardo Habkost -Signed-off-by: Bruce Rogers ---- - qemu-deprecated.texi | 8 ++++++++ - target/i386/cpu.c | 8 +++++++- - 2 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi -index 4b4b7425ac1e8f71ad6a2becafb1..b42d8b3c5fbd7e74acc826678a90 100644 ---- a/qemu-deprecated.texi -+++ b/qemu-deprecated.texi -@@ -374,6 +374,14 @@ guarantees must resolve the CPU model aliases using te - ``alias-of'' field returned by the ``query-cpu-definitions'' QMP - command. - -+While those guarantees are kept, the return value of -+``query-cpu-definitions'' will have existing CPU model aliases -+point to a version that doesn't break runnability guarantees -+(specifically, version 1 of those CPU models). In future QEMU -+versions, aliases will point to newer CPU model versions -+depending on the machine type, so management software must -+resolve CPU model aliases before starting a virtual machine. -+ - - @node Recently removed features - @appendix Recently removed features -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index de828e29d8d6a35c1f03bc4a456a..8a1993ac64bd763b7bb70c98b8b8 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -3984,7 +3984,13 @@ static PropValue tcg_default_props[] = { - }; - - --X86CPUVersion default_cpu_version = CPU_VERSION_LATEST; -+/* -+ * We resolve CPU model aliases using -v1 when using "-machine -+ * none", but this is just for compatibility while libvirt isn't -+ * adapted to resolve CPU model versions before creating VMs. -+ * See "Runnability guarantee of CPU models" at * qemu-deprecated.texi. -+ */ -+X86CPUVersion default_cpu_version = 1; - - void x86_cpu_set_default_version(X86CPUVersion version) - { diff --git a/increase-x86_64-physical-bits-to-42.patch b/increase-x86_64-physical-bits-to-42.patch index 62ee2b3..ea60a50 100644 --- a/increase-x86_64-physical-bits-to-42.patch +++ b/increase-x86_64-physical-bits-to-42.patch @@ -18,10 +18,10 @@ Signed-off-by: Andreas Färber 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h -index 594326a7946798aba6ac42415164..5da6b243db2824f79676e4e1bbae 100644 +index e818fc712aca18df805859d10ede..bafc094406d16f6f8c1d41d69ff6 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h -@@ -1934,7 +1934,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); +@@ -1942,7 +1942,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); /* XXX: This value should match the one returned by CPUID * and in exec.c */ # if defined(TARGET_X86_64) diff --git a/intel_iommu-a-fix-to-vtd_find_as_from_bu.patch b/intel_iommu-a-fix-to-vtd_find_as_from_bu.patch deleted file mode 100644 index 3357576..0000000 --- a/intel_iommu-a-fix-to-vtd_find_as_from_bu.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Liu Yi L -Date: Fri, 3 Jan 2020 21:28:05 +0800 -Subject: intel_iommu: a fix to vtd_find_as_from_bus_num() - -Git-commit: a2e1cd41ccfe796529abfd1b6aeb1dd4393762a2 - -Ensure the return value of vtd_find_as_from_bus_num() is NULL by -enforcing vtd_bus=NULL. This would help caller of vtd_find_as_from_bus_num() -to decide if any further operation on the returned vtd_bus. - -Cc: qemu-stable@nongnu.org -Cc: Kevin Tian -Cc: Jacob Pan -Cc: Peter Xu -Cc: Yi Sun -Signed-off-by: Liu Yi L -Signed-off-by: Yi Sun -Message-Id: <1578058086-4288-2-git-send-email-yi.l.liu@intel.com> -Reviewed-by: Peter Xu -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/i386/intel_iommu.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c -index 43c94b993b4ab591067676ed022a..00ebae4863cf7e49368779bd1fc4 100644 ---- a/hw/i386/intel_iommu.c -+++ b/hw/i386/intel_iommu.c -@@ -948,6 +948,7 @@ static VTDBus *vtd_find_as_from_bus_num(IntelIOMMUState *s, uint8_t bus_num) - return vtd_bus; - } - } -+ vtd_bus = NULL; - } - return vtd_bus; - } diff --git a/iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch b/iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch deleted file mode 100644 index 9615f9c..0000000 --- a/iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Max Reitz -Date: Wed, 18 Dec 2019 11:48:55 +0100 -Subject: iotests: Fix IMGOPTSSYNTAX for nbd -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: eb4ea9aaa0051054b3c148ad8631be7510851681 - -There is no $SOCKDIR, only $SOCK_DIR. - -Fixes: f3923a72f199b2c63747a7032db74730546f55c6 -Signed-off-by: Max Reitz -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/common.rc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc -index 6f0582c79af429c14f197b301f5c..555c45391157d58534f0702094bc 100644 ---- a/tests/qemu-iotests/common.rc -+++ b/tests/qemu-iotests/common.rc -@@ -217,7 +217,8 @@ if [ "$IMGOPTSSYNTAX" = "true" ]; then - TEST_IMG="$DRIVER,file.filename=$TEST_DIR/t.$IMGFMT" - elif [ "$IMGPROTO" = "nbd" ]; then - TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT -- TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix,file.path=$SOCKDIR/nbd" -+ TEST_IMG="$DRIVER,file.driver=nbd,file.type=unix" -+ TEST_IMG="$TEST_IMG,file.path=$SOCK_DIR/nbd" - elif [ "$IMGPROTO" = "ssh" ]; then - TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT - TEST_IMG="$DRIVER,file.driver=ssh,file.host=127.0.0.1,file.path=$TEST_IMG_FILE" diff --git a/iotests-Fix-nonportable-use-of-od-endian.patch b/iotests-Fix-nonportable-use-of-od-endian.patch deleted file mode 100644 index de47a61..0000000 --- a/iotests-Fix-nonportable-use-of-od-endian.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Eric Blake -Date: Wed, 26 Feb 2020 06:54:24 -0600 -Subject: iotests: Fix nonportable use of od --endian - -Git-commit: 69135eb30b9c3fca583737a96df015174dc8e6dd - -Tests 261 and 272 fail on RHEL 7 with coreutils 8.22, since od ---endian was not added until coreutils 8.23. Fix this by manually -constructing the final value one byte at a time. - -Fixes: fc8ba423 -Reported-by: Andrey Shinkevich -Signed-off-by: Eric Blake -Reviewed-by: Max Reitz -Message-Id: <20200226125424.481840-1-eblake@redhat.com> -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/common.rc | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc -index 555c45391157d58534f0702094bc..315a9a8a4690d68abc0eb5fa83fd 100644 ---- a/tests/qemu-iotests/common.rc -+++ b/tests/qemu-iotests/common.rc -@@ -56,18 +56,30 @@ poke_file() - # peek_file_le 'test.img' 512 2 => 65534 - peek_file_le() - { -- # Wrap in echo $() to strip spaces -- echo $(od -j"$2" -N"$3" --endian=little -An -vtu"$3" "$1") -+ local val=0 shift=0 byte -+ -+ # coreutils' od --endian is not portable, so manually assemble bytes. -+ for byte in $(od -j"$2" -N"$3" -An -v -tu1 "$1"); do -+ val=$(( val | (byte << shift) )) -+ shift=$((shift + 8)) -+ done -+ printf %llu $val - } - - # peek_file_be 'test.img' 512 2 => 65279 - peek_file_be() - { -- # Wrap in echo $() to strip spaces -- echo $(od -j"$2" -N"$3" --endian=big -An -vtu"$3" "$1") -+ local val=0 byte -+ -+ # coreutils' od --endian is not portable, so manually assemble bytes. -+ for byte in $(od -j"$2" -N"$3" -An -v -tu1 "$1"); do -+ val=$(( (val << 8) | byte )) -+ done -+ printf %llu $val - } - --# peek_file_raw 'test.img' 512 2 => '\xff\xfe' -+# peek_file_raw 'test.img' 512 2 => '\xff\xfe'. Do not use if the raw data -+# is likely to contain \0 or trailing \n. - peek_file_raw() - { - dd if="$1" bs=1 skip="$2" count="$3" status=none diff --git a/iotests-Provide-a-function-for-checking-.patch b/iotests-Provide-a-function-for-checking-.patch deleted file mode 100644 index b5a3525..0000000 --- a/iotests-Provide-a-function-for-checking-.patch +++ /dev/null @@ -1,82 +0,0 @@ -From: Thomas Huth -Date: Wed, 4 Dec 2019 16:46:12 +0100 -Subject: iotests: Provide a function for checking the creation of huge files -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 30729ae93b7e123e472a2d42792134ae39bf9df0 - -Some tests create huge (but sparse) files, and to be able to run those -tests in certain limited environments (like CI containers), we have to -check for the possibility to create such files first. Thus let's introduce -a common function to check for large files, and replace the already -existing checks in the iotests 005 and 220 with this function. - -Reviewed-by: Alex Bennée -Signed-off-by: Thomas Huth -Reviewed-by: Cleber Rosa -Tested-by: Cleber Rosa -Reviewed-by: Philippe Mathieu-Daudé -Message-Id: <20191204154618.23560-2-thuth@redhat.com> -Signed-off-by: Alex Bennée -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/005 | 5 +---- - tests/qemu-iotests/220 | 6 ++---- - tests/qemu-iotests/common.rc | 10 ++++++++++ - 3 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/tests/qemu-iotests/005 b/tests/qemu-iotests/005 -index 58442762fe366d0f5eb9bf7a1860..b6d03ac37deabcbf6372ffb17113 100755 ---- a/tests/qemu-iotests/005 -+++ b/tests/qemu-iotests/005 -@@ -59,10 +59,7 @@ fi - # Sanity check: For raw, we require a file system that permits the creation - # of a HUGE (but very sparse) file. Check we can create it before continuing. - if [ "$IMGFMT" = "raw" ]; then -- if ! truncate --size=5T "$TEST_IMG"; then -- _notrun "file system on $TEST_DIR does not support large enough files" -- fi -- rm "$TEST_IMG" -+ _require_large_file 5T - fi - - echo -diff --git a/tests/qemu-iotests/220 b/tests/qemu-iotests/220 -index 2d62c5dcac2a258ed82cd4bca775..15159270d33550e4649a25fe772e 100755 ---- a/tests/qemu-iotests/220 -+++ b/tests/qemu-iotests/220 -@@ -42,10 +42,8 @@ echo "== Creating huge file ==" - - # Sanity check: We require a file system that permits the creation - # of a HUGE (but very sparse) file. tmpfs works, ext4 does not. --if ! truncate --size=513T "$TEST_IMG"; then -- _notrun "file system on $TEST_DIR does not support large enough files" --fi --rm "$TEST_IMG" -+_require_large_file 513T -+ - IMGOPTS='cluster_size=2M,refcount_bits=1' _make_test_img 513T - - echo "== Populating refcounts ==" -diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc -index 0cc8acc9edd23e1cadf942676882..6f0582c79af429c14f197b301f5c 100644 ---- a/tests/qemu-iotests/common.rc -+++ b/tests/qemu-iotests/common.rc -@@ -643,5 +643,15 @@ _require_drivers() - done - } - -+# Check that we have a file system that allows huge (but very sparse) files -+# -+_require_large_file() -+{ -+ if ! truncate --size="$1" "$TEST_IMG"; then -+ _notrun "file system on $TEST_DIR does not support large enough files" -+ fi -+ rm "$TEST_IMG" -+} -+ - # make sure this script returns success - true diff --git a/iotests-Skip-test-060-if-it-is-not-possi.patch b/iotests-Skip-test-060-if-it-is-not-possi.patch deleted file mode 100644 index eba8285..0000000 --- a/iotests-Skip-test-060-if-it-is-not-possi.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Thomas Huth -Date: Mon, 2 Dec 2019 11:16:30 +0100 -Subject: iotests: Skip test 060 if it is not possible to create large files - -Git-commit: efd0e5a1215bbdfd28168485800f5cfec9735cf8 - -Test 060 fails in the arm64, s390x and ppc64le LXD containers on Travis -(which we will hopefully enable in our CI soon). These containers -apparently do not allow large files to be created. The repair process -in test 060 creates a file of 64 GiB, so test first whether such large -files are possible and skip the test if that's not the case. - -Signed-off-by: Thomas Huth -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/060 | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 -index b91d8321bb8d20d1033a3081acf4..d96f17a4846979aa3cb86c8388fa 100755 ---- a/tests/qemu-iotests/060 -+++ b/tests/qemu-iotests/060 -@@ -49,6 +49,9 @@ _supported_fmt qcow2 - _supported_proto file - _supported_os Linux - -+# The repair process will create a large file - so check for availability first -+_require_large_file 64G -+ - rt_offset=65536 # 0x10000 (XXX: just an assumption) - rb_offset=131072 # 0x20000 (XXX: just an assumption) - l1_offset=196608 # 0x30000 (XXX: just an assumption) diff --git a/iotests-Skip-test-079-if-it-is-not-possi.patch b/iotests-Skip-test-079-if-it-is-not-possi.patch deleted file mode 100644 index 6c36d23..0000000 --- a/iotests-Skip-test-079-if-it-is-not-possi.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Thomas Huth -Date: Mon, 2 Dec 2019 11:16:31 +0100 -Subject: iotests: Skip test 079 if it is not possible to create large files - -Git-commit: e28582fdb28b2e8b29a351c20b0c8f1af4120688 - -Test 079 fails in the arm64, s390x and ppc64le LXD containers on Travis -(which we will hopefully enable in our CI soon). These containers -apparently do not allow large files to be created. Test 079 tries to -create a 4G sparse file, which is apparently already too big for these -containers, so check first whether we can really create such files before -executing the test. - -Signed-off-by: Thomas Huth -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/079 | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tests/qemu-iotests/079 b/tests/qemu-iotests/079 -index 81f0c21f530287b2c833eefd735d..78536d3bbfa01fc0575d31d1f680 100755 ---- a/tests/qemu-iotests/079 -+++ b/tests/qemu-iotests/079 -@@ -39,6 +39,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 - _supported_fmt qcow2 - _supported_proto file nfs - -+# Some containers (e.g. non-x86 on Travis) do not allow large files -+_require_large_file 4G -+ - echo "=== Check option preallocation and cluster_size ===" - echo - cluster_sizes="16384 32768 65536 131072 262144 524288 1048576 2097152 4194304" diff --git a/iotests-add-test-for-backup-top-failure-.patch b/iotests-add-test-for-backup-top-failure-.patch deleted file mode 100644 index fff92b7..0000000 --- a/iotests-add-test-for-backup-top-failure-.patch +++ /dev/null @@ -1,140 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 21 Jan 2020 17:28:02 +0300 -Subject: iotests: add test for backup-top failure on permission activation - -Git-commit: a541fcc27c98b96da187c7d4573f3270f3ddd283 - -This test checks that bug is really fixed by previous commit. - -Cc: qemu-stable@nongnu.org # v4.2.0 -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-id: 20200121142802.21467-3-vsementsov@virtuozzo.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - tests/qemu-iotests/283 | 92 ++++++++++++++++++++++++++++++++++++++ - tests/qemu-iotests/283.out | 8 ++++ - tests/qemu-iotests/group | 1 + - 3 files changed, 101 insertions(+) - -diff --git a/tests/qemu-iotests/283 b/tests/qemu-iotests/283 -new file mode 100644 -index 0000000000000000000000000000000000000000..293e557bd95f0553624fba89cd555614ff4a8c1b ---- /dev/null -+++ b/tests/qemu-iotests/283 -@@ -0,0 +1,92 @@ -+#!/usr/bin/env python -+# -+# Test for backup-top filter permission activation failure -+# -+# Copyright (c) 2019 Virtuozzo International GmbH. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+# -+ -+import iotests -+ -+# The test is unrelated to formats, restrict it to qcow2 to avoid extra runs -+iotests.verify_image_format(supported_fmts=['qcow2']) -+ -+size = 1024 * 1024 -+ -+""" Test description -+ -+When performing a backup, all writes on the source subtree must go through the -+backup-top filter so it can copy all data to the target before it is changed. -+backup-top filter is appended above source node, to achieve this thing, so all -+parents of source node are handled. A configuration with side parents of source -+sub-tree with write permission is unsupported (we'd have append several -+backup-top filter like nodes to handle such parents). The test create an -+example of such configuration and checks that a backup is then not allowed -+(blockdev-backup command should fail). -+ -+The configuration: -+ -+ ┌────────┐ target ┌─────────────┐ -+ │ target │ ◀─────── │ backup_top │ -+ └────────┘ └─────────────┘ -+ │ -+ │ backing -+ ▼ -+ ┌─────────────┐ -+ │ source │ -+ └─────────────┘ -+ │ -+ │ file -+ ▼ -+ ┌─────────────┐ write perm ┌───────┐ -+ │ base │ ◀──────────── │ other │ -+ └─────────────┘ └───────┘ -+ -+On activation (see .active field of backup-top state in block/backup-top.c), -+backup-top is going to unshare write permission on its source child. Write -+unsharing will be propagated to the "source->base" link and will conflict with -+other node write permission. So permission update will fail and backup job will -+not be started. -+ -+Note, that the only thing which prevents backup of running on such -+configuration is default permission propagation scheme. It may be altered by -+different block drivers, so backup will run in invalid configuration. But -+something is better than nothing. Also, before the previous commit (commit -+preceding this test creation), starting backup on such configuration led to -+crash, so current "something" is a lot better, and this test actual goal is -+to check that crash is fixed :) -+""" -+ -+vm = iotests.VM() -+vm.launch() -+ -+vm.qmp_log('blockdev-add', **{'node-name': 'target', 'driver': 'null-co'}) -+ -+vm.qmp_log('blockdev-add', **{ -+ 'node-name': 'source', -+ 'driver': 'blkdebug', -+ 'image': {'node-name': 'base', 'driver': 'null-co', 'size': size} -+}) -+ -+vm.qmp_log('blockdev-add', **{ -+ 'node-name': 'other', -+ 'driver': 'blkdebug', -+ 'image': 'base', -+ 'take-child-perms': ['write'] -+}) -+ -+vm.qmp_log('blockdev-backup', sync='full', device='source', target='target') -+ -+vm.shutdown() -diff --git a/tests/qemu-iotests/283.out b/tests/qemu-iotests/283.out -new file mode 100644 -index 0000000000000000000000000000000000000000..daaf5828c18ee463671ec916989846f94c9f4b31 ---- /dev/null -+++ b/tests/qemu-iotests/283.out -@@ -0,0 +1,8 @@ -+{"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "target"}} -+{"return": {}} -+{"execute": "blockdev-add", "arguments": {"driver": "blkdebug", "image": {"driver": "null-co", "node-name": "base", "size": 1048576}, "node-name": "source"}} -+{"return": {}} -+{"execute": "blockdev-add", "arguments": {"driver": "blkdebug", "image": "base", "node-name": "other", "take-child-perms": ["write"]}} -+{"return": {}} -+{"execute": "blockdev-backup", "arguments": {"device": "source", "sync": "full", "target": "target"}} -+{"error": {"class": "GenericError", "desc": "Cannot set permissions for backup-top filter: Conflicts with use by other as 'image', which uses 'write' on base"}} -diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index 6b10a6a762143ec0d079b7fd6df2..1c1b69f0581c9a0043376b440600 100644 ---- a/tests/qemu-iotests/group -+++ b/tests/qemu-iotests/group -@@ -286,3 +286,4 @@ - 272 rw - 273 backing quick - 277 rw quick -+283 auto quick diff --git a/iscsi-Cap-block-count-from-GET-LBA-STATU.patch b/iscsi-Cap-block-count-from-GET-LBA-STATU.patch deleted file mode 100644 index b55365a..0000000 --- a/iscsi-Cap-block-count-from-GET-LBA-STATU.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Felipe Franciosi -Date: Thu, 23 Jan 2020 12:44:59 +0000 -Subject: iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711) - -Git-commit: 693fd2acdf14dd86c0bf852610f1c2cca80a74dc -References: bsc#1166240, CVE-2020-1711 - -When querying an iSCSI server for the provisioning status of blocks (via -GET LBA STATUS), Qemu only validates that the response descriptor zero's -LBA matches the one requested. Given the SCSI spec allows servers to -respond with the status of blocks beyond the end of the LUN, Qemu may -have its heap corrupted by clearing/setting too many bits at the end of -its allocmap for the LUN. - -A malicious guest in control of the iSCSI server could carefully program -Qemu's heap (by selectively setting the bitmap) and then smash it. - -This limits the number of bits that iscsi_co_block_status() will try to -update in the allocmap so it can't overflow the bitmap. - -Fixes: CVE-2020-1711 -Cc: qemu-stable@nongnu.org -Signed-off-by: Felipe Franciosi -Signed-off-by: Peter Turschmid -Signed-off-by: Raphael Norwitz -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/iscsi.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/block/iscsi.c b/block/iscsi.c -index 2aea7e3f13f73662a838d2f8187f..cbd57294ab4417a33657af0fbce8 100644 ---- a/block/iscsi.c -+++ b/block/iscsi.c -@@ -701,7 +701,7 @@ static int coroutine_fn iscsi_co_block_status(BlockDriverState *bs, - struct scsi_get_lba_status *lbas = NULL; - struct scsi_lba_status_descriptor *lbasd = NULL; - struct IscsiTask iTask; -- uint64_t lba; -+ uint64_t lba, max_bytes; - int ret; - - iscsi_co_init_iscsitask(iscsilun, &iTask); -@@ -721,6 +721,7 @@ static int coroutine_fn iscsi_co_block_status(BlockDriverState *bs, - } - - lba = offset / iscsilun->block_size; -+ max_bytes = (iscsilun->num_blocks - lba) * iscsilun->block_size; - - qemu_mutex_lock(&iscsilun->mutex); - retry: -@@ -764,7 +765,7 @@ retry: - goto out_unlock; - } - -- *pnum = (int64_t) lbasd->num_blocks * iscsilun->block_size; -+ *pnum = MIN((int64_t) lbasd->num_blocks * iscsilun->block_size, max_bytes); - - if (lbasd->provisioning == SCSI_PROVISIONING_TYPE_DEALLOCATED || - lbasd->provisioning == SCSI_PROVISIONING_TYPE_ANCHORED) { diff --git a/job-refactor-progress-to-separate-object.patch b/job-refactor-progress-to-separate-object.patch deleted file mode 100644 index f31d44c..0000000 --- a/job-refactor-progress-to-separate-object.patch +++ /dev/null @@ -1,223 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Wed, 11 Mar 2020 13:29:56 +0300 -Subject: job: refactor progress to separate object - -Git-commit: 01fe1ca945345d3dc420d70c69488143dc0451b1 - -We need it in separate to pass to the block-copy object in the next -commit. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Andrey Shinkevich -Reviewed-by: Max Reitz -Message-Id: <20200311103004.7649-2-vsementsov@virtuozzo.com> -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - blockjob.c | 16 +++++----- - include/qemu/job.h | 11 ++----- - include/qemu/progress_meter.h | 58 +++++++++++++++++++++++++++++++++++ - job-qmp.c | 4 +-- - job.c | 6 ++-- - qemu-img.c | 6 ++-- - 6 files changed, 76 insertions(+), 25 deletions(-) - -diff --git a/blockjob.c b/blockjob.c -index c6e20e2fcde53c82146cb45efd87..701bd2588d5ca58826bad00e498d 100644 ---- a/blockjob.c -+++ b/blockjob.c -@@ -298,8 +298,8 @@ BlockJobInfo *block_job_query(BlockJob *job, Error **errp) - info->device = g_strdup(job->job.id); - info->busy = atomic_read(&job->job.busy); - info->paused = job->job.pause_count > 0; -- info->offset = job->job.progress_current; -- info->len = job->job.progress_total; -+ info->offset = job->job.progress.current; -+ info->len = job->job.progress.total; - info->speed = job->speed; - info->io_status = job->iostatus; - info->ready = job_is_ready(&job->job), -@@ -329,8 +329,8 @@ static void block_job_event_cancelled(Notifier *n, void *opaque) - - qapi_event_send_block_job_cancelled(job_type(&job->job), - job->job.id, -- job->job.progress_total, -- job->job.progress_current, -+ job->job.progress.total, -+ job->job.progress.current, - job->speed); - } - -@@ -349,8 +349,8 @@ static void block_job_event_completed(Notifier *n, void *opaque) - - qapi_event_send_block_job_completed(job_type(&job->job), - job->job.id, -- job->job.progress_total, -- job->job.progress_current, -+ job->job.progress.total, -+ job->job.progress.current, - job->speed, - !!msg, - msg); -@@ -378,8 +378,8 @@ static void block_job_event_ready(Notifier *n, void *opaque) - - qapi_event_send_block_job_ready(job_type(&job->job), - job->job.id, -- job->job.progress_total, -- job->job.progress_current, -+ job->job.progress.total, -+ job->job.progress.current, - job->speed); - } - -diff --git a/include/qemu/job.h b/include/qemu/job.h -index bd59cd8944de41304d8f78dce94c..32aabb1c60009825ca4a921b7864 100644 ---- a/include/qemu/job.h -+++ b/include/qemu/job.h -@@ -28,6 +28,7 @@ - - #include "qapi/qapi-types-job.h" - #include "qemu/queue.h" -+#include "qemu/progress_meter.h" - #include "qemu/coroutine.h" - #include "block/aio.h" - -@@ -117,15 +118,7 @@ typedef struct Job { - /** True if this job should automatically dismiss itself */ - bool auto_dismiss; - -- /** -- * Current progress. The unit is arbitrary as long as the ratio between -- * progress_current and progress_total represents the estimated percentage -- * of work already done. -- */ -- int64_t progress_current; -- -- /** Estimated progress_current value at the completion of the job */ -- int64_t progress_total; -+ ProgressMeter progress; - - /** - * Return code from @run and/or @prepare callback(s). -diff --git a/include/qemu/progress_meter.h b/include/qemu/progress_meter.h -new file mode 100644 -index 0000000000000000000000000000000000000000..9a23ff071c4c327c099eb5b4ec3e9d6505b298ef ---- /dev/null -+++ b/include/qemu/progress_meter.h -@@ -0,0 +1,58 @@ -+/* -+ * Helper functionality for some process progress tracking. -+ * -+ * Copyright (c) 2011 IBM Corp. -+ * Copyright (c) 2012, 2018 Red Hat, Inc. -+ * Copyright (c) 2020 Virtuozzo International GmbH -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a copy -+ * of this software and associated documentation files (the "Software"), to deal -+ * in the Software without restriction, including without limitation the rights -+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -+ * copies of the Software, and to permit persons to whom the Software is -+ * furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -+ * THE SOFTWARE. -+ */ -+ -+#ifndef QEMU_PROGRESS_METER_H -+#define QEMU_PROGRESS_METER_H -+ -+typedef struct ProgressMeter { -+ /** -+ * Current progress. The unit is arbitrary as long as the ratio between -+ * current and total represents the estimated percentage -+ * of work already done. -+ */ -+ uint64_t current; -+ -+ /** Estimated current value at the completion of the process */ -+ uint64_t total; -+} ProgressMeter; -+ -+static inline void progress_work_done(ProgressMeter *pm, uint64_t done) -+{ -+ pm->current += done; -+} -+ -+static inline void progress_set_remaining(ProgressMeter *pm, uint64_t remaining) -+{ -+ pm->total = pm->current + remaining; -+} -+ -+static inline void progress_increase_remaining(ProgressMeter *pm, -+ uint64_t delta) -+{ -+ pm->total += delta; -+} -+ -+#endif /* QEMU_PROGRESS_METER_H */ -diff --git a/job-qmp.c b/job-qmp.c -index fbfed25a00067c5035bfde3d7b89..fecc939ebd951aa3bb863400b71c 100644 ---- a/job-qmp.c -+++ b/job-qmp.c -@@ -143,8 +143,8 @@ static JobInfo *job_query_single(Job *job, Error **errp) - .id = g_strdup(job->id), - .type = job_type(job), - .status = job->status, -- .current_progress = job->progress_current, -- .total_progress = job->progress_total, -+ .current_progress = job->progress.current, -+ .total_progress = job->progress.total, - .has_error = !!job->err, - .error = job->err ? \ - g_strdup(error_get_pretty(job->err)) : NULL, -diff --git a/job.c b/job.c -index 04409b40aab3545798414bda1a87..134a07b92e5ef05a52bee7e21a96 100644 ---- a/job.c -+++ b/job.c -@@ -369,17 +369,17 @@ void job_unref(Job *job) - - void job_progress_update(Job *job, uint64_t done) - { -- job->progress_current += done; -+ progress_work_done(&job->progress, done); - } - - void job_progress_set_remaining(Job *job, uint64_t remaining) - { -- job->progress_total = job->progress_current + remaining; -+ progress_set_remaining(&job->progress, remaining); - } - - void job_progress_increase_remaining(Job *job, uint64_t delta) - { -- job->progress_total += delta; -+ progress_increase_remaining(&job->progress, delta); - } - - void job_event_cancelled(Job *job) -diff --git a/qemu-img.c b/qemu-img.c -index 95a24b9762b0b00ef13f68cd4251..9ae07bbc80bd1fa0e6e20a04ec73 100644 ---- a/qemu-img.c -+++ b/qemu-img.c -@@ -881,9 +881,9 @@ static void run_block_job(BlockJob *job, Error **errp) - do { - float progress = 0.0f; - aio_poll(aio_context, true); -- if (job->job.progress_total) { -- progress = (float)job->job.progress_current / -- job->job.progress_total * 100.f; -+ if (job->job.progress.total) { -+ progress = (float)job->job.progress.current / -+ job->job.progress.total * 100.f; - } - qemu_progress_print(progress, 0); - } while (!job_is_ready(&job->job) && !job_is_completed(&job->job)); diff --git a/linux-user-Fake-proc-cpuinfo.patch b/linux-user-Fake-proc-cpuinfo.patch index 5155876..3513ef8 100644 --- a/linux-user-Fake-proc-cpuinfo.patch +++ b/linux-user-Fake-proc-cpuinfo.patch @@ -21,10 +21,10 @@ Signed-off-by: Andreas Färber 1 file changed, 24 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 57be4c98555e50f2263811cd11f4..243ec2a1e3bde8e6b3ac48989554 100644 +index 894627b9dc8d4f72c06bab90aa9b..39b824760a29765dc9538d8574e5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7068,6 +7068,27 @@ static int open_self_stat(void *cpu_env, int fd) +@@ -7344,6 +7344,27 @@ static int open_self_stat(void *cpu_env, int fd) return 0; } @@ -52,7 +52,7 @@ index 57be4c98555e50f2263811cd11f4..243ec2a1e3bde8e6b3ac48989554 100644 static int open_self_auxv(void *cpu_env, int fd) { CPUState *cpu = env_cpu((CPUArchState *)cpu_env); -@@ -7210,6 +7231,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, +@@ -7486,6 +7507,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, #if defined(TARGET_SPARC) { "/proc/cpuinfo", open_cpuinfo, is_proc }, #endif diff --git a/linux-user-add-binfmt-wrapper-for-argv-0.patch b/linux-user-add-binfmt-wrapper-for-argv-0.patch index c05b021..9ebc2f8 100644 --- a/linux-user-add-binfmt-wrapper-for-argv-0.patch +++ b/linux-user-add-binfmt-wrapper-for-argv-0.patch @@ -30,12 +30,12 @@ Signed-off-by: Alexander Graf Signed-off-by: Andreas Färber --- Makefile.target | 13 +++++++++++++ - linux-user/Makefile.objs | 2 ++ + linux-user/Makefile.objs | 1 + linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 57 insertions(+) + 3 files changed, 56 insertions(+) diff --git a/Makefile.target b/Makefile.target -index 24d79d26ebd00034bd97309fe5a7..1e9600834a25544063c313eba92a 100644 +index 8ed1eba95b9c29ab4e47349cbdb2..8b5d84006cb32d4463f13059de93 100644 --- a/Makefile.target +++ b/Makefile.target @@ -39,6 +39,10 @@ endif @@ -49,7 +49,7 @@ index 24d79d26ebd00034bd97309fe5a7..1e9600834a25544063c313eba92a 100644 config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak -@@ -133,6 +137,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ +@@ -134,6 +138,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ obj-y += linux-user/ obj-y += gdbstub.o thunk.o @@ -58,7 +58,7 @@ index 24d79d26ebd00034bd97309fe5a7..1e9600834a25544063c313eba92a 100644 endif #CONFIG_LINUX_USER ######################################################### -@@ -174,7 +180,11 @@ generated-files-y += config-devices.h +@@ -176,7 +182,11 @@ generated-files-y += config-devices.h endif # CONFIG_SOFTMMU @@ -81,14 +81,13 @@ index 24d79d26ebd00034bd97309fe5a7..1e9600834a25544063c313eba92a 100644 $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES),"GEN","$(TARGET_DIR)$@") diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs -index d2f33beb5e52efce6adc7fb85b7f..ffc6b095e253d4c448000a974d4d 100644 +index 1940910a7321c5a44d29c2602f9e..84c770a6cb58193d73afdffa2b01 100644 --- a/linux-user/Makefile.objs +++ b/linux-user/Makefile.objs -@@ -8,3 +8,5 @@ obj-$(TARGET_I386) += vm86.o - obj-$(TARGET_ARM) += arm/nwfpe/ - obj-$(TARGET_ARM) += arm/semihost.o - obj-$(TARGET_AARCH64) += arm/semihost.o -+ +@@ -23,3 +23,4 @@ obj-$(TARGET_SPARC) += sparc/ + obj-$(TARGET_SPARC64) += $(TARGET_ABI_DIR)/ + obj-$(TARGET_X86_64) += x86_64/ + obj-$(TARGET_XTENSA) += xtensa/ +obj-binfmt-y = binfmt.o diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c new file mode 100644 diff --git a/linux-user-lseek-explicitly-cast-non-set.patch b/linux-user-lseek-explicitly-cast-non-set.patch index 4106bb8..343d8d7 100644 --- a/linux-user-lseek-explicitly-cast-non-set.patch +++ b/linux-user-lseek-explicitly-cast-non-set.patch @@ -15,10 +15,10 @@ Signed-off-by: Alexander Graf 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 61d976cca146a6deb2d74c95ec59..926a7dd587b39d0615cbbb077ef2 100644 +index 0317c64f4ae460c972fe4fe67ef8..6ada54d3a19e455c0c12a1d4b321 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7729,8 +7729,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, +@@ -8005,8 +8005,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, return ret; #endif #ifdef TARGET_NR_lseek diff --git a/linux-user-properly-test-for-infinite-ti.patch b/linux-user-properly-test-for-infinite-ti.patch index 499d5dd..7fc2e0c 100644 --- a/linux-user-properly-test-for-infinite-ti.patch +++ b/linux-user-properly-test-for-infinite-ti.patch @@ -15,10 +15,10 @@ Signed-off-by: Andreas Schwab 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 926a7dd587b39d0615cbbb077ef2..9330a1ec6a15f16e4f7fd0f825c2 100644 +index 6ada54d3a19e455c0c12a1d4b321..69c9dee831d8fdb96cde3a0b996c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -9758,7 +9758,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, +@@ -10052,7 +10052,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, { struct timespec ts, *pts; diff --git a/linux-user-use-target_ulong.patch b/linux-user-use-target_ulong.patch index ebe069d..e0eb39b 100644 --- a/linux-user-use-target_ulong.patch +++ b/linux-user-use-target_ulong.patch @@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h -index f6f5fe5fbb553c151cb57146350c..b45b68221434e29636bb34c9f0b0 100644 +index 792c74290f8d376235b07f3f8ef0..956ad6db3df11684132402dd877b 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h -@@ -206,10 +206,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, +@@ -207,10 +207,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, void target_set_brk(abi_ulong new_brk); abi_long do_brk(abi_ulong new_brk); void syscall_init(void); @@ -31,14 +31,14 @@ index f6f5fe5fbb553c151cb57146350c..b45b68221434e29636bb34c9f0b0 100644 + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8); - void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2); extern __thread CPUState *thread_cpu; void cpu_loop(CPUArchState *env); + const char *target_strerror(int err); diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 243ec2a1e3bde8e6b3ac48989554..61d976cca146a6deb2d74c95ec59 100644 +index 39b824760a29765dc9538d8574e5..0317c64f4ae460c972fe4fe67ef8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7374,10 +7374,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask, +@@ -7650,10 +7650,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask, * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_. */ @@ -53,7 +53,7 @@ index 243ec2a1e3bde8e6b3ac48989554..61d976cca146a6deb2d74c95ec59 100644 { CPUState *cpu = env_cpu(cpu_env); abi_long ret; -@@ -10125,7 +10125,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -10423,7 +10423,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)) @@ -62,7 +62,7 @@ index 243ec2a1e3bde8e6b3ac48989554..61d976cca146a6deb2d74c95ec59 100644 CPUARMState *env = cpu_env; ARMCPU *cpu = env_archcpu(env); uint32_t vq, old_vq; -@@ -12116,10 +12116,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -12456,10 +12456,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } diff --git a/m68k-Fix-regression-causing-Single-Step-.patch b/m68k-Fix-regression-causing-Single-Step-.patch deleted file mode 100644 index 1e14a45..0000000 --- a/m68k-Fix-regression-causing-Single-Step-.patch +++ /dev/null @@ -1,100 +0,0 @@ -From: Laurent Vivier -Date: Thu, 16 Jan 2020 17:54:54 +0100 -Subject: m68k: Fix regression causing Single-Step via GDB/RSP to not single - step - -Git-commit: 322f244aaa80a5208090d41481c1c09c6face66b - -A regression that was introduced, with the refactor to TranslatorOps, -drops two lines that update the PC when single-stepping is being performed. - -Fixes: 11ab74b01e0a ("target/m68k: Convert to TranslatorOps") -Reported-by: Lucien Murray-Pitts -Suggested-by: Lucien Murray-Pitts -Suggested-by: Richard Henderson -Reviewed-by: Richard Henderson -Signed-off-by: Laurent Vivier -Message-Id: <20200116165454.2076265-1-laurent@vivier.eu> -Signed-off-by: Bruce Rogers ---- - target/m68k/translate.c | 42 ++++++++++++++++++++++++++--------------- - 1 file changed, 27 insertions(+), 15 deletions(-) - -diff --git a/target/m68k/translate.c b/target/m68k/translate.c -index fcdb7bc8e4eeabc2f3b0e336c064..16fae5ac9ec3f729ef402b805e41 100644 ---- a/target/m68k/translate.c -+++ b/target/m68k/translate.c -@@ -289,16 +289,21 @@ static void gen_jmp(DisasContext *s, TCGv dest) - s->base.is_jmp = DISAS_JUMP; - } - --static void gen_exception(DisasContext *s, uint32_t dest, int nr) -+static void gen_raise_exception(int nr) - { - TCGv_i32 tmp; - -- update_cc_op(s); -- tcg_gen_movi_i32(QREG_PC, dest); -- - tmp = tcg_const_i32(nr); - gen_helper_raise_exception(cpu_env, tmp); - tcg_temp_free_i32(tmp); -+} -+ -+static void gen_exception(DisasContext *s, uint32_t dest, int nr) -+{ -+ update_cc_op(s); -+ tcg_gen_movi_i32(QREG_PC, dest); -+ -+ gen_raise_exception(nr); - - s->base.is_jmp = DISAS_NORETURN; - } -@@ -6198,29 +6203,36 @@ static void m68k_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) - { - DisasContext *dc = container_of(dcbase, DisasContext, base); - -- if (dc->base.is_jmp == DISAS_NORETURN) { -- return; -- } -- if (dc->base.singlestep_enabled) { -- gen_helper_raise_exception(cpu_env, tcg_const_i32(EXCP_DEBUG)); -- return; -- } -- - switch (dc->base.is_jmp) { -+ case DISAS_NORETURN: -+ break; - case DISAS_TOO_MANY: - update_cc_op(dc); -- gen_jmp_tb(dc, 0, dc->pc); -+ if (dc->base.singlestep_enabled) { -+ tcg_gen_movi_i32(QREG_PC, dc->pc); -+ gen_raise_exception(EXCP_DEBUG); -+ } else { -+ gen_jmp_tb(dc, 0, dc->pc); -+ } - break; - case DISAS_JUMP: - /* We updated CC_OP and PC in gen_jmp/gen_jmp_im. */ -- tcg_gen_lookup_and_goto_ptr(); -+ if (dc->base.singlestep_enabled) { -+ gen_raise_exception(EXCP_DEBUG); -+ } else { -+ tcg_gen_lookup_and_goto_ptr(); -+ } - break; - case DISAS_EXIT: - /* - * We updated CC_OP and PC in gen_exit_tb, but also modified - * other state that may require returning to the main loop. - */ -- tcg_gen_exit_tb(NULL, 0); -+ if (dc->base.singlestep_enabled) { -+ gen_raise_exception(EXCP_DEBUG); -+ } else { -+ tcg_gen_exit_tb(NULL, 0); -+ } - break; - default: - g_assert_not_reached(); diff --git a/migration-Rate-limit-inside-host-pages.patch b/migration-Rate-limit-inside-host-pages.patch deleted file mode 100644 index 10d587b..0000000 --- a/migration-Rate-limit-inside-host-pages.patch +++ /dev/null @@ -1,149 +0,0 @@ -From: "Dr. David Alan Gilbert" -Date: Thu, 5 Dec 2019 10:29:18 +0000 -Subject: migration: Rate limit inside host pages - -Git-commit: 97e1e06780e70f6e98a0d2df881e0c0927d3aeb6 - -When using hugepages, rate limiting is necessary within each huge -page, since a 1G huge page can take a significant time to send, so -you end up with bursty behaviour. - -Fixes: 4c011c37ecb3 ("postcopy: Send whole huge pages") -Reported-by: Lin Ma -Signed-off-by: Dr. David Alan Gilbert -Reviewed-by: Juan Quintela -Reviewed-by: Peter Xu -Signed-off-by: Juan Quintela -Signed-off-by: Bruce Rogers ---- - migration/migration.c | 57 ++++++++++++++++++++++++------------------ - migration/migration.h | 1 + - migration/ram.c | 2 ++ - migration/trace-events | 4 +-- - 4 files changed, 37 insertions(+), 27 deletions(-) - -diff --git a/migration/migration.c b/migration/migration.c -index 354ad072fa5553333c5b1e0d8023..27500d09a94a8615c935245e23ed 100644 ---- a/migration/migration.c -+++ b/migration/migration.c -@@ -3224,6 +3224,37 @@ void migration_consume_urgent_request(void) - qemu_sem_wait(&migrate_get_current()->rate_limit_sem); - } - -+/* Returns true if the rate limiting was broken by an urgent request */ -+bool migration_rate_limit(void) -+{ -+ int64_t now = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); -+ MigrationState *s = migrate_get_current(); -+ -+ bool urgent = false; -+ migration_update_counters(s, now); -+ if (qemu_file_rate_limit(s->to_dst_file)) { -+ /* -+ * Wait for a delay to do rate limiting OR -+ * something urgent to post the semaphore. -+ */ -+ int ms = s->iteration_start_time + BUFFER_DELAY - now; -+ trace_migration_rate_limit_pre(ms); -+ if (qemu_sem_timedwait(&s->rate_limit_sem, ms) == 0) { -+ /* -+ * We were woken by one or more urgent things but -+ * the timedwait will have consumed one of them. -+ * The service routine for the urgent wake will dec -+ * the semaphore itself for each item it consumes, -+ * so add this one we just eat back. -+ */ -+ qemu_sem_post(&s->rate_limit_sem); -+ urgent = true; -+ } -+ trace_migration_rate_limit_post(urgent); -+ } -+ return urgent; -+} -+ - /* - * Master migration thread on the source VM. - * It drives the migration and pumps the data down the outgoing channel. -@@ -3290,8 +3321,6 @@ static void *migration_thread(void *opaque) - trace_migration_thread_setup_complete(); - - while (migration_is_active(s)) { -- int64_t current_time; -- - if (urgent || !qemu_file_rate_limit(s->to_dst_file)) { - MigIterateState iter_state = migration_iteration_run(s); - if (iter_state == MIG_ITERATE_SKIP) { -@@ -3318,29 +3347,7 @@ static void *migration_thread(void *opaque) - update_iteration_initial_status(s); - } - -- current_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); -- -- migration_update_counters(s, current_time); -- -- urgent = false; -- if (qemu_file_rate_limit(s->to_dst_file)) { -- /* Wait for a delay to do rate limiting OR -- * something urgent to post the semaphore. -- */ -- int ms = s->iteration_start_time + BUFFER_DELAY - current_time; -- trace_migration_thread_ratelimit_pre(ms); -- if (qemu_sem_timedwait(&s->rate_limit_sem, ms) == 0) { -- /* We were worken by one or more urgent things but -- * the timedwait will have consumed one of them. -- * The service routine for the urgent wake will dec -- * the semaphore itself for each item it consumes, -- * so add this one we just eat back. -- */ -- qemu_sem_post(&s->rate_limit_sem); -- urgent = true; -- } -- trace_migration_thread_ratelimit_post(urgent); -- } -+ urgent = migration_rate_limit(); - } - - trace_migration_thread_after_loop(); -diff --git a/migration/migration.h b/migration/migration.h -index 79b3dda146f716955f413383bf39..aa9ff6f27b19d7ee165048aa7b6d 100644 ---- a/migration/migration.h -+++ b/migration/migration.h -@@ -341,5 +341,6 @@ int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque); - - void migration_make_urgent_request(void); - void migration_consume_urgent_request(void); -+bool migration_rate_limit(void); - - #endif -diff --git a/migration/ram.c b/migration/ram.c -index 5078f94490de7a1bc71670376078..b6de7d1d5552a0aa39b0d232c2d6 100644 ---- a/migration/ram.c -+++ b/migration/ram.c -@@ -2616,6 +2616,8 @@ static int ram_save_host_page(RAMState *rs, PageSearchStatus *pss, - - pages += tmppages; - pss->page++; -+ /* Allow rate limiting to happen in the middle of huge pages */ -+ migration_rate_limit(); - } while ((pss->page & (pagesize_bits - 1)) && - offset_in_ramblock(pss->block, pss->page << TARGET_PAGE_BITS)); - -diff --git a/migration/trace-events b/migration/trace-events -index 6dee7b5389dc2be37b3851820919..2f9129e213d41a6350fe7e968697 100644 ---- a/migration/trace-events -+++ b/migration/trace-events -@@ -138,12 +138,12 @@ migrate_send_rp_recv_bitmap(char *name, int64_t size) "block '%s' size 0x%"PRIi6 - migration_completion_file_err(void) "" - migration_completion_postcopy_end(void) "" - migration_completion_postcopy_end_after_complete(void) "" -+migration_rate_limit_pre(int ms) "%d ms" -+migration_rate_limit_post(int urgent) "urgent: %d" - migration_return_path_end_before(void) "" - migration_return_path_end_after(int rp_error) "%d" - migration_thread_after_loop(void) "" - migration_thread_file_err(void) "" --migration_thread_ratelimit_pre(int ms) "%d ms" --migration_thread_ratelimit_post(int urgent) "urgent: %d" - migration_thread_setup_complete(void) "" - open_return_path_on_source(void) "" - open_return_path_on_source_continue(void) "" diff --git a/migration-colo-fix-use-after-free-of-loc.patch b/migration-colo-fix-use-after-free-of-loc.patch deleted file mode 100644 index 1eb189a..0000000 --- a/migration-colo-fix-use-after-free-of-loc.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 24 Mar 2020 18:36:28 +0300 -Subject: migration/colo: fix use after free of local_err - -Git-commit: 27d07fcfa70c3afa0664288cbce5334ed9595a3a - -local_err is used again in secondary_vm_do_failover() after -replication_stop_all(), so we must zero it. Otherwise try to set -non-NULL local_err will crash. - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-Id: <20200324153630.11882-5-vsementsov@virtuozzo.com> -Reviewed-by: Dr. David Alan Gilbert -Signed-off-by: Dr. David Alan Gilbert -Signed-off-by: Bruce Rogers ---- - migration/colo.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/migration/colo.c b/migration/colo.c -index 2c88aa57a29307963a15fc017b1d..6d46800aa6a2617521a36cc0dc33 100644 ---- a/migration/colo.c -+++ b/migration/colo.c -@@ -92,6 +92,7 @@ static void secondary_vm_do_failover(void) - replication_stop_all(true, &local_err); - if (local_err) { - error_report_err(local_err); -+ local_err = NULL; - } - - /* Notify all filters of all NIC to do checkpoint */ diff --git a/migration-ram-fix-use-after-free-of-loca.patch b/migration-ram-fix-use-after-free-of-loca.patch deleted file mode 100644 index 604cc3e..0000000 --- a/migration-ram-fix-use-after-free-of-loca.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 24 Mar 2020 18:36:29 +0300 -Subject: migration/ram: fix use after free of local_err - -Git-commit: b4a1733c5e6827c72b0dcfa295e07ef7b1ebccff - -local_err is used again in migration_bitmap_sync_precopy() after -precopy_notify(), so we must zero it. Otherwise try to set -non-NULL local_err will crash. - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-Id: <20200324153630.11882-6-vsementsov@virtuozzo.com> -Reviewed-by: Dr. David Alan Gilbert -Signed-off-by: Dr. David Alan Gilbert -Signed-off-by: Bruce Rogers ---- - migration/ram.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/migration/ram.c b/migration/ram.c -index b6de7d1d5552a0aa39b0d232c2d6..c44542175da044c78ef8dc0ce612 100644 ---- a/migration/ram.c -+++ b/migration/ram.c -@@ -1906,6 +1906,7 @@ static void migration_bitmap_sync_precopy(RAMState *rs) - */ - if (precopy_notify(PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC, &local_err)) { - error_report_err(local_err); -+ local_err = NULL; - } - - migration_bitmap_sync(rs); diff --git a/migration-test-ppc64-fix-FORTH-test-prog.patch b/migration-test-ppc64-fix-FORTH-test-prog.patch deleted file mode 100644 index 756fbd2..0000000 --- a/migration-test-ppc64-fix-FORTH-test-prog.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Laurent Vivier -Date: Tue, 7 Jan 2020 17:34:37 +0100 -Subject: migration-test: ppc64: fix FORTH test program - -Git-commit: 16c5c6928ff53bd95e6504301ef6c285501531e7 - -Commit e51e711b1bef has moved the initialization of start_address and -end_address after the definition of the command line argument, -where the nvramrc is initialized, and thus the loop is between 0 and 0 -rather than 1 MiB and 100 MiB. - -It doesn't affect the result of the test if all the tests are run in -sequence because the two first tests don't run the loop, so the -values are correctly initialized when we actually need them. - -But it hangs when we ask to run only one test, for instance: - - QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 \ - tests/migration-test -m=quick -p /ppc64/migration/validate_uuid_error - -Fixes: e51e711b1bef ("tests/migration: Add migration-test header file") -Cc: wei@redhat.com -Signed-off-by: Laurent Vivier -Message-Id: <20200107163437.52139-1-lvivier@redhat.com> -Reviewed-by: Dr. David Alan Gilbert -Reviewed-by: Juan Quintela -Acked-by: David Gibson -Signed-off-by: Thomas Huth -Signed-off-by: Bruce Rogers ---- - tests/migration-test.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/migration-test.c b/tests/migration-test.c -index ebd77a581affd8872138f6f36d5e..d79980fbe39dfaa3fa89999ee64f 100644 ---- a/tests/migration-test.c -+++ b/tests/migration-test.c -@@ -614,6 +614,8 @@ static int test_migrate_start(QTestState **from, QTestState **to, - end_address = S390_TEST_MEM_END; - } else if (strcmp(arch, "ppc64") == 0) { - extra_opts = use_shmem ? get_shmem_opts("256M", shmem_path) : NULL; -+ start_address = PPC_TEST_MEM_START; -+ end_address = PPC_TEST_MEM_END; - cmd_src = g_strdup_printf("-machine accel=%s,vsmt=8 -m 256M -nodefaults" - " -name source,debug-threads=on" - " -serial file:%s/src_serial" -@@ -630,8 +632,6 @@ static int test_migrate_start(QTestState **from, QTestState **to, - accel, tmpfs, uri, - extra_opts ? extra_opts : "", opts_dst); - -- start_address = PPC_TEST_MEM_START; -- end_address = PPC_TEST_MEM_END; - } else if (strcmp(arch, "aarch64") == 0) { - init_bootfile(bootpath, aarch64_kernel, sizeof(aarch64_kernel)); - extra_opts = use_shmem ? get_shmem_opts("150M", shmem_path) : NULL; diff --git a/net-tulip-check-frame-size-and-r-w-data-.patch b/net-tulip-check-frame-size-and-r-w-data-.patch deleted file mode 100644 index 1f1e9ec..0000000 --- a/net-tulip-check-frame-size-and-r-w-data-.patch +++ /dev/null @@ -1,144 +0,0 @@ -From: Prasad J Pandit -Date: Tue, 24 Mar 2020 22:57:22 +0530 -Subject: net: tulip: check frame size and r/w data length - -Git-commit: 8ffb7265af64ec81748335ec8f20e7ab542c3850 -References: bsc#1168713, CVE-2020-11102 - -Tulip network driver while copying tx/rx buffers does not check -frame size against r/w data length. This may lead to OOB buffer -access. Add check to avoid it. - -Limit iterations over descriptors to avoid potential infinite -loop issue in tulip_xmit_list_update. - -Reported-by: Li Qiang -Reported-by: Ziming Zhang -Reported-by: Jason Wang -Tested-by: Li Qiang -Reviewed-by: Li Qiang -Signed-off-by: Prasad J Pandit -Signed-off-by: Jason Wang -Signed-off-by: Bruce Rogers ---- - hw/net/tulip.c | 36 +++++++++++++++++++++++++++--------- - 1 file changed, 27 insertions(+), 9 deletions(-) - -diff --git a/hw/net/tulip.c b/hw/net/tulip.c -index f85f54341fab635a4d5756a6c444..1167c1bb07d74783f3fa47b01996 100644 ---- a/hw/net/tulip.c -+++ b/hw/net/tulip.c -@@ -170,6 +170,10 @@ static void tulip_copy_rx_bytes(TULIPState *s, struct tulip_descriptor *desc) - } else { - len = s->rx_frame_len; - } -+ -+ if (s->rx_frame_len + len > sizeof(s->rx_frame)) { -+ return; -+ } - pci_dma_write(&s->dev, desc->buf_addr1, s->rx_frame + - (s->rx_frame_size - s->rx_frame_len), len); - s->rx_frame_len -= len; -@@ -181,6 +185,10 @@ static void tulip_copy_rx_bytes(TULIPState *s, struct tulip_descriptor *desc) - } else { - len = s->rx_frame_len; - } -+ -+ if (s->rx_frame_len + len > sizeof(s->rx_frame)) { -+ return; -+ } - pci_dma_write(&s->dev, desc->buf_addr2, s->rx_frame + - (s->rx_frame_size - s->rx_frame_len), len); - s->rx_frame_len -= len; -@@ -227,7 +235,8 @@ static ssize_t tulip_receive(TULIPState *s, const uint8_t *buf, size_t size) - - trace_tulip_receive(buf, size); - -- if (size < 14 || size > 2048 || s->rx_frame_len || tulip_rx_stopped(s)) { -+ if (size < 14 || size > sizeof(s->rx_frame) - 4 -+ || s->rx_frame_len || tulip_rx_stopped(s)) { - return 0; - } - -@@ -275,7 +284,6 @@ static ssize_t tulip_receive_nc(NetClientState *nc, - return tulip_receive(qemu_get_nic_opaque(nc), buf, size); - } - -- - static NetClientInfo net_tulip_info = { - .type = NET_CLIENT_DRIVER_NIC, - .size = sizeof(NICState), -@@ -558,7 +566,7 @@ static void tulip_tx(TULIPState *s, struct tulip_descriptor *desc) - if ((s->csr[6] >> CSR6_OM_SHIFT) & CSR6_OM_MASK) { - /* Internal or external Loopback */ - tulip_receive(s, s->tx_frame, s->tx_frame_len); -- } else { -+ } else if (s->tx_frame_len <= sizeof(s->tx_frame)) { - qemu_send_packet(qemu_get_queue(s->nic), - s->tx_frame, s->tx_frame_len); - } -@@ -570,23 +578,31 @@ static void tulip_tx(TULIPState *s, struct tulip_descriptor *desc) - } - } - --static void tulip_copy_tx_buffers(TULIPState *s, struct tulip_descriptor *desc) -+static int tulip_copy_tx_buffers(TULIPState *s, struct tulip_descriptor *desc) - { - int len1 = (desc->control >> TDES1_BUF1_SIZE_SHIFT) & TDES1_BUF1_SIZE_MASK; - int len2 = (desc->control >> TDES1_BUF2_SIZE_SHIFT) & TDES1_BUF2_SIZE_MASK; - -+ if (s->tx_frame_len + len1 > sizeof(s->tx_frame)) { -+ return -1; -+ } - if (len1) { - pci_dma_read(&s->dev, desc->buf_addr1, - s->tx_frame + s->tx_frame_len, len1); - s->tx_frame_len += len1; - } - -+ if (s->tx_frame_len + len2 > sizeof(s->tx_frame)) { -+ return -1; -+ } - if (len2) { - pci_dma_read(&s->dev, desc->buf_addr2, - s->tx_frame + s->tx_frame_len, len2); - s->tx_frame_len += len2; - } - desc->status = (len1 + len2) ? 0 : 0x7fffffff; -+ -+ return 0; - } - - static void tulip_setup_filter_addr(TULIPState *s, uint8_t *buf, int n) -@@ -651,13 +667,15 @@ static uint32_t tulip_ts(TULIPState *s) - - static void tulip_xmit_list_update(TULIPState *s) - { -+#define TULIP_DESC_MAX 128 -+ uint8_t i = 0; - struct tulip_descriptor desc; - - if (tulip_ts(s) != CSR5_TS_SUSPENDED) { - return; - } - -- for (;;) { -+ for (i = 0; i < TULIP_DESC_MAX; i++) { - tulip_desc_read(s, s->current_tx_desc, &desc); - tulip_dump_tx_descriptor(s, &desc); - -@@ -675,10 +693,10 @@ static void tulip_xmit_list_update(TULIPState *s) - s->tx_frame_len = 0; - } - -- tulip_copy_tx_buffers(s, &desc); -- -- if (desc.control & TDES1_LS) { -- tulip_tx(s, &desc); -+ if (!tulip_copy_tx_buffers(s, &desc)) { -+ if (desc.control & TDES1_LS) { -+ tulip_tx(s, &desc); -+ } - } - } - tulip_desc_write(s, s->current_tx_desc, &desc); diff --git a/numa-Extend-CLI-to-provide-initiator-inf.patch b/numa-Extend-CLI-to-provide-initiator-inf.patch deleted file mode 100644 index bc54fc2..0000000 --- a/numa-Extend-CLI-to-provide-initiator-inf.patch +++ /dev/null @@ -1,303 +0,0 @@ -From: Tao Xu -Date: Fri, 13 Dec 2019 09:19:22 +0800 -Subject: numa: Extend CLI to provide initiator information for numa nodes - -Git-commit: 244b3f4485a07c7ce4b7123d6ce9d8c6012756e8 -References: jsc#SLE-8897 - -In ACPI 6.3 chapter 5.2.27 Heterogeneous Memory Attribute Table (HMAT), -The initiator represents processor which access to memory. And in 5.2.27.3 -Memory Proximity Domain Attributes Structure, the attached initiator is -defined as where the memory controller responsible for a memory proximity -domain. With attached initiator information, the topology of heterogeneous -memory can be described. Add new machine property 'hmat' to enable all -HMAT specific options. - -Extend CLI of "-numa node" option to indicate the initiator numa node-id. -In the linux kernel, the codes in drivers/acpi/hmat/hmat.c parse and report -the platform's HMAT tables. Before using initiator option, enable HMAT with --machine hmat=on. - -Acked-by: Markus Armbruster -Reviewed-by: Igor Mammedov -Reviewed-by: Jingqi Liu -Suggested-by: Dan Williams -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-2-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/core/machine.c | 64 +++++++++++++++++++++++++++++++++++++++++++ - hw/core/numa.c | 23 ++++++++++++++++ - include/sysemu/numa.h | 5 ++++ - qapi/machine.json | 10 ++++++- - qemu-options.hx | 35 +++++++++++++++++++---- - 5 files changed, 131 insertions(+), 6 deletions(-) - -diff --git a/hw/core/machine.c b/hw/core/machine.c -index aa63231f3160aaf32874e59ba452..a15c5a8673ade765965b4e2c8237 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -518,6 +518,20 @@ static void machine_set_nvdimm(Object *obj, bool value, Error **errp) - ms->nvdimms_state->is_enabled = value; - } - -+static bool machine_get_hmat(Object *obj, Error **errp) -+{ -+ MachineState *ms = MACHINE(obj); -+ -+ return ms->numa_state->hmat_enabled; -+} -+ -+static void machine_set_hmat(Object *obj, bool value, Error **errp) -+{ -+ MachineState *ms = MACHINE(obj); -+ -+ ms->numa_state->hmat_enabled = value; -+} -+ - static char *machine_get_nvdimm_persistence(Object *obj, Error **errp) - { - MachineState *ms = MACHINE(obj); -@@ -645,6 +659,7 @@ void machine_set_cpu_numa_node(MachineState *machine, - const CpuInstanceProperties *props, Error **errp) - { - MachineClass *mc = MACHINE_GET_CLASS(machine); -+ NodeInfo *numa_info = machine->numa_state->nodes; - bool match = false; - int i; - -@@ -714,6 +729,17 @@ void machine_set_cpu_numa_node(MachineState *machine, - match = true; - slot->props.node_id = props->node_id; - slot->props.has_node_id = props->has_node_id; -+ -+ if (machine->numa_state->hmat_enabled) { -+ if ((numa_info[props->node_id].initiator < MAX_NODES) && -+ (props->node_id != numa_info[props->node_id].initiator)) { -+ error_setg(errp, "The initiator of CPU NUMA node %" PRId64 -+ " should be itself", props->node_id); -+ return; -+ } -+ numa_info[props->node_id].has_cpu = true; -+ numa_info[props->node_id].initiator = props->node_id; -+ } - } - - if (!match) { -@@ -960,6 +986,13 @@ static void machine_initfn(Object *obj) - - if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) { - ms->numa_state = g_new0(NumaState, 1); -+ object_property_add_bool(obj, "hmat", -+ machine_get_hmat, machine_set_hmat, -+ &error_abort); -+ object_property_set_description(obj, "hmat", -+ "Set on/off to enable/disable " -+ "ACPI Heterogeneous Memory Attribute " -+ "Table (HMAT)", NULL); - } - - /* Register notifier when init is done for sysbus sanity checks */ -@@ -1048,6 +1081,32 @@ static char *cpu_slot_to_string(const CPUArchId *cpu) - return g_string_free(s, false); - } - -+static void numa_validate_initiator(NumaState *numa_state) -+{ -+ int i; -+ NodeInfo *numa_info = numa_state->nodes; -+ -+ for (i = 0; i < numa_state->num_nodes; i++) { -+ if (numa_info[i].initiator == MAX_NODES) { -+ error_report("The initiator of NUMA node %d is missing, use " -+ "'-numa node,initiator' option to declare it", i); -+ exit(1); -+ } -+ -+ if (!numa_info[numa_info[i].initiator].present) { -+ error_report("NUMA node %" PRIu16 " is missing, use " -+ "'-numa node' option to declare it first", -+ numa_info[i].initiator); -+ exit(1); -+ } -+ -+ if (!numa_info[numa_info[i].initiator].has_cpu) { -+ error_report("The initiator of NUMA node %d is invalid", i); -+ exit(1); -+ } -+ } -+} -+ - static void machine_numa_finish_cpu_init(MachineState *machine) - { - int i; -@@ -1088,6 +1147,11 @@ static void machine_numa_finish_cpu_init(MachineState *machine) - machine_set_cpu_numa_node(machine, &props, &error_fatal); - } - } -+ -+ if (machine->numa_state->hmat_enabled) { -+ numa_validate_initiator(machine->numa_state); -+ } -+ - if (s->len && !qtest_enabled()) { - warn_report("CPU(s) not present in any NUMA nodes: %s", - s->str); -diff --git a/hw/core/numa.c b/hw/core/numa.c -index e3332a984f7c9639b2a058ac9ac7..e60da99293b4d19c090711659928 100644 ---- a/hw/core/numa.c -+++ b/hw/core/numa.c -@@ -133,6 +133,29 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node, - numa_info[nodenr].node_mem = object_property_get_uint(o, "size", NULL); - numa_info[nodenr].node_memdev = MEMORY_BACKEND(o); - } -+ -+ /* -+ * If not set the initiator, set it to MAX_NODES. And if -+ * HMAT is enabled and this node has no cpus, QEMU will raise error. -+ */ -+ numa_info[nodenr].initiator = MAX_NODES; -+ if (node->has_initiator) { -+ if (!ms->numa_state->hmat_enabled) { -+ error_setg(errp, "ACPI Heterogeneous Memory Attribute Table " -+ "(HMAT) is disabled, enable it with -machine hmat=on " -+ "before using any of hmat specific options"); -+ return; -+ } -+ -+ if (node->initiator >= MAX_NODES) { -+ error_report("The initiator id %" PRIu16 " expects an integer " -+ "between 0 and %d", node->initiator, -+ MAX_NODES - 1); -+ return; -+ } -+ -+ numa_info[nodenr].initiator = node->initiator; -+ } - numa_info[nodenr].present = true; - max_numa_nodeid = MAX(max_numa_nodeid, nodenr + 1); - ms->numa_state->num_nodes++; -diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h -index ae9c41d02ba47c089d19d74b3a4f..788cbec7a2096e262555ac6e83cb 100644 ---- a/include/sysemu/numa.h -+++ b/include/sysemu/numa.h -@@ -18,6 +18,8 @@ struct NodeInfo { - uint64_t node_mem; - struct HostMemoryBackend *node_memdev; - bool present; -+ bool has_cpu; -+ uint16_t initiator; - uint8_t distance[MAX_NODES]; - }; - -@@ -33,6 +35,9 @@ struct NumaState { - /* Allow setting NUMA distance for different NUMA nodes */ - bool have_numa_distance; - -+ /* Detect if HMAT support is enabled. */ -+ bool hmat_enabled; -+ - /* NUMA nodes information */ - NodeInfo nodes[MAX_NODES]; - }; -diff --git a/qapi/machine.json b/qapi/machine.json -index ca26779f1a3623e86befc00ee8d8..27d0e375342a502c7676d23837a7 100644 ---- a/qapi/machine.json -+++ b/qapi/machine.json -@@ -463,6 +463,13 @@ - # @memdev: memory backend object. If specified for one node, - # it must be specified for all nodes. - # -+# @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, -+# points to the nodeid which has the memory controller -+# responsible for this NUMA node. This field provides -+# additional information as to the initiator node that -+# is closest (as in directly attached) to this node, and -+# therefore has the best performance (since 5.0) -+# - # Since: 2.1 - ## - { 'struct': 'NumaNodeOptions', -@@ -470,7 +477,8 @@ - '*nodeid': 'uint16', - '*cpus': ['uint16'], - '*mem': 'size', -- '*memdev': 'str' }} -+ '*memdev': 'str', -+ '*initiator': 'uint16' }} - - ## - # @NumaDistOptions: -diff --git a/qemu-options.hx b/qemu-options.hx -index e14d88e9b2f3a3c13a4c20db0b36..9b1618cd34d9fe1d8374d6abb954 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -43,7 +43,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ - " suppress-vmdesc=on|off disables self-describing migration (default=off)\n" - " nvdimm=on|off controls NVDIMM support (default=off)\n" - " enforce-config-section=on|off enforce configuration section migration (default=off)\n" -- " memory-encryption=@var{} memory encryption object to use (default=none)\n", -+ " memory-encryption=@var{} memory encryption object to use (default=none)\n" -+ " hmat=on|off controls ACPI HMAT support (default=off)\n", - QEMU_ARCH_ALL) - STEXI - @item -machine [type=]@var{name}[,prop=@var{value}[,...]] -@@ -103,6 +104,9 @@ NOTE: this parameter is deprecated. Please use @option{-global} - @option{migration.send-configuration}=@var{on|off} instead. - @item memory-encryption=@var{} - Memory encryption object to use. The default is none. -+@item hmat=on|off -+Enables or disables ACPI Heterogeneous Memory Attribute Table (HMAT) support. -+The default is off. - @end table - ETEXI - -@@ -161,14 +165,14 @@ If any on the three values is given, the total number of CPUs @var{n} can be omi - ETEXI - - DEF("numa", HAS_ARG, QEMU_OPTION_numa, -- "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n" -- "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n" -+ "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n" -+ "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n" - "-numa dist,src=source,dst=destination,val=distance\n" - "-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]\n", - QEMU_ARCH_ALL) - STEXI --@item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] --@itemx -numa node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] -+@item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}][,initiator=@var{initiator}] -+@itemx -numa node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}][,initiator=@var{initiator}] - @itemx -numa dist,src=@var{source},dst=@var{destination},val=@var{distance} - @itemx -numa cpu,node-id=@var{node}[,socket-id=@var{x}][,core-id=@var{y}][,thread-id=@var{z}] - @findex -numa -@@ -215,6 +219,27 @@ split equally between them. - @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, - if one node uses @samp{memdev}, all of them have to use it. - -+@samp{initiator} is an additional option that points to an @var{initiator} -+NUMA node that has best performance (the lowest latency or largest bandwidth) -+to this NUMA @var{node}. Note that this option can be set only when -+the machine property 'hmat' is set to 'on'. -+ -+Following example creates a machine with 2 NUMA nodes, node 0 has CPU. -+node 1 has only memory, and its initiator is node 0. Note that because -+node 0 has CPU, by default the initiator of node 0 is itself and must be -+itself. -+@example -+-machine hmat=on \ -+-m 2G,slots=2,maxmem=4G \ -+-object memory-backend-ram,size=1G,id=m0 \ -+-object memory-backend-ram,size=1G,id=m1 \ -+-numa node,nodeid=0,memdev=m0 \ -+-numa node,nodeid=1,memdev=m1,initiator=0 \ -+-smp 2,sockets=2,maxcpus=2 \ -+-numa cpu,node-id=0,socket-id=0 \ -+-numa cpu,node-id=0,socket-id=1 -+@end example -+ - @var{source} and @var{destination} are NUMA node IDs. - @var{distance} is the NUMA distance from @var{source} to @var{destination}. - The distance from a node to itself is always 10. If any pair of nodes is diff --git a/numa-Extend-CLI-to-provide-memory-latenc.patch b/numa-Extend-CLI-to-provide-memory-latenc.patch deleted file mode 100644 index 35e0fde..0000000 --- a/numa-Extend-CLI-to-provide-memory-latenc.patch +++ /dev/null @@ -1,530 +0,0 @@ -From: Liu Jingqi -Date: Fri, 13 Dec 2019 09:19:23 +0800 -Subject: numa: Extend CLI to provide memory latency and bandwidth information - -Git-commit: 9b12dfa03a94d7f7a4b54eb67229a31e58193384 -References: jsc#SLE-8897 - -Add -numa hmat-lb option to provide System Locality Latency and -Bandwidth Information. These memory attributes help to build -System Locality Latency and Bandwidth Information Structure(s) -in ACPI Heterogeneous Memory Attribute Table (HMAT). Before using -hmat-lb option, enable HMAT with -machine hmat=on. - -Acked-by: Markus Armbruster -Signed-off-by: Liu Jingqi -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-3-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Reviewed-by: Igor Mammedov -Signed-off-by: Bruce Rogers ---- - hw/core/numa.c | 194 ++++++++++++++++++++++++++++++++++++++++++ - include/sysemu/numa.h | 53 ++++++++++++ - qapi/machine.json | 93 +++++++++++++++++++- - qemu-options.hx | 47 +++++++++- - 4 files changed, 384 insertions(+), 3 deletions(-) - -diff --git a/hw/core/numa.c b/hw/core/numa.c -index e60da99293b4d19c090711659928..34eb413f5d58a6feb11214ecc061 100644 ---- a/hw/core/numa.c -+++ b/hw/core/numa.c -@@ -23,6 +23,7 @@ - */ - - #include "qemu/osdep.h" -+#include "qemu/units.h" - #include "sysemu/hostmem.h" - #include "sysemu/numa.h" - #include "sysemu/sysemu.h" -@@ -198,6 +199,186 @@ void parse_numa_distance(MachineState *ms, NumaDistOptions *dist, Error **errp) - ms->numa_state->have_numa_distance = true; - } - -+void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, -+ Error **errp) -+{ -+ int i, first_bit, last_bit; -+ uint64_t max_entry, temp_base, bitmap_copy; -+ NodeInfo *numa_info = numa_state->nodes; -+ HMAT_LB_Info *hmat_lb = -+ numa_state->hmat_lb[node->hierarchy][node->data_type]; -+ HMAT_LB_Data lb_data = {}; -+ HMAT_LB_Data *lb_temp; -+ -+ /* Error checking */ -+ if (node->initiator > numa_state->num_nodes) { -+ error_setg(errp, "Invalid initiator=%d, it should be less than %d", -+ node->initiator, numa_state->num_nodes); -+ return; -+ } -+ if (node->target > numa_state->num_nodes) { -+ error_setg(errp, "Invalid target=%d, it should be less than %d", -+ node->target, numa_state->num_nodes); -+ return; -+ } -+ if (!numa_info[node->initiator].has_cpu) { -+ error_setg(errp, "Invalid initiator=%d, it isn't an " -+ "initiator proximity domain", node->initiator); -+ return; -+ } -+ if (!numa_info[node->target].present) { -+ error_setg(errp, "The target=%d should point to an existing node", -+ node->target); -+ return; -+ } -+ -+ if (!hmat_lb) { -+ hmat_lb = g_malloc0(sizeof(*hmat_lb)); -+ numa_state->hmat_lb[node->hierarchy][node->data_type] = hmat_lb; -+ hmat_lb->list = g_array_new(false, true, sizeof(HMAT_LB_Data)); -+ } -+ hmat_lb->hierarchy = node->hierarchy; -+ hmat_lb->data_type = node->data_type; -+ lb_data.initiator = node->initiator; -+ lb_data.target = node->target; -+ -+ if (node->data_type <= HMATLB_DATA_TYPE_WRITE_LATENCY) { -+ /* Input latency data */ -+ -+ if (!node->has_latency) { -+ error_setg(errp, "Missing 'latency' option"); -+ return; -+ } -+ if (node->has_bandwidth) { -+ error_setg(errp, "Invalid option 'bandwidth' since " -+ "the data type is latency"); -+ return; -+ } -+ -+ /* Detect duplicate configuration */ -+ for (i = 0; i < hmat_lb->list->len; i++) { -+ lb_temp = &g_array_index(hmat_lb->list, HMAT_LB_Data, i); -+ -+ if (node->initiator == lb_temp->initiator && -+ node->target == lb_temp->target) { -+ error_setg(errp, "Duplicate configuration of the latency for " -+ "initiator=%d and target=%d", node->initiator, -+ node->target); -+ return; -+ } -+ } -+ -+ hmat_lb->base = hmat_lb->base ? hmat_lb->base : UINT64_MAX; -+ -+ if (node->latency) { -+ /* Calculate the temporary base and compressed latency */ -+ max_entry = node->latency; -+ temp_base = 1; -+ while (QEMU_IS_ALIGNED(max_entry, 10)) { -+ max_entry /= 10; -+ temp_base *= 10; -+ } -+ -+ /* Calculate the max compressed latency */ -+ temp_base = MIN(hmat_lb->base, temp_base); -+ max_entry = node->latency / hmat_lb->base; -+ max_entry = MAX(hmat_lb->range_bitmap, max_entry); -+ -+ /* -+ * For latency hmat_lb->range_bitmap record the max compressed -+ * latency which should be less than 0xFFFF (UINT16_MAX) -+ */ -+ if (max_entry >= UINT16_MAX) { -+ error_setg(errp, "Latency %" PRIu64 " between initiator=%d and " -+ "target=%d should not differ from previously entered " -+ "min or max values on more than %d", node->latency, -+ node->initiator, node->target, UINT16_MAX - 1); -+ return; -+ } else { -+ hmat_lb->base = temp_base; -+ hmat_lb->range_bitmap = max_entry; -+ } -+ -+ /* -+ * Set lb_info_provided bit 0 as 1, -+ * latency information is provided -+ */ -+ numa_info[node->target].lb_info_provided |= BIT(0); -+ } -+ lb_data.data = node->latency; -+ } else if (node->data_type >= HMATLB_DATA_TYPE_ACCESS_BANDWIDTH) { -+ /* Input bandwidth data */ -+ if (!node->has_bandwidth) { -+ error_setg(errp, "Missing 'bandwidth' option"); -+ return; -+ } -+ if (node->has_latency) { -+ error_setg(errp, "Invalid option 'latency' since " -+ "the data type is bandwidth"); -+ return; -+ } -+ if (!QEMU_IS_ALIGNED(node->bandwidth, MiB)) { -+ error_setg(errp, "Bandwidth %" PRIu64 " between initiator=%d and " -+ "target=%d should be 1MB aligned", node->bandwidth, -+ node->initiator, node->target); -+ return; -+ } -+ -+ /* Detect duplicate configuration */ -+ for (i = 0; i < hmat_lb->list->len; i++) { -+ lb_temp = &g_array_index(hmat_lb->list, HMAT_LB_Data, i); -+ -+ if (node->initiator == lb_temp->initiator && -+ node->target == lb_temp->target) { -+ error_setg(errp, "Duplicate configuration of the bandwidth for " -+ "initiator=%d and target=%d", node->initiator, -+ node->target); -+ return; -+ } -+ } -+ -+ hmat_lb->base = hmat_lb->base ? hmat_lb->base : 1; -+ -+ if (node->bandwidth) { -+ /* Keep bitmap unchanged when bandwidth out of range */ -+ bitmap_copy = hmat_lb->range_bitmap; -+ bitmap_copy |= node->bandwidth; -+ first_bit = ctz64(bitmap_copy); -+ temp_base = UINT64_C(1) << first_bit; -+ max_entry = node->bandwidth / temp_base; -+ last_bit = 64 - clz64(bitmap_copy); -+ -+ /* -+ * For bandwidth, first_bit record the base unit of bandwidth bits, -+ * last_bit record the last bit of the max bandwidth. The max -+ * compressed bandwidth should be less than 0xFFFF (UINT16_MAX) -+ */ -+ if ((last_bit - first_bit) > UINT16_BITS || -+ max_entry >= UINT16_MAX) { -+ error_setg(errp, "Bandwidth %" PRIu64 " between initiator=%d " -+ "and target=%d should not differ from previously " -+ "entered values on more than %d", node->bandwidth, -+ node->initiator, node->target, UINT16_MAX - 1); -+ return; -+ } else { -+ hmat_lb->base = temp_base; -+ hmat_lb->range_bitmap = bitmap_copy; -+ } -+ -+ /* -+ * Set lb_info_provided bit 1 as 1, -+ * bandwidth information is provided -+ */ -+ numa_info[node->target].lb_info_provided |= BIT(1); -+ } -+ lb_data.data = node->bandwidth; -+ } else { -+ assert(0); -+ } -+ -+ g_array_append_val(hmat_lb->list, lb_data); -+} -+ - void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) - { - Error *err = NULL; -@@ -236,6 +417,19 @@ void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) - machine_set_cpu_numa_node(ms, qapi_NumaCpuOptions_base(&object->u.cpu), - &err); - break; -+ case NUMA_OPTIONS_TYPE_HMAT_LB: -+ if (!ms->numa_state->hmat_enabled) { -+ error_setg(errp, "ACPI Heterogeneous Memory Attribute Table " -+ "(HMAT) is disabled, enable it with -machine hmat=on " -+ "before using any of hmat specific options"); -+ return; -+ } -+ -+ parse_numa_hmat_lb(ms->numa_state, &object->u.hmat_lb, &err); -+ if (err) { -+ goto end; -+ } -+ break; - default: - abort(); - } -diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h -index 788cbec7a2096e262555ac6e83cb..70f93c83d71eb2cdab5bf1dde422 100644 ---- a/include/sysemu/numa.h -+++ b/include/sysemu/numa.h -@@ -14,11 +14,34 @@ struct CPUArchId; - #define NUMA_DISTANCE_MAX 254 - #define NUMA_DISTANCE_UNREACHABLE 255 - -+/* the value of AcpiHmatLBInfo flags */ -+enum { -+ HMAT_LB_MEM_MEMORY = 0, -+ HMAT_LB_MEM_CACHE_1ST_LEVEL = 1, -+ HMAT_LB_MEM_CACHE_2ND_LEVEL = 2, -+ HMAT_LB_MEM_CACHE_3RD_LEVEL = 3, -+ HMAT_LB_LEVELS /* must be the last entry */ -+}; -+ -+/* the value of AcpiHmatLBInfo data type */ -+enum { -+ HMAT_LB_DATA_ACCESS_LATENCY = 0, -+ HMAT_LB_DATA_READ_LATENCY = 1, -+ HMAT_LB_DATA_WRITE_LATENCY = 2, -+ HMAT_LB_DATA_ACCESS_BANDWIDTH = 3, -+ HMAT_LB_DATA_READ_BANDWIDTH = 4, -+ HMAT_LB_DATA_WRITE_BANDWIDTH = 5, -+ HMAT_LB_TYPES /* must be the last entry */ -+}; -+ -+#define UINT16_BITS 16 -+ - struct NodeInfo { - uint64_t node_mem; - struct HostMemoryBackend *node_memdev; - bool present; - bool has_cpu; -+ uint8_t lb_info_provided; - uint16_t initiator; - uint8_t distance[MAX_NODES]; - }; -@@ -28,6 +51,31 @@ struct NumaNodeMem { - uint64_t node_plugged_mem; - }; - -+struct HMAT_LB_Data { -+ uint8_t initiator; -+ uint8_t target; -+ uint64_t data; -+}; -+typedef struct HMAT_LB_Data HMAT_LB_Data; -+ -+struct HMAT_LB_Info { -+ /* Indicates it's memory or the specified level memory side cache. */ -+ uint8_t hierarchy; -+ -+ /* Present the type of data, access/read/write latency or bandwidth. */ -+ uint8_t data_type; -+ -+ /* The range bitmap of bandwidth for calculating common base */ -+ uint64_t range_bitmap; -+ -+ /* The common base unit for latencies or bandwidths */ -+ uint64_t base; -+ -+ /* Array to store the latencies or bandwidths */ -+ GArray *list; -+}; -+typedef struct HMAT_LB_Info HMAT_LB_Info; -+ - struct NumaState { - /* Number of NUMA nodes */ - int num_nodes; -@@ -40,11 +88,16 @@ struct NumaState { - - /* NUMA nodes information */ - NodeInfo nodes[MAX_NODES]; -+ -+ /* NUMA nodes HMAT Locality Latency and Bandwidth Information */ -+ HMAT_LB_Info *hmat_lb[HMAT_LB_LEVELS][HMAT_LB_TYPES]; - }; - typedef struct NumaState NumaState; - - void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp); - void parse_numa_opts(MachineState *ms); -+void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, -+ Error **errp); - void numa_complete_configuration(MachineState *ms); - void query_numa_node_mem(NumaNodeMem node_mem[], MachineState *ms); - extern QemuOptsList qemu_numa_opts; -diff --git a/qapi/machine.json b/qapi/machine.json -index 27d0e375342a502c7676d23837a7..cf8faf5a2a4929560c852bf8d50c 100644 ---- a/qapi/machine.json -+++ b/qapi/machine.json -@@ -426,10 +426,12 @@ - # - # @cpu: property based CPU(s) to node mapping (Since: 2.10) - # -+# @hmat-lb: memory latency and bandwidth information (Since: 5.0) -+# - # Since: 2.1 - ## - { 'enum': 'NumaOptionsType', -- 'data': [ 'node', 'dist', 'cpu' ] } -+ 'data': [ 'node', 'dist', 'cpu', 'hmat-lb' ] } - - ## - # @NumaOptions: -@@ -444,7 +446,8 @@ - 'data': { - 'node': 'NumaNodeOptions', - 'dist': 'NumaDistOptions', -- 'cpu': 'NumaCpuOptions' }} -+ 'cpu': 'NumaCpuOptions', -+ 'hmat-lb': 'NumaHmatLBOptions' }} - - ## - # @NumaNodeOptions: -@@ -557,6 +560,92 @@ - 'base': 'CpuInstanceProperties', - 'data' : {} } - -+## -+# @HmatLBMemoryHierarchy: -+# -+# The memory hierarchy in the System Locality Latency and Bandwidth -+# Information Structure of HMAT (Heterogeneous Memory Attribute Table) -+# -+# For more information about @HmatLBMemoryHierarchy, see chapter -+# 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec. -+# -+# @memory: the structure represents the memory performance -+# -+# @first-level: first level of memory side cache -+# -+# @second-level: second level of memory side cache -+# -+# @third-level: third level of memory side cache -+# -+# Since: 5.0 -+## -+{ 'enum': 'HmatLBMemoryHierarchy', -+ 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] } -+ -+## -+# @HmatLBDataType: -+# -+# Data type in the System Locality Latency and Bandwidth -+# Information Structure of HMAT (Heterogeneous Memory Attribute Table) -+# -+# For more information about @HmatLBDataType, see chapter -+# 5.2.27.4: Table 5-146: Field "Data Type" of ACPI 6.3 spec. -+# -+# @access-latency: access latency (nanoseconds) -+# -+# @read-latency: read latency (nanoseconds) -+# -+# @write-latency: write latency (nanoseconds) -+# -+# @access-bandwidth: access bandwidth (Bytes per second) -+# -+# @read-bandwidth: read bandwidth (Bytes per second) -+# -+# @write-bandwidth: write bandwidth (Bytes per second) -+# -+# Since: 5.0 -+## -+{ 'enum': 'HmatLBDataType', -+ 'data': [ 'access-latency', 'read-latency', 'write-latency', -+ 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] } -+ -+## -+# @NumaHmatLBOptions: -+# -+# Set the system locality latency and bandwidth information -+# between Initiator and Target proximity Domains. -+# -+# For more information about @NumaHmatLBOptions, see chapter -+# 5.2.27.4: Table 5-146 of ACPI 6.3 spec. -+# -+# @initiator: the Initiator Proximity Domain. -+# -+# @target: the Target Proximity Domain. -+# -+# @hierarchy: the Memory Hierarchy. Indicates the performance -+# of memory or side cache. -+# -+# @data-type: presents the type of data, access/read/write -+# latency or hit latency. -+# -+# @latency: the value of latency from @initiator to @target -+# proximity domain, the latency unit is "ns(nanosecond)". -+# -+# @bandwidth: the value of bandwidth between @initiator and @target -+# proximity domain, the bandwidth unit is -+# "Bytes per second". -+# -+# Since: 5.0 -+## -+{ 'struct': 'NumaHmatLBOptions', -+ 'data': { -+ 'initiator': 'uint16', -+ 'target': 'uint16', -+ 'hierarchy': 'HmatLBMemoryHierarchy', -+ 'data-type': 'HmatLBDataType', -+ '*latency': 'uint64', -+ '*bandwidth': 'size' }} -+ - ## - # @HostMemPolicy: - # -diff --git a/qemu-options.hx b/qemu-options.hx -index 9b1618cd34d9fe1d8374d6abb954..5f7f31457ab6a8640698f6913b07 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -168,16 +168,19 @@ DEF("numa", HAS_ARG, QEMU_OPTION_numa, - "-numa node[,mem=size][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n" - "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n" - "-numa dist,src=source,dst=destination,val=distance\n" -- "-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]\n", -+ "-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]\n" -+ "-numa hmat-lb,initiator=node,target=node,hierarchy=memory|first-level|second-level|third-level,data-type=access-latency|read-latency|write-latency[,latency=lat][,bandwidth=bw]\n", - QEMU_ARCH_ALL) - STEXI - @item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}][,initiator=@var{initiator}] - @itemx -numa node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}][,initiator=@var{initiator}] - @itemx -numa dist,src=@var{source},dst=@var{destination},val=@var{distance} - @itemx -numa cpu,node-id=@var{node}[,socket-id=@var{x}][,core-id=@var{y}][,thread-id=@var{z}] -+@itemx -numa hmat-lb,initiator=@var{node},target=@var{node},hierarchy=@var{hierarchy},data-type=@var{tpye}[,latency=@var{lat}][,bandwidth=@var{bw}] - @findex -numa - Define a NUMA node and assign RAM and VCPUs to it. - Set the NUMA distance from a source node to a destination node. -+Set the ACPI Heterogeneous Memory Attributes for the given nodes. - - Legacy VCPU assignment uses @samp{cpus} option where - @var{firstcpu} and @var{lastcpu} are CPU indexes. Each -@@ -256,6 +259,48 @@ specified resources, it just assigns existing resources to NUMA - nodes. This means that one still has to use the @option{-m}, - @option{-smp} options to allocate RAM and VCPUs respectively. - -+Use @samp{hmat-lb} to set System Locality Latency and Bandwidth Information -+between initiator and target NUMA nodes in ACPI Heterogeneous Attribute Memory Table (HMAT). -+Initiator NUMA node can create memory requests, usually it has one or more processors. -+Target NUMA node contains addressable memory. -+ -+In @samp{hmat-lb} option, @var{node} are NUMA node IDs. @var{hierarchy} is the memory -+hierarchy of the target NUMA node: if @var{hierarchy} is 'memory', the structure -+represents the memory performance; if @var{hierarchy} is 'first-level|second-level|third-level', -+this structure represents aggregated performance of memory side caches for each domain. -+@var{type} of 'data-type' is type of data represented by this structure instance: -+if 'hierarchy' is 'memory', 'data-type' is 'access|read|write' latency or 'access|read|write' -+bandwidth of the target memory; if 'hierarchy' is 'first-level|second-level|third-level', -+'data-type' is 'access|read|write' hit latency or 'access|read|write' hit bandwidth of the -+target memory side cache. -+ -+@var{lat} is latency value in nanoseconds. @var{bw} is bandwidth value, -+the possible value and units are NUM[M|G|T], mean that the bandwidth value are -+NUM byte per second (or MB/s, GB/s or TB/s depending on used suffix). -+Note that if latency or bandwidth value is 0, means the corresponding latency or -+bandwidth information is not provided. -+ -+For example, the following options describe 2 NUMA nodes. Node 0 has 2 cpus and -+a ram, node 1 has only a ram. The processors in node 0 access memory in node -+0 with access-latency 5 nanoseconds, access-bandwidth is 200 MB/s; -+The processors in NUMA node 0 access memory in NUMA node 1 with access-latency 10 -+nanoseconds, access-bandwidth is 100 MB/s. -+@example -+-machine hmat=on \ -+-m 2G \ -+-object memory-backend-ram,size=1G,id=m0 \ -+-object memory-backend-ram,size=1G,id=m1 \ -+-smp 2 \ -+-numa node,nodeid=0,memdev=m0 \ -+-numa node,nodeid=1,memdev=m1,initiator=0 \ -+-numa cpu,node-id=0,socket-id=0 \ -+-numa cpu,node-id=0,socket-id=1 \ -+-numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5 \ -+-numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M \ -+-numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10 \ -+-numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M -+@end example -+ - ETEXI - - DEF("add-fd", HAS_ARG, QEMU_OPTION_add_fd, diff --git a/numa-Extend-CLI-to-provide-memory-side-c.patch b/numa-Extend-CLI-to-provide-memory-side-c.patch deleted file mode 100644 index 0e23173..0000000 --- a/numa-Extend-CLI-to-provide-memory-side-c.patch +++ /dev/null @@ -1,311 +0,0 @@ -From: Liu Jingqi -Date: Fri, 13 Dec 2019 09:19:24 +0800 -Subject: numa: Extend CLI to provide memory side cache information - -Git-commit: c412a48d4d91e8f8b89aae02de0f44f1f0b729e5 -References: jsc#SLE-8897 - -Add -numa hmat-cache option to provide Memory Side Cache Information. -These memory attributes help to build Memory Side Cache Information -Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). -Before using hmat-cache option, enable HMAT with -machine hmat=on. - -Acked-by: Markus Armbruster -Signed-off-by: Liu Jingqi -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-4-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Reviewed-by: Igor Mammedov -Signed-off-by: Bruce Rogers brogers@suse.com> ---- - hw/core/numa.c | 80 ++++++++++++++++++++++++++++++++++++++++++ - include/sysemu/numa.h | 5 +++ - qapi/machine.json | 81 +++++++++++++++++++++++++++++++++++++++++-- - qemu-options.hx | 17 +++++++-- - 4 files changed, 179 insertions(+), 4 deletions(-) - -diff --git a/hw/core/numa.c b/hw/core/numa.c -index 34eb413f5d58a6feb11214ecc061..747c9680b02837baa309475ca265 100644 ---- a/hw/core/numa.c -+++ b/hw/core/numa.c -@@ -379,6 +379,73 @@ void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, - g_array_append_val(hmat_lb->list, lb_data); - } - -+void parse_numa_hmat_cache(MachineState *ms, NumaHmatCacheOptions *node, -+ Error **errp) -+{ -+ int nb_numa_nodes = ms->numa_state->num_nodes; -+ NodeInfo *numa_info = ms->numa_state->nodes; -+ NumaHmatCacheOptions *hmat_cache = NULL; -+ -+ if (node->node_id >= nb_numa_nodes) { -+ error_setg(errp, "Invalid node-id=%" PRIu32 ", it should be less " -+ "than %d", node->node_id, nb_numa_nodes); -+ return; -+ } -+ -+ if (numa_info[node->node_id].lb_info_provided != (BIT(0) | BIT(1))) { -+ error_setg(errp, "The latency and bandwidth information of " -+ "node-id=%" PRIu32 " should be provided before memory side " -+ "cache attributes", node->node_id); -+ return; -+ } -+ -+ if (node->level < 1 || node->level >= HMAT_LB_LEVELS) { -+ error_setg(errp, "Invalid level=%" PRIu8 ", it should be larger than 0 " -+ "and less than or equal to %d", node->level, -+ HMAT_LB_LEVELS - 1); -+ return; -+ } -+ -+ assert(node->associativity < HMAT_CACHE_ASSOCIATIVITY__MAX); -+ assert(node->policy < HMAT_CACHE_WRITE_POLICY__MAX); -+ if (ms->numa_state->hmat_cache[node->node_id][node->level]) { -+ error_setg(errp, "Duplicate configuration of the side cache for " -+ "node-id=%" PRIu32 " and level=%" PRIu8, -+ node->node_id, node->level); -+ return; -+ } -+ -+ if ((node->level > 1) && -+ ms->numa_state->hmat_cache[node->node_id][node->level - 1] && -+ (node->size >= -+ ms->numa_state->hmat_cache[node->node_id][node->level - 1]->size)) { -+ error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8 -+ " should be less than the size(%" PRIu64 ") of " -+ "level=%u", node->size, node->level, -+ ms->numa_state->hmat_cache[node->node_id] -+ [node->level - 1]->size, -+ node->level - 1); -+ return; -+ } -+ -+ if ((node->level < HMAT_LB_LEVELS - 1) && -+ ms->numa_state->hmat_cache[node->node_id][node->level + 1] && -+ (node->size <= -+ ms->numa_state->hmat_cache[node->node_id][node->level + 1]->size)) { -+ error_setg(errp, "Invalid size=%" PRIu64 ", the size of level=%" PRIu8 -+ " should be larger than the size(%" PRIu64 ") of " -+ "level=%u", node->size, node->level, -+ ms->numa_state->hmat_cache[node->node_id] -+ [node->level + 1]->size, -+ node->level + 1); -+ return; -+ } -+ -+ hmat_cache = g_malloc0(sizeof(*hmat_cache)); -+ memcpy(hmat_cache, node, sizeof(*hmat_cache)); -+ ms->numa_state->hmat_cache[node->node_id][node->level] = hmat_cache; -+} -+ - void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) - { - Error *err = NULL; -@@ -430,6 +497,19 @@ void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) - goto end; - } - break; -+ case NUMA_OPTIONS_TYPE_HMAT_CACHE: -+ if (!ms->numa_state->hmat_enabled) { -+ error_setg(errp, "ACPI Heterogeneous Memory Attribute Table " -+ "(HMAT) is disabled, enable it with -machine hmat=on " -+ "before using any of hmat specific options"); -+ return; -+ } -+ -+ parse_numa_hmat_cache(ms, &object->u.hmat_cache, &err); -+ if (err) { -+ goto end; -+ } -+ break; - default: - abort(); - } -diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h -index 70f93c83d71eb2cdab5bf1dde422..ba693cc80b780ecccd49a4fa9145 100644 ---- a/include/sysemu/numa.h -+++ b/include/sysemu/numa.h -@@ -91,6 +91,9 @@ struct NumaState { - - /* NUMA nodes HMAT Locality Latency and Bandwidth Information */ - HMAT_LB_Info *hmat_lb[HMAT_LB_LEVELS][HMAT_LB_TYPES]; -+ -+ /* Memory Side Cache Information Structure */ -+ NumaHmatCacheOptions *hmat_cache[MAX_NODES][HMAT_LB_LEVELS]; - }; - typedef struct NumaState NumaState; - -@@ -98,6 +101,8 @@ void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp); - void parse_numa_opts(MachineState *ms); - void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, - Error **errp); -+void parse_numa_hmat_cache(MachineState *ms, NumaHmatCacheOptions *node, -+ Error **errp); - void numa_complete_configuration(MachineState *ms); - void query_numa_node_mem(NumaNodeMem node_mem[], MachineState *ms); - extern QemuOptsList qemu_numa_opts; -diff --git a/qapi/machine.json b/qapi/machine.json -index cf8faf5a2a4929560c852bf8d50c..b3d30bc8162da9a0b60005fdd86b 100644 ---- a/qapi/machine.json -+++ b/qapi/machine.json -@@ -428,10 +428,12 @@ - # - # @hmat-lb: memory latency and bandwidth information (Since: 5.0) - # -+# @hmat-cache: memory side cache information (Since: 5.0) -+# - # Since: 2.1 - ## - { 'enum': 'NumaOptionsType', -- 'data': [ 'node', 'dist', 'cpu', 'hmat-lb' ] } -+ 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] } - - ## - # @NumaOptions: -@@ -447,7 +449,8 @@ - 'node': 'NumaNodeOptions', - 'dist': 'NumaDistOptions', - 'cpu': 'NumaCpuOptions', -- 'hmat-lb': 'NumaHmatLBOptions' }} -+ 'hmat-lb': 'NumaHmatLBOptions', -+ 'hmat-cache': 'NumaHmatCacheOptions' }} - - ## - # @NumaNodeOptions: -@@ -646,6 +649,80 @@ - '*latency': 'uint64', - '*bandwidth': 'size' }} - -+## -+# @HmatCacheAssociativity: -+# -+# Cache associativity in the Memory Side Cache Information Structure -+# of HMAT -+# -+# For more information of @HmatCacheAssociativity, see chapter -+# 5.2.27.5: Table 5-147 of ACPI 6.3 spec. -+# -+# @none: None (no memory side cache in this proximity domain, -+# or cache associativity unknown) -+# -+# @direct: Direct Mapped -+# -+# @complex: Complex Cache Indexing (implementation specific) -+# -+# Since: 5.0 -+## -+{ 'enum': 'HmatCacheAssociativity', -+ 'data': [ 'none', 'direct', 'complex' ] } -+ -+## -+# @HmatCacheWritePolicy: -+# -+# Cache write policy in the Memory Side Cache Information Structure -+# of HMAT -+# -+# For more information of @HmatCacheWritePolicy, see chapter -+# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec. -+# -+# @none: None (no memory side cache in this proximity domain, -+# or cache write policy unknown) -+# -+# @write-back: Write Back (WB) -+# -+# @write-through: Write Through (WT) -+# -+# Since: 5.0 -+## -+{ 'enum': 'HmatCacheWritePolicy', -+ 'data': [ 'none', 'write-back', 'write-through' ] } -+ -+## -+# @NumaHmatCacheOptions: -+# -+# Set the memory side cache information for a given memory domain. -+# -+# For more information of @NumaHmatCacheOptions, see chapter -+# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec. -+# -+# @node-id: the memory proximity domain to which the memory belongs. -+# -+# @size: the size of memory side cache in bytes. -+# -+# @level: the cache level described in this structure. -+# -+# @associativity: the cache associativity, -+# none/direct-mapped/complex(complex cache indexing). -+# -+# @policy: the write policy, none/write-back/write-through. -+# -+# @line: the cache Line size in bytes. -+# -+# Since: 5.0 -+## -+{ 'struct': 'NumaHmatCacheOptions', -+ 'data': { -+ 'node-id': 'uint32', -+ 'size': 'size', -+ 'level': 'uint8', -+ 'associativity': 'HmatCacheAssociativity', -+ 'policy': 'HmatCacheWritePolicy', -+ 'line': 'uint16' }} -+ - ## - # @HostMemPolicy: - # -diff --git a/qemu-options.hx b/qemu-options.hx -index 5f7f31457ab6a8640698f6913b07..b0471ed152d77c9e0512c842149f 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -169,7 +169,8 @@ DEF("numa", HAS_ARG, QEMU_OPTION_numa, - "-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node][,initiator=node]\n" - "-numa dist,src=source,dst=destination,val=distance\n" - "-numa cpu,node-id=node[,socket-id=x][,core-id=y][,thread-id=z]\n" -- "-numa hmat-lb,initiator=node,target=node,hierarchy=memory|first-level|second-level|third-level,data-type=access-latency|read-latency|write-latency[,latency=lat][,bandwidth=bw]\n", -+ "-numa hmat-lb,initiator=node,target=node,hierarchy=memory|first-level|second-level|third-level,data-type=access-latency|read-latency|write-latency[,latency=lat][,bandwidth=bw]\n" -+ "-numa hmat-cache,node-id=node,size=size,level=level[,associativity=none|direct|complex][,policy=none|write-back|write-through][,line=size]\n", - QEMU_ARCH_ALL) - STEXI - @item -numa node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}][,initiator=@var{initiator}] -@@ -177,6 +178,7 @@ STEXI - @itemx -numa dist,src=@var{source},dst=@var{destination},val=@var{distance} - @itemx -numa cpu,node-id=@var{node}[,socket-id=@var{x}][,core-id=@var{y}][,thread-id=@var{z}] - @itemx -numa hmat-lb,initiator=@var{node},target=@var{node},hierarchy=@var{hierarchy},data-type=@var{tpye}[,latency=@var{lat}][,bandwidth=@var{bw}] -+@itemx -numa hmat-cache,node-id=@var{node},size=@var{size},level=@var{level}[,associativity=@var{str}][,policy=@var{str}][,line=@var{size}] - @findex -numa - Define a NUMA node and assign RAM and VCPUs to it. - Set the NUMA distance from a source node to a destination node. -@@ -280,11 +282,20 @@ NUM byte per second (or MB/s, GB/s or TB/s depending on used suffix). - Note that if latency or bandwidth value is 0, means the corresponding latency or - bandwidth information is not provided. - -+In @samp{hmat-cache} option, @var{node-id} is the NUMA-id of the memory belongs. -+@var{size} is the size of memory side cache in bytes. @var{level} is the cache -+level described in this structure, note that the cache level 0 should not be used -+with @samp{hmat-cache} option. @var{associativity} is the cache associativity, -+the possible value is 'none/direct(direct-mapped)/complex(complex cache indexing)'. -+@var{policy} is the write policy. @var{line} is the cache Line size in bytes. -+ - For example, the following options describe 2 NUMA nodes. Node 0 has 2 cpus and - a ram, node 1 has only a ram. The processors in node 0 access memory in node - 0 with access-latency 5 nanoseconds, access-bandwidth is 200 MB/s; - The processors in NUMA node 0 access memory in NUMA node 1 with access-latency 10 - nanoseconds, access-bandwidth is 100 MB/s. -+And for memory side cache information, NUMA node 0 and 1 both have 1 level memory -+cache, size is 10KB, policy is write-back, the cache Line size is 8 bytes: - @example - -machine hmat=on \ - -m 2G \ -@@ -298,7 +309,9 @@ nanoseconds, access-bandwidth is 100 MB/s. - -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-latency,latency=5 \ - -numa hmat-lb,initiator=0,target=0,hierarchy=memory,data-type=access-bandwidth,bandwidth=200M \ - -numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-latency,latency=10 \ ---numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M -+-numa hmat-lb,initiator=0,target=1,hierarchy=memory,data-type=access-bandwidth,bandwidth=100M \ -+-numa hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8 \ -+-numa hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8 - @end example - - ETEXI diff --git a/numa-properly-check-if-numa-is-supported.patch b/numa-properly-check-if-numa-is-supported.patch deleted file mode 100644 index 4aead2b..0000000 --- a/numa-properly-check-if-numa-is-supported.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Igor Mammedov -Date: Thu, 12 Dec 2019 13:48:56 +0100 -Subject: numa: properly check if numa is supported - -Git-commit: fcd3f2cc124600385dba46c69a80626985c15b50 - -Commit aa57020774b, by mistake used MachineClass::numa_mem_supported -to check if NUMA is supported by machine and also as unrelated change -set it to true for sbsa-ref board. - -Luckily change didn't break machines that support NUMA, as the field -is set to true for them. - -But the field is not intended for checking if NUMA is supported and -will be flipped to false within this release for new machine types. - -Fix it: - - by using previously used condition - !mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id - the first time and then use MachineState::numa_state down the road - to check if NUMA is supported - - dropping stray sbsa-ref chunk - -Fixes: aa57020774b690a22be72453b8e91c9b5a68c516 -Signed-off-by: Igor Mammedov -Message-Id: <1576154936-178362-3-git-send-email-imammedo@redhat.com> -Signed-off-by: Eduardo Habkost -Signed-off-by: Bruce Rogers ---- - hw/arm/sbsa-ref.c | 1 - - hw/core/machine.c | 4 ++-- - 2 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c -index 27046cc284f4b9daa59468889430..c6261d44a4c53e8a6bc14bbf088d 100644 ---- a/hw/arm/sbsa-ref.c -+++ b/hw/arm/sbsa-ref.c -@@ -791,7 +791,6 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data) - mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids; - mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props; - mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id; -- mc->numa_mem_supported = true; - } - - static const TypeInfo sbsa_ref_info = { -diff --git a/hw/core/machine.c b/hw/core/machine.c -index 1689ad3bf8afd18f0e774ed41a8d..aa63231f3160aaf32874e59ba452 100644 ---- a/hw/core/machine.c -+++ b/hw/core/machine.c -@@ -958,7 +958,7 @@ static void machine_initfn(Object *obj) - NULL); - } - -- if (mc->numa_mem_supported) { -+ if (mc->cpu_index_to_instance_props && mc->get_default_cpu_node_id) { - ms->numa_state = g_new0(NumaState, 1); - } - -@@ -1102,7 +1102,7 @@ void machine_run_board_init(MachineState *machine) - { - MachineClass *machine_class = MACHINE_GET_CLASS(machine); - -- if (machine_class->numa_mem_supported) { -+ if (machine->numa_state) { - numa_complete_configuration(machine); - if (machine->numa_state->num_nodes) { - machine_numa_finish_cpu_init(machine); diff --git a/pc-bios-s390x-Save-iplb-location-in-lowc.patch b/pc-bios-s390x-Save-iplb-location-in-lowc.patch deleted file mode 100644 index 6514eab..0000000 --- a/pc-bios-s390x-Save-iplb-location-in-lowc.patch +++ /dev/null @@ -1,133 +0,0 @@ -From: Janosch Frank -Date: Wed, 4 Mar 2020 06:42:31 -0500 -Subject: pc-bios: s390x: Save iplb location in lowcore - -Git-commit: 9bfc04f9ef6802fff0fc77130ff345a541783363 -References: bsc#1163140, bsc#1167075 - -The POP states that for a list directed IPL the IPLB is stored into -memory by the machine loader and its address is stored at offset 0x14 -of the lowcore. - -ZIPL currently uses the address in offset 0x14 to access the IPLB and -acquire flags about secure boot. If the IPLB address points into -memory which has an unsupported mix of flags set, ZIPL will panic -instead of booting the OS. - -As the lowcore can have quite a high entropy for a guest that did drop -out of protected mode (i.e. rebooted) we encountered the ZIPL panic -quite often. - -Signed-off-by: Janosch Frank -Tested-by: Marc Hartmayer -Message-Id: <20200304114231.23493-19-frankja@linux.ibm.com> -Reviewed-by: Christian Borntraeger -Reviewed-by: David Hildenbrand -Signed-off-by: Christian Borntraeger -Signed-off-by: Liang Yan -Signed-off-by: Bruce Rogers ---- - pc-bios/s390-ccw/jump2ipl.c | 1 + - pc-bios/s390-ccw/main.c | 8 +++++++- - pc-bios/s390-ccw/netmain.c | 1 + - pc-bios/s390-ccw/s390-arch.h | 10 ++++++++-- - pc-bios/s390-ccw/s390-ccw.h | 1 + - 5 files changed, 18 insertions(+), 3 deletions(-) - -diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c -index 266f1502b9675d2a58cb7ae8adbb..1489e5043c85863df9e91951fbd1 100644 ---- a/pc-bios/s390-ccw/jump2ipl.c -+++ b/pc-bios/s390-ccw/jump2ipl.c -@@ -35,6 +35,7 @@ void jump_to_IPL_code(uint64_t address) - { - /* store the subsystem information _after_ the bootmap was loaded */ - write_subsystem_identification(); -+ write_iplb_location(); - - /* prevent unknown IPL types in the guest */ - if (iplb.pbt == S390_IPL_TYPE_QEMU_SCSI) { -diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c -index a21b38628075b450477af9565fd6..4e65b411e1d890ba7f8536d7b99f 100644 ---- a/pc-bios/s390-ccw/main.c -+++ b/pc-bios/s390-ccw/main.c -@@ -9,6 +9,7 @@ - */ - - #include "libc.h" -+#include "helper.h" - #include "s390-arch.h" - #include "s390-ccw.h" - #include "cio.h" -@@ -22,7 +23,7 @@ QemuIplParameters qipl; - IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE))); - static bool have_iplb; - static uint16_t cutype; --LowCore const *lowcore; /* Yes, this *is* a pointer to address 0 */ -+LowCore *lowcore; /* Yes, this *is* a pointer to address 0 */ - - #define LOADPARM_PROMPT "PROMPT " - #define LOADPARM_EMPTY " " -@@ -42,6 +43,11 @@ void write_subsystem_identification(void) - *zeroes = 0; - } - -+void write_iplb_location(void) -+{ -+ lowcore->ptr_iplb = ptr2u32(&iplb); -+} -+ - void panic(const char *string) - { - sclp_print(string); -diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c -index f2dcc01e27257696d110b12164c9..309ffa30d992207770d51ffc7d9a 100644 ---- a/pc-bios/s390-ccw/netmain.c -+++ b/pc-bios/s390-ccw/netmain.c -@@ -40,6 +40,7 @@ - #define DEFAULT_TFTP_RETRIES 20 - - extern char _start[]; -+void write_iplb_location(void) {} - - #define KERNEL_ADDR ((void *)0L) - #define KERNEL_MAX_SIZE ((long)_start) -diff --git a/pc-bios/s390-ccw/s390-arch.h b/pc-bios/s390-ccw/s390-arch.h -index 504fc7c2f09878cb6b37e307bb20..5f36361c0223d43439a249e84040 100644 ---- a/pc-bios/s390-ccw/s390-arch.h -+++ b/pc-bios/s390-ccw/s390-arch.h -@@ -36,7 +36,13 @@ typedef struct LowCore { - /* prefix area: defined by architecture */ - PSWLegacy ipl_psw; /* 0x000 */ - uint32_t ccw1[2]; /* 0x008 */ -- uint32_t ccw2[2]; /* 0x010 */ -+ union { -+ uint32_t ccw2[2]; /* 0x010 */ -+ struct { -+ uint32_t reserved10; -+ uint32_t ptr_iplb; -+ }; -+ }; - uint8_t pad1[0x80 - 0x18]; /* 0x018 */ - uint32_t ext_params; /* 0x080 */ - uint16_t cpu_addr; /* 0x084 */ -@@ -85,7 +91,7 @@ typedef struct LowCore { - PSW io_new_psw; /* 0x1f0 */ - } __attribute__((packed, aligned(8192))) LowCore; - --extern LowCore const *lowcore; -+extern LowCore *lowcore; - - static inline void set_prefix(uint32_t address) - { -diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h -index 11bce7d73c85581e561d5802059b..21f27e79906ea297c4480eeaee2e 100644 ---- a/pc-bios/s390-ccw/s390-ccw.h -+++ b/pc-bios/s390-ccw/s390-ccw.h -@@ -57,6 +57,7 @@ void consume_io_int(void); - /* main.c */ - void panic(const char *string); - void write_subsystem_identification(void); -+void write_iplb_location(void); - extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE))); - unsigned int get_loadparm_index(void); - diff --git a/ppc-ppc405_boards-Remove-unnecessary-NUL.patch b/ppc-ppc405_boards-Remove-unnecessary-NUL.patch deleted file mode 100644 index 0a9f319..0000000 --- a/ppc-ppc405_boards-Remove-unnecessary-NUL.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Fri, 20 Mar 2020 16:57:40 +0100 -Subject: ppc/ppc405_boards: Remove unnecessary NULL check -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 1583794b9b36911df116cc726750dadbeeac506a - -This code is inside the "if (dinfo)" condition, so testing -again here whether it is NULL is unnecessary. - -Fixes: dd59bcae7 (Don't size flash memory to match backing image) -Reported-by: Coverity (CID 1421917) -Suggested-by: Peter Maydell -Signed-off-by: Philippe Mathieu-Daudé -Message-Id: <20200320155740.5342-1-philmd@redhat.com> -Reviewed-by: Markus Armbruster -Signed-off-by: David Gibson -Signed-off-by: Bruce Rogers ---- - hw/ppc/ppc405_boards.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c -index 1f721feed6a4bfc128187aefb5d9..556f3a80ec1ddbc018e00941c5c5 100644 ---- a/hw/ppc/ppc405_boards.c -+++ b/hw/ppc/ppc405_boards.c -@@ -184,7 +184,7 @@ static void ref405ep_init(MachineState *machine) - bios_size = 8 * MiB; - pflash_cfi02_register((uint32_t)(-bios_size), - "ef405ep.bios", bios_size, -- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, -+ blk_by_legacy_dinfo(dinfo), - 64 * KiB, 1, - 2, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA, - 1); -@@ -450,7 +450,7 @@ static void taihu_405ep_init(MachineState *machine) - bios_size = 2 * MiB; - pflash_cfi02_register(0xFFE00000, - "taihu_405ep.bios", bios_size, -- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, -+ blk_by_legacy_dinfo(dinfo), - 64 * KiB, 1, - 4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA, - 1); -@@ -486,7 +486,7 @@ static void taihu_405ep_init(MachineState *machine) - if (dinfo) { - bios_size = 32 * MiB; - pflash_cfi02_register(0xfc000000, "taihu_405ep.flash", bios_size, -- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL, -+ blk_by_legacy_dinfo(dinfo), - 64 * KiB, 1, - 4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA, - 1); diff --git a/qcow2-List-autoclear-bit-names-in-header.patch b/qcow2-List-autoclear-bit-names-in-header.patch deleted file mode 100644 index 0f2e394..0000000 --- a/qcow2-List-autoclear-bit-names-in-header.patch +++ /dev/null @@ -1,200 +0,0 @@ -From: Eric Blake -Date: Tue, 24 Mar 2020 12:42:31 -0500 -Subject: qcow2: List autoclear bit names in header - -Git-commit bb40ebce2cb0bd4bf37968074d43d5a864fb6dee - -The feature table is supposed to advertise the name of all feature -bits that we support; however, we forgot to update the table for -autoclear bits. While at it, move the table to read-only memory in -code, and tweak the qcow2 spec to name the second autoclear bit. -Update iotests that are affected by the longer header length. - -Fixes: 88ddffae -Fixes: 93c24936 -Signed-off-by: Eric Blake -Reviewed-by: Vladimir Sementsov-Ogievskiy -Message-Id: <20200324174233.1622067-3-eblake@redhat.com> -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2.c | 12 +++++++++++- - docs/interop/qcow2.txt | 3 ++- - tests/qemu-iotests/031.out | 8 ++++---- - tests/qemu-iotests/036.out | 4 ++-- - tests/qemu-iotests/061.out | 14 +++++++------- - 5 files changed, 26 insertions(+), 15 deletions(-) - -diff --git a/block/qcow2.c b/block/qcow2.c -index 13e118e16f02f371c0f23c7aaa8d..77edd98be6fbaf0949dcb7755e48 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -2822,7 +2822,7 @@ int qcow2_update_header(BlockDriverState *bs) - - /* Feature table */ - if (s->qcow_version >= 3) { -- Qcow2Feature features[] = { -+ static const Qcow2Feature features[] = { - { - .type = QCOW2_FEAT_TYPE_INCOMPATIBLE, - .bit = QCOW2_INCOMPAT_DIRTY_BITNR, -@@ -2843,6 +2843,16 @@ int qcow2_update_header(BlockDriverState *bs) - .bit = QCOW2_COMPAT_LAZY_REFCOUNTS_BITNR, - .name = "lazy refcounts", - }, -+ { -+ .type = QCOW2_FEAT_TYPE_AUTOCLEAR, -+ .bit = QCOW2_AUTOCLEAR_BITMAPS_BITNR, -+ .name = "bitmaps", -+ }, -+ { -+ .type = QCOW2_FEAT_TYPE_AUTOCLEAR, -+ .bit = QCOW2_AUTOCLEAR_DATA_FILE_RAW_BITNR, -+ .name = "raw external data", -+ }, - }; - - ret = header_ext_add(buf, QCOW2_EXT_MAGIC_FEATURE_TABLE, -diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt -index af5711e5337191d2c01932b0b3d0..8510d74c807927b86cf76a0f6cb8 100644 ---- a/docs/interop/qcow2.txt -+++ b/docs/interop/qcow2.txt -@@ -138,7 +138,8 @@ in the description of a field. - bit is unset, the bitmaps extension data must be - considered inconsistent. - -- Bit 1: If this bit is set, the external data file can -+ Bit 1: Raw external data bit -+ If this bit is set, the external data file can - be read as a consistent standalone raw image - without looking at the qcow2 metadata. - -diff --git a/tests/qemu-iotests/031.out b/tests/qemu-iotests/031.out -index 68a74d03b9971ea8946e8fce41d6..f1941300d817ef1026046891c4df 100644 ---- a/tests/qemu-iotests/031.out -+++ b/tests/qemu-iotests/031.out -@@ -117,7 +117,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - Header extension: -@@ -150,7 +150,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - Header extension: -@@ -164,7 +164,7 @@ No errors were found on the image. - - magic 0x514649fb - version 3 --backing_file_offset 0x178 -+backing_file_offset 0x1d8 - backing_file_size 0x17 - cluster_bits 16 - size 67108864 -@@ -188,7 +188,7 @@ data 'host_device' - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - Header extension: -diff --git a/tests/qemu-iotests/036.out b/tests/qemu-iotests/036.out -index e489b443866c515b42be344a9b85..3c19fa1edee7aeee1589a1c68366 100644 ---- a/tests/qemu-iotests/036.out -+++ b/tests/qemu-iotests/036.out -@@ -58,7 +58,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - -@@ -86,7 +86,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - *** done -diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out -index d6a7c2af95f2dcff314f425fd6a3..f98c098b5431072d4e54de1475cc 100644 ---- a/tests/qemu-iotests/061.out -+++ b/tests/qemu-iotests/061.out -@@ -26,7 +26,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - magic 0x514649fb -@@ -84,7 +84,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - magic 0x514649fb -@@ -140,7 +140,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - ERROR cluster 5 refcount=0 reference=1 -@@ -195,7 +195,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - magic 0x514649fb -@@ -264,7 +264,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - read 65536/65536 bytes at offset 44040192 -@@ -298,7 +298,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - ERROR cluster 5 refcount=0 reference=1 -@@ -327,7 +327,7 @@ header_length 104 - - Header extension: - magic 0x6803f857 --length 192 -+length 288 - data - - read 131072/131072 bytes at offset 0 diff --git a/qcow2-bitmaps-fix-qcow2_can_store_new_di.patch b/qcow2-bitmaps-fix-qcow2_can_store_new_di.patch deleted file mode 100644 index 9f5b430..0000000 --- a/qcow2-bitmaps-fix-qcow2_can_store_new_di.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Mon, 14 Oct 2019 14:51:25 +0300 -Subject: qcow2-bitmaps: fix qcow2_can_store_new_dirty_bitmap - -Git-commit: a1db8733d28d615bc0daeada6c406a6dd5c5d5ef - -qcow2_can_store_new_dirty_bitmap works wrong, as it considers only -bitmaps already stored in the qcow2 image and ignores persistent -BdrvDirtyBitmap objects. - -So, let's instead count persistent BdrvDirtyBitmaps. We load all qcow2 -bitmaps on open, so there should not be any bitmap in the image for -which we don't have BdrvDirtyBitmaps version. If it is - it's a kind of -corruption, and no reason to check for corruptions here (open() and -close() are better places for it). - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Message-id: 20191014115126.15360-2-vsementsov@virtuozzo.com -Reviewed-by: Max Reitz -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2-bitmap.c | 41 ++++++++++++++++++----------------------- - 1 file changed, 18 insertions(+), 23 deletions(-) - -diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c -index c6c8ebbe89d4252432bfb80e3426..d41f5d049b7d791ac30e1e36d3c5 100644 ---- a/block/qcow2-bitmap.c -+++ b/block/qcow2-bitmap.c -@@ -1703,8 +1703,14 @@ bool coroutine_fn qcow2_co_can_store_new_dirty_bitmap(BlockDriverState *bs, - Error **errp) - { - BDRVQcow2State *s = bs->opaque; -- bool found; -- Qcow2BitmapList *bm_list; -+ BdrvDirtyBitmap *bitmap; -+ uint64_t bitmap_directory_size = 0; -+ uint32_t nb_bitmaps = 0; -+ -+ if (bdrv_find_dirty_bitmap(bs, name)) { -+ error_setg(errp, "Bitmap already exists: %s", name); -+ return false; -+ } - - if (s->qcow_version < 3) { - /* Without autoclear_features, we would always have to assume -@@ -1720,38 +1726,27 @@ bool coroutine_fn qcow2_co_can_store_new_dirty_bitmap(BlockDriverState *bs, - goto fail; - } - -- if (s->nb_bitmaps == 0) { -- return true; -+ FOR_EACH_DIRTY_BITMAP(bs, bitmap) { -+ if (bdrv_dirty_bitmap_get_persistence(bitmap)) { -+ nb_bitmaps++; -+ bitmap_directory_size += -+ calc_dir_entry_size(strlen(bdrv_dirty_bitmap_name(bitmap)), 0); -+ } - } -+ nb_bitmaps++; -+ bitmap_directory_size += calc_dir_entry_size(strlen(name), 0); - -- if (s->nb_bitmaps >= QCOW2_MAX_BITMAPS) { -+ if (nb_bitmaps > QCOW2_MAX_BITMAPS) { - error_setg(errp, - "Maximum number of persistent bitmaps is already reached"); - goto fail; - } - -- if (s->bitmap_directory_size + calc_dir_entry_size(strlen(name), 0) > -- QCOW2_MAX_BITMAP_DIRECTORY_SIZE) -- { -+ if (bitmap_directory_size > QCOW2_MAX_BITMAP_DIRECTORY_SIZE) { - error_setg(errp, "Not enough space in the bitmap directory"); - goto fail; - } - -- qemu_co_mutex_lock(&s->lock); -- bm_list = bitmap_list_load(bs, s->bitmap_directory_offset, -- s->bitmap_directory_size, errp); -- qemu_co_mutex_unlock(&s->lock); -- if (bm_list == NULL) { -- goto fail; -- } -- -- found = find_bitmap_by_name(bm_list, name); -- bitmap_list_free(bm_list); -- if (found) { -- error_setg(errp, "Bitmap with the same name is already stored"); -- goto fail; -- } -- - return true; - - fail: diff --git a/qemu-4.2.0.tar.xz b/qemu-4.2.0.tar.xz deleted file mode 100644 index 4b4b7cf..0000000 --- a/qemu-4.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0 -size 62222068 diff --git a/qemu-4.2.0.tar.xz.sig b/qemu-4.2.0.tar.xz.sig deleted file mode 100644 index f5c74fcfe05201d61facce759e79bf07e4683bebf452807dab3b462205270041..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}0W$;u0SW*e79j-AtjXb3H0!IlEkB?$Q_0Tp2(^R-0$uX9`v3|F5HnNB z&hZGfgbxh||8_|eY)TD?&}p-O?87p7VzO#8$^zM{c3{i-Boh)1P@iT}$Ym0&Q8E6q z$!ZLH@W_GXh}Y-D2n4sLSVW-(2WrdrZIOz`EU8s;Vn#p)-rKclWA#ViLGFcxKLRZq z^!Ben_E>$PGf&CrgQ)6L@75))5S*}k^WSr*!G&fsk!XUc!gY4pBf~(c8bPZ?Es@~_ zv)44PRFjBsujzh$u$JV-bS0uRzL@gf)&a)#gkUfzPi`q&gzyYI2eF_I5D*={Tn3|g zh#N>H#7mv%V^@8N)Mt#Uzc+F--WX+@RrK7&kUOG61vI27`c4d0e`^Ae=YK|(hlx6) ING4V>sqx#9-T(jq diff --git a/qemu-5.0.0.tar.xz b/qemu-5.0.0.tar.xz new file mode 100644 index 0000000..f738e83 --- /dev/null +++ b/qemu-5.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f13a92a0fa5c8b69ff0796b59b86b080bbb92ebad5d301a7724dd06b5e78cb6 +size 62426192 diff --git a/qemu-5.0.0.tar.xz.sig b/qemu-5.0.0.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..07b4540f52ccaca3e582aaca800d45fdec1ffdb901806bd68fe2825821b2a40f GIT binary patch literal 310 zcmV-60m=S}0W$;u0SW*e79j-AtjXb3H0!IlEkB?$Q_0Tp2(^R-0$!+v9smjn5HnNB z&hZGfgoz&q|4O2q2gLs}={x#PzIed}zKXj?UPI=Nq!kM|r?Y)RcaA1bCP^*Kwso)Z zKzU63+-A8I5Yq;ZcJ8m&?1f%SPE^@9sNm&JzQC8;*th?7DhjWXaZeRV=#2YeN8~n? zFS~VdE3wIw93$T0-UxPg1JFMr?QNs_p>vAA{y|A$#^r!IpWe<@k=J3NJ$WIj)bUL) zs)?f#84G#{Ltw8s0e8EB|82=yNGWUOS%V>FwC5~%@>~H*-p-8+Gb?812rmEk?l-?^ zaB7cPgJA*zFnr?-&X;sZ_J{I2+Cz$o#C|0_r6O%B6R IR!<5b^|+{(%m4rY literal 0 HcmV?d00001 diff --git a/qemu-bridge-helper-reduce-security-profi.patch b/qemu-bridge-helper-reduce-security-profi.patch index 900f598..acfc784 100644 --- a/qemu-bridge-helper-reduce-security-profi.patch +++ b/qemu-bridge-helper-reduce-security-profi.patch @@ -19,7 +19,7 @@ Signed-off-by: Andreas Färber 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c -index 3d50ec094c794b9c0835628f10c5..f2291b398f8e4589f649af226dba 100644 +index 88b26747fc866116637716264dea..9ed35df944fa6968045e675e023a 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -123,7 +123,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) diff --git a/qemu-cvs-gettimeofday.patch b/qemu-cvs-gettimeofday.patch index 0f2fea2..ec6b4f8 100644 --- a/qemu-cvs-gettimeofday.patch +++ b/qemu-cvs-gettimeofday.patch @@ -11,16 +11,16 @@ Signed-off-by: Bruce Rogers 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 171c0caef3a191c861e76493ccfc..25b0f3bba38b8629cb4bc027be96 100644 +index 05f03919ff070a06444d82e86a70..1a350d1a9e0ff9f99e36817a6ecc 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -8558,6 +8558,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, - case TARGET_NR_gettimeofday: +@@ -8837,6 +8837,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, { struct timeval tv; + struct timezone tz; + if (copy_from_user_timeval(&tv, arg1)) { + return -TARGET_EFAULT; + } - ret = get_errno(gettimeofday(&tv, NULL)); + + ret = get_errno(gettimeofday(&tv, &tz)); if (!is_error(ret)) { - if (copy_to_user_timeval(arg1, &tv)) diff --git a/qemu-cvs-ioctl_debug.patch b/qemu-cvs-ioctl_debug.patch index d836d98..3156497 100644 --- a/qemu-cvs-ioctl_debug.patch +++ b/qemu-cvs-ioctl_debug.patch @@ -9,27 +9,29 @@ Signed-off-by: Ulrich Hecht [BR: minor edits to pass qemu's checkpatch script] Signed-off-by: Bruce Rogers --- - linux-user/syscall.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) + linux-user/syscall.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 25b0f3bba38b8629cb4bc027be96..49db231f031015265f6d8cead831 100644 +index 1a350d1a9e0ff9f99e36817a6ecc..946c1e3a1957ea43368311acecda 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5151,7 +5151,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5301,8 +5301,21 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) ie = ioctl_entries; for(;;) { if (ie->target_cmd == 0) { -- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd); + int i; -+ gemu_log("Unsupported ioctl: cmd=0x%04lx (%x)\n", (unsigned long)cmd, + qemu_log_mask( +- LOG_UNIMP, "Unsupported ioctl: cmd=0x%04lx\n", (long)cmd); ++ LOG_UNIMP, "Unsupported ioctl: cmd=0x%04lx (%x)\n", (unsigned long)cmd, + (unsigned int)(cmd & (TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT)) + >> TARGET_IOC_SIZESHIFT); + for (i = 0; ioctl_entries[i].target_cmd; i++) { + if ((ioctl_entries[i].target_cmd & ~(TARGET_IOC_SIZEMASK + << TARGET_IOC_SIZESHIFT)) == (cmd & ~(TARGET_IOC_SIZEMASK << + TARGET_IOC_SIZESHIFT))) -+ gemu_log("%p\t->\t%s (%x)\n", (void *)(unsigned long) ++ qemu_log_mask( ++ LOG_UNIMP, "%p\t->\t%s (%x)\n", (void *)(unsigned long) + ioctl_entries[i].host_cmd, ioctl_entries[i].name, + (ioctl_entries[i].target_cmd & (TARGET_IOC_SIZEMASK + << TARGET_IOC_SIZESHIFT)) >> TARGET_IOC_SIZESHIFT); diff --git a/qemu-cvs-ioctl_nodirection.patch b/qemu-cvs-ioctl_nodirection.patch index ada3a73..d22bc6b 100644 --- a/qemu-cvs-ioctl_nodirection.patch +++ b/qemu-cvs-ioctl_nodirection.patch @@ -16,10 +16,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 8 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 49db231f031015265f6d8cead831..57be4c98555e50f2263811cd11f4 100644 +index 946c1e3a1957ea43368311acecda..894627b9dc8d4f72c06bab90aa9b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5192,6 +5192,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5346,6 +5346,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 @@ index 49db231f031015265f6d8cead831..57be4c98555e50f2263811cd11f4 100644 case IOC_R: ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); if (!is_error(ret)) { -@@ -5210,6 +5217,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5364,6 +5371,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; diff --git a/qemu.changes b/qemu.changes index b7d300b..def2842 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,162 @@ +------------------------------------------------------------------- +Tue Apr 28 18:10:25 UTC 2020 - Bruce Rogers + +- Update to v5.0.0: See http://wiki.qemu.org/ChangeLog/5.0 + Take note that ongoing feature deprecation is tracked at both + http://wiki.qemu-project.org/Features/LegacyRemoval and in + the deprecated.html file installed with the qemu package + Some noteworthy changes: +* x86: EPYC-Rome vcpu model +* x86: vcpu model fixes for EPYC, Denverton, and Icelake-Server +* s390: (as previously mentioned) Protected Virtualization support: + start and control guest in secure mode (bsc#1167075 jsc#SLE-7407) +* s390: support for Adapter Interrupt Suppression while running in + KVM mode +* PowerPC: pseries: NVDIMMs with file backend supported +* PowerPC: powernv: KVM guests now runnable under TCG emulation +* PowerPC: powernv: Basic POWER10 support +* ARM: new boards: tacoma-bmc, Netduindo Plus 2, Orangepi PC +* ARM: 'virt' machine now supports vTPM and virtio-iommu devices +* ARM:Cortex-M7 CPU support +* ARM: Lots of architecture features now emulated +* ARM: TPM supported +* ARM: Timekeeping improvements +* ARM: LOTS more - refer to upstream changelog +* virtio-iommu +* VNC compatibility with noVNC improved +* Support for using memory backends for main/"built-in" guest RAM +* hostmem backends can now specify prealloc thread count +* Better Azure compatibility of VHD images +* Ceph namespaces supported +* Compress block filter driver can create compressed backup images +* virtiofsd availble for host filesystem passthrough +* Improved html based documentation is provided with this release +* Live migration support for external processes running on QEMU D-Bus +* Patches dropped (upstream unless otherwise noted): + i386-Add-MSR-feature-bit-for-MDS-NO.patch + i386-Add-macro-for-stibp.patch + i386-Add-new-CPU-model-Cooperlake.patch + arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch + iotests-Skip-test-060-if-it-is-not-possi.patch + iotests-Skip-test-079-if-it-is-not-possi.patch + Revert-qemu-options.hx-Update-for-reboot.patch + iotests-Provide-a-function-for-checking-.patch + Fix-double-free-issue-in-qemu_set_log_fi.patch + iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch + virtio-blk-fix-out-of-bounds-access-to-b.patch + block-Activate-recursively-even-for-alre.patch + i386-Resolve-CPU-models-to-v1-by-default.patch + numa-properly-check-if-numa-is-supported.patch + vhost-user-gpu-Drop-trailing-json-comma.patch + display-bochs-display-fix-memory-leak.patch + hw-arm-smmuv3-Apply-address-mask-to-line.patch + hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch + hw-arm-smmuv3-Check-stream-IDs-against-a.patch + hw-arm-smmuv3-Align-stream-table-base-ad.patch + hw-arm-smmuv3-Use-correct-bit-positions-.patch + hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch + block-Add-bdrv_qapi_perm_to_blk_perm.patch + blkdebug-Allow-taking-unsharing-permissi.patch + virtio-add-ability-to-delete-vq-through-.patch + virtio-update-queue-size-on-guest-write.patch + virtio-don-t-enable-notifications-during.patch + numa-Extend-CLI-to-provide-initiator-inf.patch + numa-Extend-CLI-to-provide-memory-latenc.patch + numa-Extend-CLI-to-provide-memory-side-c.patch + hmat-acpi-Build-Memory-Proximity-Domain-.patch + hmat-acpi-Build-System-Locality-Latency-.patch + hmat-acpi-Build-Memory-Side-Cache-Inform.patch + tests-numa-Add-case-for-QMP-build-HMAT.patch + qcow2-bitmaps-fix-qcow2_can_store_new_di.patch + backup-top-Begin-drain-earlier.patch + virtio-mmio-update-queue-size-on-guest-w.patch + virtio-net-delete-also-control-queue-whe.patch + intel_iommu-a-fix-to-vtd_find_as_from_bu.patch + target-i386-Add-new-bit-definitions-of-M.patch + target-i386-Add-missed-features-to-Coope.patch + hw-i386-pc-fix-regression-in-parsing-vga.patch + migration-test-ppc64-fix-FORTH-test-prog.patch + target-arm-Return-correct-IL-bit-in-merg.patch + target-arm-Set-ISSIs16Bit-in-make_issinf.patch + runstate-ignore-finishmigrate-prelaunch-.patch + migration-Rate-limit-inside-host-pages.patch + m68k-Fix-regression-causing-Single-Step-.patch + Revert-vnc-allow-fall-back-to-RAW-encodi.patch + vnc-prioritize-ZRLE-compression-over-ZLI.patch + target-i386-kvm-initialize-feature-MSRs-.patch + s390x-adapter-routes-error-handling.patch + iscsi-Cap-block-count-from-GET-LBA-STATU.patch + block-backup-fix-memory-leak-in-bdrv_bac.patch + tpm-ppi-page-align-PPI-RAM.patch + hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch + target-arm-fix-TCG-leak-for-fcvt-half-do.patch + block-fix-memleaks-in-bdrv_refresh_filen.patch + block-backup-top-fix-failure-path.patch + iotests-add-test-for-backup-top-failure-.patch + audio-oss-fix-buffer-pos-calculation.patch + target-arm-monitor-query-cpu-model-expan.patch + block-fix-crash-on-zero-length-unaligned.patch + block-Fix-VM-size-field-width-in-snapsho.patch + target-arm-Correct-definition-of-PMCRDP.patch + block-nbd-extract-the-common-cleanup-cod.patch + block-nbd-fix-memory-leak-in-nbd_open.patch + virtio-crypto-do-delete-ctrl_vq-in-virti.patch + virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch + vhost-user-blk-delete-virtioqueues-in-un.patch + hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch + pc-bios-s390x-Save-iplb-location-in-lowc.patch + iotests-Fix-nonportable-use-of-od-endian.patch + block-qcow2-threads-fix-qcow2_decompress.patch + job-refactor-progress-to-separate-object.patch + block-block-copy-fix-progress-calculatio.patch + block-io-fix-bdrv_co_do_copy_on_readv.patch + scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch + target-ppc-Fix-rlwinm-on-ppc64.patch + compat-disable-edid-on-correct-virtio-gp.patch + ppc-ppc405_boards-Remove-unnecessary-NUL.patch + block-Avoid-memleak-on-qcow2-image-info-.patch + block-bdrv_set_backing_bs-fix-use-after-.patch + hmp-vnc-Fix-info-vnc-list-leak.patch + migration-colo-fix-use-after-free-of-loc.patch + migration-ram-fix-use-after-free-of-loca.patch + qcow2-List-autoclear-bit-names-in-header.patch + sheepdog-Consistently-set-bdrv_has_zero_.patch + target-arm-Fix-PAuth-sbox-functions.patch + tcg-i386-Fix-INDEX_op_dup2_vec.patch + net-tulip-check-frame-size-and-r-w-data-.patch + target-i386-do-not-set-unsupported-VMX-s.patch + spapr-Fix-failure-path-for-attempting-to.patch + ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch + xen-block-Fix-double-qlist-remove-and-re.patch + vpc-Don-t-round-up-already-aligned-BAT-s.patch + target-xtensa-fix-pasto-in-pfwait.r-opco.patch + aio-wait-delegate-polling-of-main-AioCon.patch + async-use-explicit-memory-barriers.patch + tcg-mips-mips-sync-encode-error.patch + vhost-user-gpu-Release-memory-returned-b.patch + vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch (no pc-0.15) + hw-i386-disable-smbus-migration-for-xenf.patch + s390x-Don-t-do-a-normal-reset-on-the-ini.patch + s390x-Move-reset-normal-to-shared-reset-.patch + s390x-Move-initial-reset.patch + s390x-Move-clear-reset.patch + s390x-kvm-Make-kvm_sclp_service_call-voi.patch + s390x-ipl-Consolidate-iplb-validity-chec.patch + s390x-Beautify-diag308-handling.patch + s390x-Add-missing-vcpu-reset-functions.patch + s390-sclp-improve-special-wait-psw-logic.patch + vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch + util-add-slirp_fmt-helpers.patch + slirp-use-correct-size-while-emulating-I.patch + tcp_emu-Fix-oob-access.patch + slirp-use-correct-size-while-emulating-c.patch + tcp_emu-fix-unsafe-snprintf-usages.patch +- For SLE builds, leverage the html documentation by adding a link + to the SUSE specific support documentation (the *.txt support doc + was slightly tweaked to be acceptable as reStructuredText for + conversion to html) + docs-add-SUSE-support-statements-to-html.patch + ------------------------------------------------------------------- Mon Apr 27 19:35:55 UTC 2020 - Bruce Rogers diff --git a/qemu.spec b/qemu.spec index 150b62c..ece8444 100644 --- a/qemu.spec +++ b/qemu.spec @@ -89,9 +89,9 @@ %bcond_with system_membarrier -%define qemuver 4.2.0 -%define srcver 4.2.0 -%define sbver 1.12.1+ +%define qemuver 5.0.0 +%define srcver 5.0.0 +%define sbver 1.13.0 %define srcname qemu Name: qemu%{name_suffix} URL: https://www.qemu.org/ @@ -127,177 +127,65 @@ Source303: README.PACKAGING # This patch queue is auto-generated - see README.PACKAGING for process # Patches applied in base project: -Patch00000: i386-Add-MSR-feature-bit-for-MDS-NO.patch -Patch00001: i386-Add-macro-for-stibp.patch -Patch00002: i386-Add-new-CPU-model-Cooperlake.patch -Patch00003: arm-arm-powerctl-set-NSACR.-CP11-CP10-bi.patch -Patch00004: iotests-Skip-test-060-if-it-is-not-possi.patch -Patch00005: iotests-Skip-test-079-if-it-is-not-possi.patch -Patch00006: Revert-qemu-options.hx-Update-for-reboot.patch -Patch00007: iotests-Provide-a-function-for-checking-.patch -Patch00008: Fix-double-free-issue-in-qemu_set_log_fi.patch -Patch00009: iotests-Fix-IMGOPTSSYNTAX-for-nbd.patch -Patch00010: virtio-blk-fix-out-of-bounds-access-to-b.patch -Patch00011: block-Activate-recursively-even-for-alre.patch -Patch00012: i386-Resolve-CPU-models-to-v1-by-default.patch -Patch00013: numa-properly-check-if-numa-is-supported.patch -Patch00014: vhost-user-gpu-Drop-trailing-json-comma.patch -Patch00015: display-bochs-display-fix-memory-leak.patch -Patch00016: hw-arm-smmuv3-Apply-address-mask-to-line.patch -Patch00017: hw-arm-smmuv3-Correct-SMMU_BASE_ADDR_MAS.patch -Patch00018: hw-arm-smmuv3-Check-stream-IDs-against-a.patch -Patch00019: hw-arm-smmuv3-Align-stream-table-base-ad.patch -Patch00020: hw-arm-smmuv3-Use-correct-bit-positions-.patch -Patch00021: hw-arm-smmuv3-Report-F_STE_FETCH-fault-a.patch -Patch00022: block-Add-bdrv_qapi_perm_to_blk_perm.patch -Patch00023: blkdebug-Allow-taking-unsharing-permissi.patch -Patch00024: virtio-add-ability-to-delete-vq-through-.patch -Patch00025: virtio-update-queue-size-on-guest-write.patch -Patch00026: virtio-don-t-enable-notifications-during.patch -Patch00027: numa-Extend-CLI-to-provide-initiator-inf.patch -Patch00028: numa-Extend-CLI-to-provide-memory-latenc.patch -Patch00029: numa-Extend-CLI-to-provide-memory-side-c.patch -Patch00030: hmat-acpi-Build-Memory-Proximity-Domain-.patch -Patch00031: hmat-acpi-Build-System-Locality-Latency-.patch -Patch00032: hmat-acpi-Build-Memory-Side-Cache-Inform.patch -Patch00033: tests-numa-Add-case-for-QMP-build-HMAT.patch -Patch00034: qcow2-bitmaps-fix-qcow2_can_store_new_di.patch -Patch00035: backup-top-Begin-drain-earlier.patch -Patch00036: virtio-mmio-update-queue-size-on-guest-w.patch -Patch00037: virtio-net-delete-also-control-queue-whe.patch -Patch00038: intel_iommu-a-fix-to-vtd_find_as_from_bu.patch -Patch00039: target-i386-Add-new-bit-definitions-of-M.patch -Patch00040: target-i386-Add-missed-features-to-Coope.patch -Patch00041: hw-i386-pc-fix-regression-in-parsing-vga.patch -Patch00042: migration-test-ppc64-fix-FORTH-test-prog.patch -Patch00043: target-arm-Return-correct-IL-bit-in-merg.patch -Patch00044: target-arm-Set-ISSIs16Bit-in-make_issinf.patch -Patch00045: runstate-ignore-finishmigrate-prelaunch-.patch -Patch00046: migration-Rate-limit-inside-host-pages.patch -Patch00047: m68k-Fix-regression-causing-Single-Step-.patch -Patch00048: Revert-vnc-allow-fall-back-to-RAW-encodi.patch -Patch00049: vnc-prioritize-ZRLE-compression-over-ZLI.patch -Patch00050: target-i386-kvm-initialize-feature-MSRs-.patch -Patch00051: s390x-adapter-routes-error-handling.patch -Patch00052: iscsi-Cap-block-count-from-GET-LBA-STATU.patch -Patch00053: block-backup-fix-memory-leak-in-bdrv_bac.patch -Patch00054: tpm-ppi-page-align-PPI-RAM.patch -Patch00055: hw-intc-arm_gicv3_kvm-Stop-wrongly-progr.patch -Patch00056: target-arm-fix-TCG-leak-for-fcvt-half-do.patch -Patch00057: block-fix-memleaks-in-bdrv_refresh_filen.patch -Patch00058: block-backup-top-fix-failure-path.patch -Patch00059: iotests-add-test-for-backup-top-failure-.patch -Patch00060: audio-oss-fix-buffer-pos-calculation.patch -Patch00061: target-arm-monitor-query-cpu-model-expan.patch -Patch00062: block-fix-crash-on-zero-length-unaligned.patch -Patch00063: block-Fix-VM-size-field-width-in-snapsho.patch -Patch00064: target-arm-Correct-definition-of-PMCRDP.patch -Patch00065: block-nbd-extract-the-common-cleanup-cod.patch -Patch00066: block-nbd-fix-memory-leak-in-nbd_open.patch -Patch00067: virtio-crypto-do-delete-ctrl_vq-in-virti.patch -Patch00068: virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch -Patch00069: vhost-user-blk-delete-virtioqueues-in-un.patch -Patch00070: hw-arm-cubieboard-use-ARM-Cortex-A8-as-t.patch -Patch00071: pc-bios-s390x-Save-iplb-location-in-lowc.patch -Patch00072: iotests-Fix-nonportable-use-of-od-endian.patch -Patch00073: block-qcow2-threads-fix-qcow2_decompress.patch -Patch00074: job-refactor-progress-to-separate-object.patch -Patch00075: block-block-copy-fix-progress-calculatio.patch -Patch00076: block-io-fix-bdrv_co_do_copy_on_readv.patch -Patch00077: scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch -Patch00078: target-ppc-Fix-rlwinm-on-ppc64.patch -Patch00079: compat-disable-edid-on-correct-virtio-gp.patch -Patch00080: ppc-ppc405_boards-Remove-unnecessary-NUL.patch -Patch00081: block-Avoid-memleak-on-qcow2-image-info-.patch -Patch00082: block-bdrv_set_backing_bs-fix-use-after-.patch -Patch00083: hmp-vnc-Fix-info-vnc-list-leak.patch -Patch00084: migration-colo-fix-use-after-free-of-loc.patch -Patch00085: migration-ram-fix-use-after-free-of-loca.patch -Patch00086: qcow2-List-autoclear-bit-names-in-header.patch -Patch00087: sheepdog-Consistently-set-bdrv_has_zero_.patch -Patch00088: target-arm-Fix-PAuth-sbox-functions.patch -Patch00089: tcg-i386-Fix-INDEX_op_dup2_vec.patch -Patch00090: net-tulip-check-frame-size-and-r-w-data-.patch -Patch00091: target-i386-do-not-set-unsupported-VMX-s.patch -Patch00092: spapr-Fix-failure-path-for-attempting-to.patch -Patch00093: ati-vga-Fix-checks-in-ati_2d_blt-to-avoi.patch -Patch00094: xen-block-Fix-double-qlist-remove-and-re.patch -Patch00095: vpc-Don-t-round-up-already-aligned-BAT-s.patch -Patch00096: target-xtensa-fix-pasto-in-pfwait.r-opco.patch -Patch00097: aio-wait-delegate-polling-of-main-AioCon.patch -Patch00098: async-use-explicit-memory-barriers.patch -Patch00099: tcg-mips-mips-sync-encode-error.patch -Patch00100: vhost-user-gpu-Release-memory-returned-b.patch -Patch00101: XXX-dont-dump-core-on-sigabort.patch -Patch00102: qemu-binfmt-conf-Modify-default-path.patch -Patch00103: qemu-cvs-gettimeofday.patch -Patch00104: qemu-cvs-ioctl_debug.patch -Patch00105: qemu-cvs-ioctl_nodirection.patch -Patch00106: linux-user-add-binfmt-wrapper-for-argv-0.patch -Patch00107: PPC-KVM-Disable-mmu-notifier-check.patch -Patch00108: linux-user-binfmt-support-host-binaries.patch -Patch00109: linux-user-Fake-proc-cpuinfo.patch -Patch00110: linux-user-use-target_ulong.patch -Patch00111: Make-char-muxer-more-robust-wrt-small-FI.patch -Patch00112: linux-user-lseek-explicitly-cast-non-set.patch -Patch00113: AIO-Reduce-number-of-threads-for-32bit-h.patch -Patch00114: xen_disk-Add-suse-specific-flush-disable.patch -Patch00115: qemu-bridge-helper-reduce-security-profi.patch -Patch00116: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch -Patch00117: linux-user-properly-test-for-infinite-ti.patch -Patch00118: roms-Makefile-pass-a-packaging-timestamp.patch -Patch00119: Raise-soft-address-space-limit-to-hard-l.patch -Patch00120: increase-x86_64-physical-bits-to-42.patch -Patch00121: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch -Patch00122: i8254-Fix-migration-from-SLE11-SP2.patch -Patch00123: acpi_piix4-Fix-migration-from-SLE11-SP2.patch -Patch00124: Switch-order-of-libraries-for-mpath-supp.patch -Patch00125: Make-installed-scripts-explicitly-python.patch -Patch00126: hw-smbios-handle-both-file-formats-regar.patch -Patch00127: xen-add-block-resize-support-for-xen-dis.patch -Patch00128: tests-qemu-iotests-Triple-timeout-of-i-o.patch -Patch00129: tests-Fix-block-tests-to-be-compatible-w.patch -Patch00130: xen-ignore-live-parameter-from-xen-save-.patch -Patch00131: Conditionalize-ui-bitmap-installation-be.patch -Patch00132: tests-change-error-message-in-test-162.patch -Patch00133: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch -Patch00134: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch -Patch00135: hw-intc-exynos4210_gic-provide-more-room.patch -Patch00136: configure-only-populate-roms-if-softmmu.patch -Patch00137: pc-bios-s390-ccw-net-avoid-warning-about.patch -Patch00138: roms-change-cross-compiler-naming-to-be-.patch -Patch00139: tests-Disable-some-block-tests-for-now.patch -Patch00140: test-add-mapping-from-arch-of-i686-to-qe.patch -Patch00141: roms-Makefile-enable-cross-compile-for-b.patch -Patch00142: hw-i386-disable-smbus-migration-for-xenf.patch -Patch00143: s390x-Don-t-do-a-normal-reset-on-the-ini.patch -Patch00144: s390x-Move-reset-normal-to-shared-reset-.patch -Patch00145: s390x-Move-initial-reset.patch -Patch00146: s390x-Move-clear-reset.patch -Patch00147: s390x-kvm-Make-kvm_sclp_service_call-voi.patch -Patch00148: s390x-ipl-Consolidate-iplb-validity-chec.patch -Patch00149: s390x-Beautify-diag308-handling.patch -Patch00150: s390x-Add-missing-vcpu-reset-functions.patch -Patch00151: s390-sclp-improve-special-wait-psw-logic.patch -Patch00152: s390x-Move-diagnose-308-subcodes-and-rcs.patch -Patch00153: vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch -Patch00154: Sync-pv.patch -Patch00155: s390x-protvirt-Support-unpack-facility.patch -Patch00156: s390x-protvirt-Add-migration-blocker.patch -Patch00157: s390x-protvirt-Inhibit-balloon-when-swit.patch -Patch00158: s390x-protvirt-KVM-intercept-changes.patch -Patch00159: s390x-Add-SIDA-memory-ops.patch -Patch00160: s390x-protvirt-Move-STSI-data-over-SIDAD.patch -Patch00161: s390x-protvirt-SCLP-interpretation.patch -Patch00162: s390x-protvirt-Set-guest-IPL-PSW.patch -Patch00163: s390x-protvirt-Move-diag-308-data-over-S.patch -Patch00164: s390x-protvirt-Disable-address-checks-fo.patch -Patch00165: s390x-protvirt-Move-IO-control-structure.patch -Patch00166: s390x-protvirt-Handle-SIGP-store-status-.patch -Patch00167: s390x-Add-unpack-facility-feature-to-GA1.patch -Patch00168: s390x-s390-virtio-ccw-Fix-build-on-syste.patch -Patch00169: configure-remove-pkgversion-from-CONFIG_.patch -Patch00170: gcc10-maybe-uninitialized.patch +Patch00000: XXX-dont-dump-core-on-sigabort.patch +Patch00001: qemu-binfmt-conf-Modify-default-path.patch +Patch00002: qemu-cvs-gettimeofday.patch +Patch00003: qemu-cvs-ioctl_debug.patch +Patch00004: qemu-cvs-ioctl_nodirection.patch +Patch00005: linux-user-add-binfmt-wrapper-for-argv-0.patch +Patch00006: PPC-KVM-Disable-mmu-notifier-check.patch +Patch00007: linux-user-binfmt-support-host-binaries.patch +Patch00008: linux-user-Fake-proc-cpuinfo.patch +Patch00009: linux-user-use-target_ulong.patch +Patch00010: Make-char-muxer-more-robust-wrt-small-FI.patch +Patch00011: linux-user-lseek-explicitly-cast-non-set.patch +Patch00012: AIO-Reduce-number-of-threads-for-32bit-h.patch +Patch00013: xen_disk-Add-suse-specific-flush-disable.patch +Patch00014: qemu-bridge-helper-reduce-security-profi.patch +Patch00015: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +Patch00016: linux-user-properly-test-for-infinite-ti.patch +Patch00017: roms-Makefile-pass-a-packaging-timestamp.patch +Patch00018: Raise-soft-address-space-limit-to-hard-l.patch +Patch00019: increase-x86_64-physical-bits-to-42.patch +Patch00020: i8254-Fix-migration-from-SLE11-SP2.patch +Patch00021: acpi_piix4-Fix-migration-from-SLE11-SP2.patch +Patch00022: Switch-order-of-libraries-for-mpath-supp.patch +Patch00023: Make-installed-scripts-explicitly-python.patch +Patch00024: hw-smbios-handle-both-file-formats-regar.patch +Patch00025: xen-add-block-resize-support-for-xen-dis.patch +Patch00026: tests-qemu-iotests-Triple-timeout-of-i-o.patch +Patch00027: tests-Fix-block-tests-to-be-compatible-w.patch +Patch00028: xen-ignore-live-parameter-from-xen-save-.patch +Patch00029: Conditionalize-ui-bitmap-installation-be.patch +Patch00030: tests-change-error-message-in-test-162.patch +Patch00031: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +Patch00032: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +Patch00033: hw-intc-exynos4210_gic-provide-more-room.patch +Patch00034: configure-only-populate-roms-if-softmmu.patch +Patch00035: pc-bios-s390-ccw-net-avoid-warning-about.patch +Patch00036: roms-change-cross-compiler-naming-to-be-.patch +Patch00037: tests-Disable-some-block-tests-for-now.patch +Patch00038: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00039: roms-Makefile-enable-cross-compile-for-b.patch +Patch00040: s390x-Move-diagnose-308-subcodes-and-rcs.patch +Patch00041: Sync-pv.patch +Patch00042: s390x-protvirt-Support-unpack-facility.patch +Patch00043: s390x-protvirt-Add-migration-blocker.patch +Patch00044: s390x-protvirt-Inhibit-balloon-when-swit.patch +Patch00045: s390x-protvirt-KVM-intercept-changes.patch +Patch00046: s390x-Add-SIDA-memory-ops.patch +Patch00047: s390x-protvirt-Move-STSI-data-over-SIDAD.patch +Patch00048: s390x-protvirt-SCLP-interpretation.patch +Patch00049: s390x-protvirt-Set-guest-IPL-PSW.patch +Patch00050: s390x-protvirt-Move-diag-308-data-over-S.patch +Patch00051: s390x-protvirt-Disable-address-checks-fo.patch +Patch00052: s390x-protvirt-Move-IO-control-structure.patch +Patch00053: s390x-protvirt-Handle-SIGP-store-status-.patch +Patch00054: s390x-Add-unpack-facility-feature-to-GA1.patch +Patch00055: s390x-s390-virtio-ccw-Fix-build-on-syste.patch +Patch00056: configure-remove-pkgversion-from-CONFIG_.patch +Patch00057: gcc10-maybe-uninitialized.patch +Patch00058: docs-add-SUSE-support-statements-to-html.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch @@ -313,15 +201,9 @@ Patch03000: sgabios-Makefile-fix-issues-of-build-rep.patch Patch03001: roms-sgabios-Fix-csum8-to-be-built-by-ho.patch # Patches applied in ui/keycodemapdb/: Patch08000: Make-keycode-gen-output-reproducible-use.patch -# Patches applied in slirp/: -Patch09000: util-add-slirp_fmt-helpers.patch -Patch09001: slirp-use-correct-size-while-emulating-I.patch -Patch09002: tcp_emu-Fix-oob-access.patch -Patch09003: slirp-use-correct-size-while-emulating-c.patch -Patch09004: tcp_emu-fix-unsafe-snprintf-usages.patch # Patches applied in roms/qboot/: -Patch12000: ensure-headers-included-are-compatible-w.patch -Patch12001: Enable-cross-compile-prefix-for-C-compil.patch +Patch11000: ensure-headers-included-are-compatible-w.patch +Patch11001: Enable-cross-compile-prefix-for-C-compil.patch # Please do not add patches manually here. @@ -336,7 +218,7 @@ BuildRequires: glib2-devel-static BuildRequires: glibc-devel-static BuildRequires: makeinfo BuildRequires: pcre-devel-static -BuildRequires: python3-base +BuildRequires: python3-base >= 3.5 BuildRequires: zlib-devel-static # we must not install the qemu-linux-user package when under QEMU build %if 0%{?qemu_user_space_build:1} @@ -359,7 +241,6 @@ BuildRequires: alsa-devel BuildRequires: binutils-devel %endif BuildRequires: bison -BuildRequires: bluez-devel BuildRequires: brlapi-devel %ifnarch %{ix86} aarch64 %arm BuildRequires: cross-aarch64-binutils @@ -401,7 +282,6 @@ BuildRequires: libbz2-devel %if 0%{?is_opensuse} BuildRequires: libcacard-devel >= 2.5.1 %endif -BuildRequires: libcap-devel BuildRequires: libcap-ng-devel BuildRequires: libdrm-devel BuildRequires: libepoxy-devel @@ -451,9 +331,8 @@ BuildRequires: nasm BuildRequires: ncurses-devel BuildRequires: pkgconfig BuildRequires: pwdutils -BuildRequires: python-base BuildRequires: python3-Sphinx -BuildRequires: python3-base +BuildRequires: python3-base >= 3.5 BuildRequires: rdma-core-devel BuildRequires: snappy-devel BuildRequires: spice-protocol-devel >= 0.12.3 @@ -475,7 +354,6 @@ BuildRequires: xz-devel BuildRequires: zlib-devel %if "%{name}" == "qemu-testsuite" BuildRequires: bc -BuildRequires: python-base BuildRequires: qemu-arm = %{qemuver} BuildRequires: qemu-audio-alsa = %{qemuver} BuildRequires: qemu-audio-pa = %{qemuver} @@ -1071,119 +949,9 @@ This package provides a service file for starting and stopping KSM. %patch00055 -p1 %patch00056 -p1 %patch00057 -p1 +%if %{legacy_qemu_kvm} && 0%{?is_opensuse} == 0 %patch00058 -p1 -%patch00059 -p1 -%patch00060 -p1 -%patch00061 -p1 -%patch00062 -p1 -%patch00063 -p1 -%patch00064 -p1 -%patch00065 -p1 -%patch00066 -p1 -%patch00067 -p1 -%patch00068 -p1 -%patch00069 -p1 -%patch00070 -p1 -%patch00071 -p1 -%patch00072 -p1 -%patch00073 -p1 -%patch00074 -p1 -%patch00075 -p1 -%patch00076 -p1 -%patch00077 -p1 -%patch00078 -p1 -%patch00079 -p1 -%patch00080 -p1 -%patch00081 -p1 -%patch00082 -p1 -%patch00083 -p1 -%patch00084 -p1 -%patch00085 -p1 -%patch00086 -p1 -%patch00087 -p1 -%patch00088 -p1 -%patch00089 -p1 -%patch00090 -p1 -%patch00091 -p1 -%patch00092 -p1 -%patch00093 -p1 -%patch00094 -p1 -%patch00095 -p1 -%patch00096 -p1 -%patch00097 -p1 -%patch00098 -p1 -%patch00099 -p1 -%patch00100 -p1 -%patch00101 -p1 -%patch00102 -p1 -%patch00103 -p1 -%patch00104 -p1 -%patch00105 -p1 -%patch00106 -p1 -%patch00107 -p1 -%patch00108 -p1 -%patch00109 -p1 -%patch00110 -p1 -%patch00111 -p1 -%patch00112 -p1 -%patch00113 -p1 -%patch00114 -p1 -%patch00115 -p1 -%patch00116 -p1 -%patch00117 -p1 -%patch00118 -p1 -%patch00119 -p1 -%patch00120 -p1 -%patch00121 -p1 -%patch00122 -p1 -%patch00123 -p1 -%patch00124 -p1 -%patch00125 -p1 -%patch00126 -p1 -%patch00127 -p1 -%patch00128 -p1 -%patch00129 -p1 -%patch00130 -p1 -%patch00131 -p1 -%patch00132 -p1 -%patch00133 -p1 -%patch00134 -p1 -%patch00135 -p1 -%patch00136 -p1 -%patch00137 -p1 -%patch00138 -p1 -%patch00139 -p1 -%patch00140 -p1 -%patch00141 -p1 -%patch00142 -p1 -%patch00143 -p1 -%patch00144 -p1 -%patch00145 -p1 -%patch00146 -p1 -%patch00147 -p1 -%patch00148 -p1 -%patch00149 -p1 -%patch00150 -p1 -%patch00151 -p1 -%patch00152 -p1 -%patch00153 -p1 -%patch00154 -p1 -%patch00155 -p1 -%patch00156 -p1 -%patch00157 -p1 -%patch00158 -p1 -%patch00159 -p1 -%patch00160 -p1 -%patch00161 -p1 -%patch00162 -p1 -%patch00163 -p1 -%patch00164 -p1 -%patch00165 -p1 -%patch00166 -p1 -%patch00167 -p1 -%patch00168 -p1 -%patch00169 -p1 -%patch00170 -p1 +%endif %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 @@ -1199,20 +967,15 @@ This package provides a service file for starting and stopping KSM. %patch03000 -p1 %patch03001 -p1 %patch08000 -p1 -%patch09000 -p1 -%patch09001 -p1 -%patch09002 -p1 -%patch09003 -p1 -%patch09004 -p1 -%patch12000 -p1 -%patch12001 -p1 +%patch11000 -p1 +%patch11001 -p1 %if "%{name}" != "qemu-linux-user" # for the record, this set of firmware files is installed, but we don't -# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc openbios-sparc32 -# openbios-sparc64 palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb ppc_rom.bin -# QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv u-boot.e500 u-boot-sam460-20100605.bin -# opensbi-riscv32-virt-fw_jump.bin +# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc +# openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb +# petalogix-s3adsp1800.dtb QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv +# u-boot.e500 u-boot-sam460-20100605.bin opensbi-riscv32-virt-fw_jump.bin # This first list group isn't specific to what this instance builds %define ppc_default_firmware {%nil} @@ -1342,6 +1105,7 @@ cd %mybuilddir --firmwarepath=%_datadir/%name \ --python=%_bindir/python3 \ --extra-cflags="%{optflags}" \ + --disable-fuzzing \ --disable-stack-protector \ --disable-strip \ %if "%{name}" != "qemu-linux-user" @@ -1350,6 +1114,7 @@ cd %mybuilddir --enable-system --disable-linux-user \ --enable-tools --enable-guest-agent \ --enable-modules \ + --disable-module-upgrades \ --enable-pie \ --enable-docs \ %if 0%{?is_opensuse} @@ -1359,7 +1124,6 @@ cd %mybuilddir %endif --enable-attr \ --disable-auth-pam \ - --enable-bluez \ --enable-bochs \ --enable-brlapi \ --enable-bzip2 \ @@ -1689,7 +1453,7 @@ done # Compile the QOM test binary first, so that ... touch -r config-host.mak pc-bios -make %{?_smp_mflags} tests/qom-test %{?_smp_mflags} V=1 +make %{?_smp_mflags} tests/qtest/qom-test %{?_smp_mflags} V=1 # ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) make %{?_smp_mflags} check-report.tap V=1 @@ -1835,8 +1599,10 @@ install -D -m 0644 %{SOURCE5} %{buildroot}%_mandir/man1/qemu-kvm.1.gz install -d %{buildroot}%_docdir/qemu-kvm %ifarch s390x ln -s ../qemu-s390/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-s390/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html %else ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html %endif %endif %endif @@ -1930,62 +1696,13 @@ fi %license COPYING COPYING.LIB LICENSE %if "%{name}" == "qemu" -%dir %_docdir/%name/interop -%dir %_docdir/%name/interop/_static -%dir %_docdir/%name/specs -%dir %_docdir/%name/specs/_static -%_docdir/%name/interop/.buildinfo -%_docdir/%name/interop/_static/* -%_docdir/%name/interop/bitmaps.html -%_docdir/%name/interop/genindex.html -%_docdir/%name/interop/index.html -%_docdir/%name/interop/live-block-operations.html -%_docdir/%name/interop/objects.inv -%_docdir/%name/interop/pr-helper.html -%_docdir/%name/interop/search.html -%_docdir/%name/interop/searchindex.js -%_docdir/%name/interop/vhost-user.html -%_docdir/%name/specs/.buildinfo -%_docdir/%name/specs/_static/* -%_docdir/%name/specs/acpi_hw_reduced_hotplug.html -%_docdir/%name/specs/genindex.html -%_docdir/%name/specs/index.html -%_docdir/%name/specs/objects.inv -%_docdir/%name/specs/ppc-spapr-xive.html -%_docdir/%name/specs/ppc-xive.html -%_docdir/%name/specs/search.html -%_docdir/%name/specs/searchindex.js -%_docdir/%name/qemu-doc.txt -%_docdir/%name/qemu-doc.html -%_docdir/%name/qemu-qmp-ref.txt -%_docdir/%name/qemu-qmp-ref.html -%_docdir/%name/qemu-ga-ref.txt -%_docdir/%name/qemu-ga-ref.html -%_mandir/man1/%name.1.gz -%_mandir/man7/qemu-block-drivers.7.gz -%_mandir/man7/qemu-cpu-models.7.gz -%_mandir/man7/qemu-qmp-ref.7.gz -%_mandir/man7/qemu-ga-ref.7.gz -%dir %_datadir/%name -%dir %_datadir/%name/firmware -%_datadir/%name/keymaps -%_datadir/%name/qemu-nsis.bmp -%_datadir/%name/trace-events-all -%dir %_sysconfdir/%name -%dir %_sysconfdir/%name/firmware -%_datadir/%name/qemu-ifup -%dir %_libexecdir/supportconfig -%dir %_libexecdir/supportconfig/plugins -%_libexecdir/supportconfig/plugins/%name -%if %{kvm_available} -/usr/lib/udev/rules.d/80-kvm.rules -%ifarch s390x -%_libexecdir/modules-load.d/kvm.conf -%endif -%endif %dir %_datadir/icons/hicolor %dir %_datadir/icons/hicolor/*/ %dir %_datadir/icons/hicolor/*/apps +%dir %_datadir/%name +%dir %_datadir/%name/firmware +%dir %_datadir/%name/vhost-user +%_datadir/applications/qemu.desktop %_datadir/icons/hicolor/16x16/apps/qemu.png %_datadir/icons/hicolor/24x24/apps/qemu.png %_datadir/icons/hicolor/32x32/apps/qemu.bmp @@ -1996,7 +1713,140 @@ fi %_datadir/icons/hicolor/256x256/apps/qemu.png %_datadir/icons/hicolor/512x512/apps/qemu.png %_datadir/icons/hicolor/scalable/apps/qemu.svg -%_datadir/applications/qemu.desktop +%_datadir/%name/keymaps +%_datadir/%name/qemu-ifup +%_datadir/%name/qemu-nsis.bmp +%_datadir/%name/trace-events-all +%_datadir/%name/vhost-user/50-qemu-virtiofsd.json +%dir %_docdir/%name/interop +%dir %_docdir/%name/interop/_static +%dir %_docdir/%name/specs +%dir %_docdir/%name/specs/_static +%dir %_docdir/%name/system +%dir %_docdir/%name/system/_static +%dir %_docdir/%name/system/arm +%dir %_docdir/%name/system/s390x +%dir %_docdir/%name/tools +%dir %_docdir/%name/tools/_static +%dir %_docdir/%name/user +%dir %_docdir/%name/user/_static +%_docdir/%name/index.html +%_docdir/%name/interop/.buildinfo +%_docdir/%name/interop/_static/* +%_docdir/%name/interop/bitmaps.html +%_docdir/%name/interop/dbus.html +%_docdir/%name/interop/dbus-vmstate.html +%_docdir/%name/interop/genindex.html +%_docdir/%name/interop/index.html +%_docdir/%name/interop/live-block-operations.html +%_docdir/%name/interop/objects.inv +%_docdir/%name/interop/pr-helper.html +%_docdir/%name/interop/search.html +%_docdir/%name/interop/searchindex.js +%_docdir/%name/interop/vhost-user.html +%_docdir/%name/interop/vhost-user-gpu.html +%_docdir/%name/qemu-qmp-ref.txt +%_docdir/%name/qemu-qmp-ref.html +%_docdir/%name/qemu-ga-ref.txt +%_docdir/%name/qemu-ga-ref.html +%_docdir/%name/specs/.buildinfo +%_docdir/%name/specs/_static/* +%_docdir/%name/specs/acpi_hw_reduced_hotplug.html +%_docdir/%name/specs/genindex.html +%_docdir/%name/specs/index.html +%_docdir/%name/specs/objects.inv +%_docdir/%name/specs/ppc-spapr-xive.html +%_docdir/%name/specs/ppc-xive.html +%_docdir/%name/specs/search.html +%_docdir/%name/specs/searchindex.js +%_docdir/%name/specs/tpm.html +%_docdir/%name/system/.buildinfo +%_docdir/%name/system/_static/* +%_docdir/%name/system/arm/cpu-features.html +%_docdir/%name/system/arm/integratorcp.html +%_docdir/%name/system/arm/musicpal.html +%_docdir/%name/system/arm/nseries.html +%_docdir/%name/system/arm/orangepi.html +%_docdir/%name/system/arm/palm.html +%_docdir/%name/system/arm/realview.html +%_docdir/%name/system/arm/stellaris.html +%_docdir/%name/system/arm/sx1.html +%_docdir/%name/system/arm/versatile.html +%_docdir/%name/system/arm/xscale.html +%_docdir/%name/system/build-platforms.html +%_docdir/%name/system/deprecated.html +%_docdir/%name/system/gdb.html +%_docdir/%name/system/genindex.html +%_docdir/%name/system/images.html +%_docdir/%name/system/index.html +%_docdir/%name/system/invocation.html +%_docdir/%name/system/ivshmem.html +%_docdir/%name/system/keys.html +%_docdir/%name/system/license.html +%_docdir/%name/system/linuxboot.html +%_docdir/%name/system/managed-startup.html +%_docdir/%name/system/monitor.html +%_docdir/%name/system/mux-chardev.html +%_docdir/%name/system/net.html +%_docdir/%name/system/objects.inv +%_docdir/%name/system/qemu-block-drivers.html +%_docdir/%name/system/qemu-cpu-models.html +%_docdir/%name/system/qemu-manpage.html +%_docdir/%name/system/quickstart.html +%_docdir/%name/system/s390x/vfio-ap.html +%_docdir/%name/system/search.html +%_docdir/%name/system/searchindex.js +%_docdir/%name/system/security.html +%_docdir/%name/system/target-arm.html +%_docdir/%name/system/target-i386.html +%_docdir/%name/system/target-m68k.html +%_docdir/%name/system/target-mips.html +%_docdir/%name/system/target-ppc.html +%_docdir/%name/system/targets.html +%_docdir/%name/system/target-s390x.html +%_docdir/%name/system/target-sparc64.html +%_docdir/%name/system/target-sparc.html +%_docdir/%name/system/target-xtensa.html +%_docdir/%name/system/tls.html +%_docdir/%name/system/usb.html +%_docdir/%name/system/vnc-security.html +%_docdir/%name/tools/.buildinfo +%_docdir/%name/tools/_static/* +%_docdir/%name/tools/genindex.html +%_docdir/%name/tools/index.html +%_docdir/%name/tools/objects.inv +%_docdir/%name/tools/qemu-img.html +%_docdir/%name/tools/qemu-nbd.html +%_docdir/%name/tools/qemu-trace-stap.html +%_docdir/%name/tools/search.html +%_docdir/%name/tools/searchindex.js +%_docdir/%name/tools/virtfs-proxy-helper.html +%_docdir/%name/tools/virtiofsd.html +%_docdir/%name/user/.buildinfo +%_docdir/%name/user/_static/* +%_docdir/%name/user/genindex.html +%_docdir/%name/user/index.html +%_docdir/%name/user/main.html +%_docdir/%name/user/objects.inv +%_docdir/%name/user/search.html +%_docdir/%name/user/searchindex.js +%dir %_libexecdir/supportconfig +%dir %_libexecdir/supportconfig/plugins +%_libexecdir/supportconfig/plugins/%name +%_mandir/man1/%name.1.gz +%_mandir/man1/virtiofsd.1.gz +%_mandir/man7/qemu-block-drivers.7.gz +%_mandir/man7/qemu-cpu-models.7.gz +%_mandir/man7/qemu-qmp-ref.7.gz +%_mandir/man7/qemu-ga-ref.7.gz +%dir %_sysconfdir/%name +%dir %_sysconfdir/%name/firmware +%if %{kvm_available} +%ifarch s390x +%_libexecdir/modules-load.d/kvm.conf +%endif +/usr/lib/udev/rules.d/80-kvm.rules +%endif %files x86 %defattr(-, root, root) @@ -2019,7 +1869,6 @@ fi %_datadir/%name/bamboo.dtb %_datadir/%name/canyonlands.dtb %_datadir/%name/openbios-ppc -%_datadir/%name/ppc_rom.bin %_datadir/%name/qemu_vga.ndrv %_datadir/%name/skiboot.lid %_datadir/%name/slof.bin @@ -2067,6 +1916,7 @@ fi %_bindir/qemu-system-or1k %_bindir/qemu-system-riscv32 %_bindir/qemu-system-riscv64 +%_bindir/qemu-system-rx %_bindir/qemu-system-sh4 %_bindir/qemu-system-sh4eb %_bindir/qemu-system-sparc @@ -2076,6 +1926,7 @@ fi %_bindir/qemu-system-xtensa %_bindir/qemu-system-xtensaeb %_datadir/%name/hppa-firmware.img +%_datadir/%name/opensbi-riscv32-sifive_u-fw_jump.bin %_datadir/%name/opensbi-riscv32-virt-fw_jump.bin %_datadir/%name/opensbi-riscv64-sifive_u-fw_jump.bin %_datadir/%name/opensbi-riscv64-virt-fw_jump.bin @@ -2094,6 +1945,7 @@ fi %_mandir/man1/qemu-kvm.1.gz %if 0%{?is_opensuse} == 0 %dir %_docdir/qemu-kvm +%_docdir/qemu-kvm/kvm-supported.html %_docdir/qemu-kvm/kvm-supported.txt %endif %endif @@ -2259,16 +2111,13 @@ fi %files vhost-user-gpu %defattr(-, root, root) -%_libexecdir/vhost-user-gpu -%_docdir/%name/interop/vhost-user-gpu.html %dir %_datadir/%name/vhost-user %_datadir/%name/vhost-user/50-qemu-gpu.json +%_libexecdir/vhost-user-gpu %files tools %defattr(-, root, root) -%_mandir/man1/qemu-img.1.gz -%_mandir/man1/virtfs-proxy-helper.1.gz -%_mandir/man8/qemu-nbd.8.gz +%_bindir/analyze-migration.py %_bindir/elf2dmp %_bindir/ivshmem-client %_bindir/ivshmem-server @@ -2278,19 +2127,23 @@ fi %_bindir/qemu-keymap %_bindir/qemu-nbd %_bindir/qemu-pr-helper +%_bindir/qemu-storage-daemon %_bindir/virtfs-proxy-helper +%_bindir/vmstate-static-checker.py %verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper +%_libexecdir/virtiofsd +%_mandir/man1/qemu-img.1.gz +%_mandir/man1/virtfs-proxy-helper.1.gz +%_mandir/man8/qemu-nbd.8.gz %dir %_sysconfdir/%name %config %_sysconfdir/%name/bridge.conf -%_bindir/analyze-migration.py -%_bindir/vmstate-static-checker.py %files guest-agent %defattr(-, root, root) +%attr(0755,root,kvm) %_bindir/qemu-ga %dir %_docdir/%name/interop %_docdir/%name/interop/qemu-ga.html %_mandir/man8/qemu-ga.8.gz -%attr(0755,root,kvm) %_bindir/qemu-ga %{_unitdir}/qemu-ga@.service /usr/lib/udev/rules.d/80-qemu-ga.rules @@ -2316,25 +2169,25 @@ fi %_bindir/qemu-microblaze %_bindir/qemu-microblazeel %_bindir/qemu-mips +%_bindir/qemu-mips64 +%_bindir/qemu-mips64el %_bindir/qemu-mipsel %_bindir/qemu-mipsn32 %_bindir/qemu-mipsn32el -%_bindir/qemu-mips64 -%_bindir/qemu-mips64el %_bindir/qemu-nios2 %_bindir/qemu-or1k +%_bindir/qemu-ppc %_bindir/qemu-ppc64 %_bindir/qemu-ppc64abi32 %_bindir/qemu-ppc64le -%_bindir/qemu-ppc %_bindir/qemu-riscv32 %_bindir/qemu-riscv64 %_bindir/qemu-s390x %_bindir/qemu-sh4 %_bindir/qemu-sh4eb +%_bindir/qemu-sparc %_bindir/qemu-sparc32plus %_bindir/qemu-sparc64 -%_bindir/qemu-sparc %_bindir/qemu-tilegx %_bindir/qemu-x86_64 %_bindir/qemu-xtensa diff --git a/qemu.spec.in b/qemu.spec.in index 8bd6e3a..6d93cd8 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -138,7 +138,7 @@ BuildRequires: glib2-devel-static BuildRequires: glibc-devel-static BuildRequires: makeinfo BuildRequires: pcre-devel-static -BuildRequires: python3-base +BuildRequires: python3-base >= 3.5 BuildRequires: zlib-devel-static # we must not install the qemu-linux-user package when under QEMU build %if 0%{?qemu_user_space_build:1} @@ -161,7 +161,6 @@ BuildRequires: alsa-devel BuildRequires: binutils-devel %endif BuildRequires: bison -BuildRequires: bluez-devel BuildRequires: brlapi-devel %ifnarch %{ix86} aarch64 %arm BuildRequires: cross-aarch64-binutils @@ -203,7 +202,6 @@ BuildRequires: libbz2-devel %if 0%{?is_opensuse} BuildRequires: libcacard-devel >= 2.5.1 %endif -BuildRequires: libcap-devel BuildRequires: libcap-ng-devel BuildRequires: libdrm-devel BuildRequires: libepoxy-devel @@ -236,9 +234,9 @@ BuildRequires: libSDL2_image-devel BuildRequires: libseccomp-devel >= 2.3.0 BuildRequires: libspice-server-devel >= 0.12.5 BuildRequires: libssh-devel >= 0.8 +BuildRequires: pkgconfig(libudev) BuildRequires: libusb-1_0-devel >= 1.0.13 BuildRequires: libvdeplug-devel -BuildRequires: pkgconfig(libudev) %if 0%{?is_opensuse} BuildRequires: lzfse-devel %endif @@ -253,9 +251,8 @@ BuildRequires: nasm BuildRequires: ncurses-devel BuildRequires: pkgconfig BuildRequires: pwdutils -BuildRequires: python-base BuildRequires: python3-Sphinx -BuildRequires: python3-base +BuildRequires: python3-base >= 3.5 BuildRequires: rdma-core-devel BuildRequires: snappy-devel BuildRequires: spice-protocol-devel >= 0.12.3 @@ -277,7 +274,6 @@ BuildRequires: xz-devel BuildRequires: zlib-devel %if "%{name}" == "qemu-testsuite" BuildRequires: bc -BuildRequires: python-base BuildRequires: qemu-arm = %{qemuver} BuildRequires: qemu-audio-alsa = %{qemuver} BuildRequires: qemu-audio-pa = %{qemuver} @@ -819,10 +815,10 @@ PATCH_EXEC %if "%{name}" != "qemu-linux-user" # for the record, this set of firmware files is installed, but we don't -# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc openbios-sparc32 -# openbios-sparc64 palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb ppc_rom.bin -# QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv u-boot.e500 u-boot-sam460-20100605.bin -# opensbi-riscv32-virt-fw_jump.bin +# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc +# openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb +# petalogix-s3adsp1800.dtb QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv +# u-boot.e500 u-boot-sam460-20100605.bin opensbi-riscv32-virt-fw_jump.bin # This first list group isn't specific to what this instance builds %define ppc_default_firmware {%nil} @@ -952,6 +948,7 @@ cd %mybuilddir --firmwarepath=%_datadir/%name \ --python=%_bindir/python3 \ --extra-cflags="%{optflags}" \ + --disable-fuzzing \ --disable-stack-protector \ --disable-strip \ %if "%{name}" != "qemu-linux-user" @@ -960,6 +957,7 @@ cd %mybuilddir --enable-system --disable-linux-user \ --enable-tools --enable-guest-agent \ --enable-modules \ + --disable-module-upgrades \ --enable-pie \ --enable-docs \ %if 0%{?is_opensuse} @@ -969,7 +967,6 @@ cd %mybuilddir %endif --enable-attr \ --disable-auth-pam \ - --enable-bluez \ --enable-bochs \ --enable-brlapi \ --enable-bzip2 \ @@ -1299,7 +1296,7 @@ done # Compile the QOM test binary first, so that ... touch -r config-host.mak pc-bios -make %{?_smp_mflags} tests/qom-test %{?_smp_mflags} V=1 +make %{?_smp_mflags} tests/qtest/qom-test %{?_smp_mflags} V=1 # ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) make %{?_smp_mflags} check-report.tap V=1 @@ -1445,8 +1442,10 @@ install -D -m 0644 %{SOURCE5} %{buildroot}%_mandir/man1/qemu-kvm.1.gz install -d %{buildroot}%_docdir/qemu-kvm %ifarch s390x ln -s ../qemu-s390/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-s390/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html %else ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html %endif %endif %endif @@ -1540,62 +1539,13 @@ fi %license COPYING COPYING.LIB LICENSE %if "%{name}" == "qemu" -%dir %_docdir/%name/interop -%dir %_docdir/%name/interop/_static -%dir %_docdir/%name/specs -%dir %_docdir/%name/specs/_static -%_docdir/%name/interop/.buildinfo -%_docdir/%name/interop/_static/* -%_docdir/%name/interop/bitmaps.html -%_docdir/%name/interop/genindex.html -%_docdir/%name/interop/index.html -%_docdir/%name/interop/live-block-operations.html -%_docdir/%name/interop/objects.inv -%_docdir/%name/interop/pr-helper.html -%_docdir/%name/interop/search.html -%_docdir/%name/interop/searchindex.js -%_docdir/%name/interop/vhost-user.html -%_docdir/%name/specs/.buildinfo -%_docdir/%name/specs/_static/* -%_docdir/%name/specs/acpi_hw_reduced_hotplug.html -%_docdir/%name/specs/genindex.html -%_docdir/%name/specs/index.html -%_docdir/%name/specs/objects.inv -%_docdir/%name/specs/ppc-spapr-xive.html -%_docdir/%name/specs/ppc-xive.html -%_docdir/%name/specs/search.html -%_docdir/%name/specs/searchindex.js -%_docdir/%name/qemu-doc.txt -%_docdir/%name/qemu-doc.html -%_docdir/%name/qemu-qmp-ref.txt -%_docdir/%name/qemu-qmp-ref.html -%_docdir/%name/qemu-ga-ref.txt -%_docdir/%name/qemu-ga-ref.html -%_mandir/man1/%name.1.gz -%_mandir/man7/qemu-block-drivers.7.gz -%_mandir/man7/qemu-cpu-models.7.gz -%_mandir/man7/qemu-qmp-ref.7.gz -%_mandir/man7/qemu-ga-ref.7.gz -%dir %_datadir/%name -%dir %_datadir/%name/firmware -%_datadir/%name/keymaps -%_datadir/%name/qemu-nsis.bmp -%_datadir/%name/trace-events-all -%dir %_sysconfdir/%name -%dir %_sysconfdir/%name/firmware -%_datadir/%name/qemu-ifup -%dir %_libexecdir/supportconfig -%dir %_libexecdir/supportconfig/plugins -%_libexecdir/supportconfig/plugins/%name -%if %{kvm_available} -/usr/lib/udev/rules.d/80-kvm.rules -%ifarch s390x -%_libexecdir/modules-load.d/kvm.conf -%endif -%endif %dir %_datadir/icons/hicolor %dir %_datadir/icons/hicolor/*/ %dir %_datadir/icons/hicolor/*/apps +%dir %_datadir/%name +%dir %_datadir/%name/firmware +%dir %_datadir/%name/vhost-user +%_datadir/applications/qemu.desktop %_datadir/icons/hicolor/16x16/apps/qemu.png %_datadir/icons/hicolor/24x24/apps/qemu.png %_datadir/icons/hicolor/32x32/apps/qemu.bmp @@ -1606,7 +1556,140 @@ fi %_datadir/icons/hicolor/256x256/apps/qemu.png %_datadir/icons/hicolor/512x512/apps/qemu.png %_datadir/icons/hicolor/scalable/apps/qemu.svg -%_datadir/applications/qemu.desktop +%_datadir/%name/keymaps +%_datadir/%name/qemu-ifup +%_datadir/%name/qemu-nsis.bmp +%_datadir/%name/trace-events-all +%_datadir/%name/vhost-user/50-qemu-virtiofsd.json +%dir %_docdir/%name/interop +%dir %_docdir/%name/interop/_static +%dir %_docdir/%name/specs +%dir %_docdir/%name/specs/_static +%dir %_docdir/%name/system +%dir %_docdir/%name/system/_static +%dir %_docdir/%name/system/arm +%dir %_docdir/%name/system/s390x +%dir %_docdir/%name/tools +%dir %_docdir/%name/tools/_static +%dir %_docdir/%name/user +%dir %_docdir/%name/user/_static +%_docdir/%name/index.html +%_docdir/%name/interop/.buildinfo +%_docdir/%name/interop/_static/* +%_docdir/%name/interop/bitmaps.html +%_docdir/%name/interop/dbus.html +%_docdir/%name/interop/dbus-vmstate.html +%_docdir/%name/interop/genindex.html +%_docdir/%name/interop/index.html +%_docdir/%name/interop/live-block-operations.html +%_docdir/%name/interop/objects.inv +%_docdir/%name/interop/pr-helper.html +%_docdir/%name/interop/search.html +%_docdir/%name/interop/searchindex.js +%_docdir/%name/interop/vhost-user.html +%_docdir/%name/interop/vhost-user-gpu.html +%_docdir/%name/qemu-qmp-ref.txt +%_docdir/%name/qemu-qmp-ref.html +%_docdir/%name/qemu-ga-ref.txt +%_docdir/%name/qemu-ga-ref.html +%_docdir/%name/specs/.buildinfo +%_docdir/%name/specs/_static/* +%_docdir/%name/specs/acpi_hw_reduced_hotplug.html +%_docdir/%name/specs/genindex.html +%_docdir/%name/specs/index.html +%_docdir/%name/specs/objects.inv +%_docdir/%name/specs/ppc-spapr-xive.html +%_docdir/%name/specs/ppc-xive.html +%_docdir/%name/specs/search.html +%_docdir/%name/specs/searchindex.js +%_docdir/%name/specs/tpm.html +%_docdir/%name/system/.buildinfo +%_docdir/%name/system/_static/* +%_docdir/%name/system/arm/cpu-features.html +%_docdir/%name/system/arm/integratorcp.html +%_docdir/%name/system/arm/musicpal.html +%_docdir/%name/system/arm/nseries.html +%_docdir/%name/system/arm/orangepi.html +%_docdir/%name/system/arm/palm.html +%_docdir/%name/system/arm/realview.html +%_docdir/%name/system/arm/stellaris.html +%_docdir/%name/system/arm/sx1.html +%_docdir/%name/system/arm/versatile.html +%_docdir/%name/system/arm/xscale.html +%_docdir/%name/system/build-platforms.html +%_docdir/%name/system/deprecated.html +%_docdir/%name/system/gdb.html +%_docdir/%name/system/genindex.html +%_docdir/%name/system/images.html +%_docdir/%name/system/index.html +%_docdir/%name/system/invocation.html +%_docdir/%name/system/ivshmem.html +%_docdir/%name/system/keys.html +%_docdir/%name/system/license.html +%_docdir/%name/system/linuxboot.html +%_docdir/%name/system/managed-startup.html +%_docdir/%name/system/monitor.html +%_docdir/%name/system/mux-chardev.html +%_docdir/%name/system/net.html +%_docdir/%name/system/objects.inv +%_docdir/%name/system/qemu-block-drivers.html +%_docdir/%name/system/qemu-cpu-models.html +%_docdir/%name/system/qemu-manpage.html +%_docdir/%name/system/quickstart.html +%_docdir/%name/system/s390x/vfio-ap.html +%_docdir/%name/system/search.html +%_docdir/%name/system/searchindex.js +%_docdir/%name/system/security.html +%_docdir/%name/system/target-arm.html +%_docdir/%name/system/target-i386.html +%_docdir/%name/system/target-m68k.html +%_docdir/%name/system/target-mips.html +%_docdir/%name/system/target-ppc.html +%_docdir/%name/system/targets.html +%_docdir/%name/system/target-s390x.html +%_docdir/%name/system/target-sparc64.html +%_docdir/%name/system/target-sparc.html +%_docdir/%name/system/target-xtensa.html +%_docdir/%name/system/tls.html +%_docdir/%name/system/usb.html +%_docdir/%name/system/vnc-security.html +%_docdir/%name/tools/.buildinfo +%_docdir/%name/tools/_static/* +%_docdir/%name/tools/genindex.html +%_docdir/%name/tools/index.html +%_docdir/%name/tools/objects.inv +%_docdir/%name/tools/qemu-img.html +%_docdir/%name/tools/qemu-nbd.html +%_docdir/%name/tools/qemu-trace-stap.html +%_docdir/%name/tools/search.html +%_docdir/%name/tools/searchindex.js +%_docdir/%name/tools/virtfs-proxy-helper.html +%_docdir/%name/tools/virtiofsd.html +%_docdir/%name/user/.buildinfo +%_docdir/%name/user/_static/* +%_docdir/%name/user/genindex.html +%_docdir/%name/user/index.html +%_docdir/%name/user/main.html +%_docdir/%name/user/objects.inv +%_docdir/%name/user/search.html +%_docdir/%name/user/searchindex.js +%dir %_libexecdir/supportconfig +%dir %_libexecdir/supportconfig/plugins +%_libexecdir/supportconfig/plugins/%name +%_mandir/man1/%name.1.gz +%_mandir/man1/virtiofsd.1.gz +%_mandir/man7/qemu-block-drivers.7.gz +%_mandir/man7/qemu-cpu-models.7.gz +%_mandir/man7/qemu-qmp-ref.7.gz +%_mandir/man7/qemu-ga-ref.7.gz +%dir %_sysconfdir/%name +%dir %_sysconfdir/%name/firmware +%if %{kvm_available} +%ifarch s390x +%_libexecdir/modules-load.d/kvm.conf +%endif +/usr/lib/udev/rules.d/80-kvm.rules +%endif %files x86 %defattr(-, root, root) @@ -1629,7 +1712,6 @@ fi %_datadir/%name/bamboo.dtb %_datadir/%name/canyonlands.dtb %_datadir/%name/openbios-ppc -%_datadir/%name/ppc_rom.bin %_datadir/%name/qemu_vga.ndrv %_datadir/%name/skiboot.lid %_datadir/%name/slof.bin @@ -1677,6 +1759,7 @@ fi %_bindir/qemu-system-or1k %_bindir/qemu-system-riscv32 %_bindir/qemu-system-riscv64 +%_bindir/qemu-system-rx %_bindir/qemu-system-sh4 %_bindir/qemu-system-sh4eb %_bindir/qemu-system-sparc @@ -1686,6 +1769,7 @@ fi %_bindir/qemu-system-xtensa %_bindir/qemu-system-xtensaeb %_datadir/%name/hppa-firmware.img +%_datadir/%name/opensbi-riscv32-sifive_u-fw_jump.bin %_datadir/%name/opensbi-riscv32-virt-fw_jump.bin %_datadir/%name/opensbi-riscv64-sifive_u-fw_jump.bin %_datadir/%name/opensbi-riscv64-virt-fw_jump.bin @@ -1704,6 +1788,7 @@ fi %_mandir/man1/qemu-kvm.1.gz %if 0%{?is_opensuse} == 0 %dir %_docdir/qemu-kvm +%_docdir/qemu-kvm/kvm-supported.html %_docdir/qemu-kvm/kvm-supported.txt %endif %endif @@ -1869,16 +1954,13 @@ fi %files vhost-user-gpu %defattr(-, root, root) -%_libexecdir/vhost-user-gpu -%_docdir/%name/interop/vhost-user-gpu.html %dir %_datadir/%name/vhost-user %_datadir/%name/vhost-user/50-qemu-gpu.json +%_libexecdir/vhost-user-gpu %files tools %defattr(-, root, root) -%_mandir/man1/qemu-img.1.gz -%_mandir/man1/virtfs-proxy-helper.1.gz -%_mandir/man8/qemu-nbd.8.gz +%_bindir/analyze-migration.py %_bindir/elf2dmp %_bindir/ivshmem-client %_bindir/ivshmem-server @@ -1888,19 +1970,23 @@ fi %_bindir/qemu-keymap %_bindir/qemu-nbd %_bindir/qemu-pr-helper +%_bindir/qemu-storage-daemon %_bindir/virtfs-proxy-helper +%_bindir/vmstate-static-checker.py %verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper +%_libexecdir/virtiofsd +%_mandir/man1/qemu-img.1.gz +%_mandir/man1/virtfs-proxy-helper.1.gz +%_mandir/man8/qemu-nbd.8.gz %dir %_sysconfdir/%name %config %_sysconfdir/%name/bridge.conf -%_bindir/analyze-migration.py -%_bindir/vmstate-static-checker.py %files guest-agent %defattr(-, root, root) +%attr(0755,root,kvm) %_bindir/qemu-ga %dir %_docdir/%name/interop %_docdir/%name/interop/qemu-ga.html %_mandir/man8/qemu-ga.8.gz -%attr(0755,root,kvm) %_bindir/qemu-ga %{_unitdir}/qemu-ga@.service /usr/lib/udev/rules.d/80-qemu-ga.rules @@ -1926,25 +2012,25 @@ fi %_bindir/qemu-microblaze %_bindir/qemu-microblazeel %_bindir/qemu-mips +%_bindir/qemu-mips64 +%_bindir/qemu-mips64el %_bindir/qemu-mipsel %_bindir/qemu-mipsn32 %_bindir/qemu-mipsn32el -%_bindir/qemu-mips64 -%_bindir/qemu-mips64el %_bindir/qemu-nios2 %_bindir/qemu-or1k +%_bindir/qemu-ppc %_bindir/qemu-ppc64 %_bindir/qemu-ppc64abi32 %_bindir/qemu-ppc64le -%_bindir/qemu-ppc %_bindir/qemu-riscv32 %_bindir/qemu-riscv64 %_bindir/qemu-s390x %_bindir/qemu-sh4 %_bindir/qemu-sh4eb +%_bindir/qemu-sparc %_bindir/qemu-sparc32plus %_bindir/qemu-sparc64 -%_bindir/qemu-sparc %_bindir/qemu-tilegx %_bindir/qemu-x86_64 %_bindir/qemu-xtensa diff --git a/roms-Makefile-enable-cross-compile-for-b.patch b/roms-Makefile-enable-cross-compile-for-b.patch index c8b0545..d885072 100644 --- a/roms-Makefile-enable-cross-compile-for-b.patch +++ b/roms-Makefile-enable-cross-compile-for-b.patch @@ -8,10 +8,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile -index 091ad51c1e91a2b9709c5810e562..a6f084820f489bef42c6f487a6b2 100644 +index 3aaf3835730023e9a941fc9cd2c2..1bfe34b404d2822bda71edf25ae4 100644 --- a/roms/Makefile +++ b/roms/Makefile -@@ -198,7 +198,7 @@ opensbi64-sifive_u: +@@ -205,7 +205,7 @@ opensbi64-sifive_u: cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin bios-microvm: diff --git a/roms-Makefile-pass-a-packaging-timestamp.patch b/roms-Makefile-pass-a-packaging-timestamp.patch index 4eaff01..84c4497 100644 --- a/roms-Makefile-pass-a-packaging-timestamp.patch +++ b/roms-Makefile-pass-a-packaging-timestamp.patch @@ -20,7 +20,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/roms/Makefile b/roms/Makefile -index 28e1e557b0763cabe6da3d07602d..091ad51c1e91a2b9709c5810e562 100644 +index f9acf39954dcf96618fab21cafe7..3aaf3835730023e9a941fc9cd2c2 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -51,6 +51,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" @@ -36,7 +36,7 @@ index 28e1e557b0763cabe6da3d07602d..091ad51c1e91a2b9709c5810e562 100644 default help: @echo "nothing is build by default" @echo "available build targets:" -@@ -100,7 +106,7 @@ build-seabios-config-%: config.% +@@ -101,7 +107,7 @@ build-seabios-config-%: config.% .PHONY: sgabios skiboot sgabios: @@ -45,7 +45,7 @@ index 28e1e557b0763cabe6da3d07602d..091ad51c1e91a2b9709c5810e562 100644 cp sgabios/sgabios.bin ../pc-bios -@@ -120,11 +126,13 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools +@@ -121,11 +127,13 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools build-pxe-roms: $(MAKE) -C ipxe/src CONFIG=qemu \ @@ -59,7 +59,7 @@ index 28e1e557b0763cabe6da3d07602d..091ad51c1e91a2b9709c5810e562 100644 CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \ $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) -@@ -147,7 +155,9 @@ edk2-basetools: +@@ -148,7 +156,9 @@ edk2-basetools: EXTRA_LDFLAGS='$(EDK2_BASETOOLS_LDFLAGS)' slof: diff --git a/roms-change-cross-compiler-naming-to-be-.patch b/roms-change-cross-compiler-naming-to-be-.patch index 8ff9919..f402fff 100644 --- a/roms-change-cross-compiler-naming-to-be-.patch +++ b/roms-change-cross-compiler-naming-to-be-.patch @@ -8,12 +8,12 @@ Signed-off-by: Bruce Rogers 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh -index 3f4485b201f1f6f8cff47a9933da..5a3a8d885c9138d3c857d8b1e6d0 100644 +index cd6e4f2c82d2b346cdb7b3199bca..529e335121fcb60e419bfc656b6d 100644 --- a/roms/edk2-funcs.sh +++ b/roms/edk2-funcs.sh -@@ -113,7 +113,15 @@ qemu_edk2_get_cross_prefix() - # no cross-compiler needed - : +@@ -116,7 +116,15 @@ qemu_edk2_get_cross_prefix() + # force soft-float cross-compiler on Debian + printf 'arm-linux-gnueabi-' else - printf '%s-linux-gnu-\n' "$gcc_arch" + if [ "$emulation_target" == arm ]; then diff --git a/runstate-ignore-finishmigrate-prelaunch-.patch b/runstate-ignore-finishmigrate-prelaunch-.patch deleted file mode 100644 index 404c989..0000000 --- a/runstate-ignore-finishmigrate-prelaunch-.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Laurent Vivier -Date: Fri, 29 Nov 2019 12:51:32 +0100 -Subject: runstate: ignore finishmigrate -> prelaunch transition - -Git-commit: ddad81bd28de665475a87693a93e6cf5d6fd8bab - -Commit 1bd71dce4bf2 tries to prevent a finishmigrate -> prelaunch -transition by exiting at the beginning of the main_loop_should_exit() -function if the state is already finishmigrate. - -As the finishmigrate state is set in the migration thread it can -happen concurrently to the function. The migration thread and the -function are normally protected by the iothread mutex and thus the -state should no evolve between the start of the function and its end. - -Unfortunately during the function life the lock is released by -pause_all_vcpus() just before the point we need to be sure we are -not in finishmigrate state and if the migration thread is waiting -for the lock it will take the opportunity to change the state -to finishmigrate. - -The only way to be sure we are not in the finishmigrate state when -we need is to check the state after the pause_all_vcpus() function. - -Fixes: 1bd71dce4bf2 ("runstate: ignore exit request in finish migrate state") -Signed-off-by: Laurent Vivier -Signed-off-by: Juan Quintela -Signed-off-by: Bruce Rogers ---- - vl.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/vl.c b/vl.c -index 6a65a64bfd647afcf539145f9cf9..bf0a6345d2394ad25adfe53c4006 100644 ---- a/vl.c -+++ b/vl.c -@@ -1745,9 +1745,6 @@ static bool main_loop_should_exit(void) - RunState r; - ShutdownCause request; - -- if (runstate_check(RUN_STATE_FINISH_MIGRATE)) { -- return false; -- } - if (preconfig_exit_requested) { - if (runstate_check(RUN_STATE_PRECONFIG)) { - runstate_set(RUN_STATE_PRELAUNCH); -@@ -1776,8 +1773,13 @@ static bool main_loop_should_exit(void) - pause_all_vcpus(); - qemu_system_reset(request); - resume_all_vcpus(); -+ /* -+ * runstate can change in pause_all_vcpus() -+ * as iothread mutex is unlocked -+ */ - if (!runstate_check(RUN_STATE_RUNNING) && -- !runstate_check(RUN_STATE_INMIGRATE)) { -+ !runstate_check(RUN_STATE_INMIGRATE) && -+ !runstate_check(RUN_STATE_FINISH_MIGRATE)) { - runstate_set(RUN_STATE_PRELAUNCH); - } - } diff --git a/s390-sclp-improve-special-wait-psw-logic.patch b/s390-sclp-improve-special-wait-psw-logic.patch deleted file mode 100644 index 092371f..0000000 --- a/s390-sclp-improve-special-wait-psw-logic.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Christian Borntraeger -Date: Thu, 20 Feb 2020 14:16:22 +0100 -Subject: s390/sclp: improve special wait psw logic - -References: bsc#1167075 - -There is a special quiesce PSW that we check for "shutdown". Otherwise disabled -wait is detected as "crashed". Architecturally we must only check PSW bits -116-127. Fix this. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Christian Borntraeger -Message-Id: <1582204582-22995-1-git-send-email-borntraeger@de.ibm.com> -Reviewed-by: David Hildenbrand -Acked-by: Janosch Frank -Signed-off-by: Cornelia Huck -(cherry picked from commit 8b51c0961cc13e55b26bb6665ec3a341abdc7658) -Signed-off-by: Bruce Rogers ---- - target/s390x/helper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/s390x/helper.c b/target/s390x/helper.c -index a3a49164e471b3f00a40020f987d..6808dfda01f42acbaa1d36ef787b 100644 ---- a/target/s390x/helper.c -+++ b/target/s390x/helper.c -@@ -89,7 +89,7 @@ hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr vaddr) - static inline bool is_special_wait_psw(uint64_t psw_addr) - { - /* signal quiesce */ -- return psw_addr == 0xfffUL; -+ return (psw_addr & 0xfffUL) == 0xfffUL; - } - - void s390_handle_wait(S390CPU *cpu) diff --git a/s390x-Add-SIDA-memory-ops.patch b/s390x-Add-SIDA-memory-ops.patch index a64926b..911b020 100644 --- a/s390x-Add-SIDA-memory-ops.patch +++ b/s390x-Add-SIDA-memory-ops.patch @@ -27,10 +27,10 @@ Signed-off-by: Bruce Rogers 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h -index d2af13b345ccd9094f82385cd528..2ec0f78b48ee15978b62f5fdc1b2 100644 +index 1d17709d6e10b5e0668bc09e21c7..035427521cec252877c70288d597 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h -@@ -821,7 +821,12 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uint8_t ar, void *hostbuf, +@@ -823,7 +823,12 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uint8_t ar, void *hostbuf, #define s390_cpu_virt_mem_check_write(cpu, laddr, ar, len) \ s390_cpu_virt_mem_rw(cpu, laddr, ar, NULL, len, true) void s390_cpu_virt_mem_handle_exc(S390CPU *cpu, uintptr_t ra); @@ -45,7 +45,7 @@ index d2af13b345ccd9094f82385cd528..2ec0f78b48ee15978b62f5fdc1b2 100644 /* sigp.c */ int s390_cpu_restart(S390CPU *cpu); diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index abeeaaa67452b0b938557b0d0dea..941e4df630ad9b3dc780d3c92e6b 100644 +index 1988809ec2e7b1b6db33ba85eaef..0e93778ed15d0e04e83eff1baccf 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -154,6 +154,7 @@ static int cap_ri; @@ -64,7 +64,7 @@ index abeeaaa67452b0b938557b0d0dea..941e4df630ad9b3dc780d3c92e6b 100644 if (!kvm_check_extension(s, KVM_CAP_S390_GMAP) || !kvm_check_extension(s, KVM_CAP_S390_COW)) { -@@ -848,6 +850,30 @@ int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf, +@@ -851,6 +853,30 @@ int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf, return ret; } @@ -109,7 +109,7 @@ index dea813f450153c34e1269424772d..6ab17c81b73a0011e32213552698 100644 int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state); void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu); diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c -index c9f3f347501097b894333a36cac3..ec8befbdc87d4c88d83baeeab20e 100644 +index 0be2f300bbe4ac8b68619b8c2285..7d9f3059cd502c49108b459c8d23 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -474,6 +474,20 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages, diff --git a/s390x-Add-missing-vcpu-reset-functions.patch b/s390x-Add-missing-vcpu-reset-functions.patch deleted file mode 100644 index 327b0ed..0000000 --- a/s390x-Add-missing-vcpu-reset-functions.patch +++ /dev/null @@ -1,159 +0,0 @@ -From: Janosch Frank -Date: Fri, 14 Feb 2020 10:16:21 -0500 -Subject: s390x: Add missing vcpu reset functions - -References: bsc#1167075 - -Up to now we only had an ioctl to reset vcpu data QEMU couldn't reach -for the initial reset, which was also called for the clear reset. To -be architecture compliant, we also need to clear local interrupts on a -normal reset. - -Because of this and the upcoming protvirt support we need to add -ioctls for the missing clear and normal resets. - -Signed-off-by: Janosch Frank -Reviewed-by: Thomas Huth -Acked-by: David Hildenbrand -Message-Id: <20200214151636.8764-3-frankja@linux.ibm.com> -Signed-off-by: Cornelia Huck -(cherry picked from commit b91a03946e0f65ddd22927dd80ca1276bf89c5af) -Signed-off-by: Bruce Rogers ---- - target/s390x/cpu.c | 14 ++++++++++++-- - target/s390x/kvm-stub.c | 10 +++++++++- - target/s390x/kvm.c | 42 ++++++++++++++++++++++++++++++++-------- - target/s390x/kvm_s390x.h | 4 +++- - 4 files changed, 58 insertions(+), 12 deletions(-) - -diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index bd39cb54b7aa3fa8edba5d9975a4..52fefa1586caa3cbd366fe230630 100644 ---- a/target/s390x/cpu.c -+++ b/target/s390x/cpu.c -@@ -131,8 +131,18 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - } - - /* Reset state inside the kernel that we cannot access yet from QEMU. */ -- if (kvm_enabled() && type != S390_CPU_RESET_NORMAL) { -- kvm_s390_reset_vcpu(cpu); -+ if (kvm_enabled()) { -+ switch (type) { -+ case S390_CPU_RESET_CLEAR: -+ kvm_s390_reset_vcpu_clear(cpu); -+ break; -+ case S390_CPU_RESET_INITIAL: -+ kvm_s390_reset_vcpu_initial(cpu); -+ break; -+ case S390_CPU_RESET_NORMAL: -+ kvm_s390_reset_vcpu_normal(cpu); -+ break; -+ } - } - } - -diff --git a/target/s390x/kvm-stub.c b/target/s390x/kvm-stub.c -index 5152e2bdf19b2661330a1da80c5d..c4cd497f850eb9c7a859932b0f1f 100644 ---- a/target/s390x/kvm-stub.c -+++ b/target/s390x/kvm-stub.c -@@ -83,7 +83,15 @@ void kvm_s390_cmma_reset(void) - { - } - --void kvm_s390_reset_vcpu(S390CPU *cpu) -+void kvm_s390_reset_vcpu_initial(S390CPU *cpu) -+{ -+} -+ -+void kvm_s390_reset_vcpu_clear(S390CPU *cpu) -+{ -+} -+ -+void kvm_s390_reset_vcpu_normal(S390CPU *cpu) - { - } - -diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index ad6e38c8761be7e0cad57771f49b..f633472980b48757989db245fb1f 100644 ---- a/target/s390x/kvm.c -+++ b/target/s390x/kvm.c -@@ -151,6 +151,7 @@ static int cap_s390_irq; - static int cap_ri; - static int cap_gs; - static int cap_hpage_1m; -+static int cap_vcpu_resets; - - static int active_cmma; - -@@ -342,6 +343,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) - cap_async_pf = kvm_check_extension(s, KVM_CAP_ASYNC_PF); - cap_mem_op = kvm_check_extension(s, KVM_CAP_S390_MEM_OP); - cap_s390_irq = kvm_check_extension(s, KVM_CAP_S390_INJECT_IRQ); -+ cap_vcpu_resets = kvm_check_extension(s, KVM_CAP_S390_VCPU_RESETS); - - if (!kvm_check_extension(s, KVM_CAP_S390_GMAP) - || !kvm_check_extension(s, KVM_CAP_S390_COW)) { -@@ -403,17 +405,41 @@ int kvm_arch_destroy_vcpu(CPUState *cs) - return 0; - } - --void kvm_s390_reset_vcpu(S390CPU *cpu) -+static void kvm_s390_reset_vcpu(S390CPU *cpu, unsigned long type) - { - CPUState *cs = CPU(cpu); - -- /* The initial reset call is needed here to reset in-kernel -- * vcpu data that we can't access directly from QEMU -- * (i.e. with older kernels which don't support sync_regs/ONE_REG). -- * Before this ioctl cpu_synchronize_state() is called in common kvm -- * code (kvm-all) */ -- if (kvm_vcpu_ioctl(cs, KVM_S390_INITIAL_RESET, NULL)) { -- error_report("Initial CPU reset failed on CPU %i", cs->cpu_index); -+ /* -+ * The reset call is needed here to reset in-kernel vcpu data that -+ * we can't access directly from QEMU (i.e. with older kernels -+ * which don't support sync_regs/ONE_REG). Before this ioctl -+ * cpu_synchronize_state() is called in common kvm code -+ * (kvm-all). -+ */ -+ if (kvm_vcpu_ioctl(cs, type)) { -+ error_report("CPU reset failed on CPU %i type %lx", -+ cs->cpu_index, type); -+ } -+} -+ -+void kvm_s390_reset_vcpu_initial(S390CPU *cpu) -+{ -+ kvm_s390_reset_vcpu(cpu, KVM_S390_INITIAL_RESET); -+} -+ -+void kvm_s390_reset_vcpu_clear(S390CPU *cpu) -+{ -+ if (cap_vcpu_resets) { -+ kvm_s390_reset_vcpu(cpu, KVM_S390_CLEAR_RESET); -+ } else { -+ kvm_s390_reset_vcpu(cpu, KVM_S390_INITIAL_RESET); -+ } -+} -+ -+void kvm_s390_reset_vcpu_normal(S390CPU *cpu) -+{ -+ if (cap_vcpu_resets) { -+ kvm_s390_reset_vcpu(cpu, KVM_S390_NORMAL_RESET); - } - } - -diff --git a/target/s390x/kvm_s390x.h b/target/s390x/kvm_s390x.h -index caf985955ba5da4e2cda021ed1b5..0b21789796d7c462bdc72160166f 100644 ---- a/target/s390x/kvm_s390x.h -+++ b/target/s390x/kvm_s390x.h -@@ -34,7 +34,9 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, - int vq, bool assign); - int kvm_s390_cmma_active(void); - void kvm_s390_cmma_reset(void); --void kvm_s390_reset_vcpu(S390CPU *cpu); -+void kvm_s390_reset_vcpu_clear(S390CPU *cpu); -+void kvm_s390_reset_vcpu_normal(S390CPU *cpu); -+void kvm_s390_reset_vcpu_initial(S390CPU *cpu); - int kvm_s390_set_mem_limit(uint64_t new_limit, uint64_t *hw_limit); - void kvm_s390_set_max_pagesize(uint64_t pagesize, Error **errp); - void kvm_s390_crypto_reset(void); diff --git a/s390x-Add-unpack-facility-feature-to-GA1.patch b/s390x-Add-unpack-facility-feature-to-GA1.patch index dc36603..3d88096 100644 --- a/s390x-Add-unpack-facility-feature-to-GA1.patch +++ b/s390x-Add-unpack-facility-feature-to-GA1.patch @@ -41,10 +41,10 @@ index 6278845b12b8dee84c086413c60a..8ddeebc54419a3e2481e21916389 100644 /* Default features (in order of release) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index d94b915da419c3ad0a1f9622ca13..8b82e4c93dfa7e89127bce74cde7 100644 +index 870dd1b52b6e424f6cbd751cce0d..69881a0da0b31f72c4c3794d17ab 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c -@@ -2407,6 +2407,14 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp) +@@ -2425,6 +2425,14 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp) clear_bit(S390_FEAT_BPB, model->features); } diff --git a/s390x-Beautify-diag308-handling.patch b/s390x-Beautify-diag308-handling.patch deleted file mode 100644 index 8708751..0000000 --- a/s390x-Beautify-diag308-handling.patch +++ /dev/null @@ -1,113 +0,0 @@ -From: Janosch Frank -Date: Wed, 27 Nov 2019 12:50:45 -0500 -Subject: s390x: Beautify diag308 handling - -References: bsc#1167075 - -Let's improve readability by: -* Using constants for the subcodes -* Moving parameter checking into a function -* Removing subcode > 6 check as the default case catches that - -Signed-off-by: Janosch Frank -Reviewed-by: Cornelia Huck -Reviewed-by: Thomas Huth -Reviewed-by: David Hildenbrand -Message-Id: <20191127175046.4911-6-frankja@linux.ibm.com> -Signed-off-by: Cornelia Huck -(cherry picked from commit 0b7fd817e0f383760e37ca9286150d5816cf0594) -Signed-off-by: Bruce Rogers ---- - target/s390x/diag.c | 54 +++++++++++++++++++++++++++------------------ - 1 file changed, 32 insertions(+), 22 deletions(-) - -diff --git a/target/s390x/diag.c b/target/s390x/diag.c -index 0c81d8e1efbfe37a384199488a72..54e5670b3fd6d960bd3fb4baca8b 100644 ---- a/target/s390x/diag.c -+++ b/target/s390x/diag.c -@@ -53,6 +53,29 @@ int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3) - #define DIAG_308_RC_NO_CONF 0x0102 - #define DIAG_308_RC_INVALID 0x0402 - -+#define DIAG308_RESET_MOD_CLR 0 -+#define DIAG308_RESET_LOAD_NORM 1 -+#define DIAG308_LOAD_CLEAR 3 -+#define DIAG308_LOAD_NORMAL_DUMP 4 -+#define DIAG308_SET 5 -+#define DIAG308_STORE 6 -+ -+static int diag308_parm_check(CPUS390XState *env, uint64_t r1, uint64_t addr, -+ uintptr_t ra, bool write) -+{ -+ if ((r1 & 1) || (addr & ~TARGET_PAGE_MASK)) { -+ s390_program_interrupt(env, PGM_SPECIFICATION, ra); -+ return -1; -+ } -+ if (!address_space_access_valid(&address_space_memory, addr, -+ sizeof(IplParameterBlock), write, -+ MEMTXATTRS_UNSPECIFIED)) { -+ s390_program_interrupt(env, PGM_ADDRESSING, ra); -+ return -1; -+ } -+ return 0; -+} -+ - void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra) - { - CPUState *cs = env_cpu(env); -@@ -65,30 +88,24 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra) - return; - } - -- if ((subcode & ~0x0ffffULL) || (subcode > 6)) { -+ if (subcode & ~0x0ffffULL) { - s390_program_interrupt(env, PGM_SPECIFICATION, ra); - return; - } - - switch (subcode) { -- case 0: -+ case DIAG308_RESET_MOD_CLR: - s390_ipl_reset_request(cs, S390_RESET_MODIFIED_CLEAR); - break; -- case 1: -+ case DIAG308_RESET_LOAD_NORM: - s390_ipl_reset_request(cs, S390_RESET_LOAD_NORMAL); - break; -- case 3: -+ case DIAG308_LOAD_CLEAR: -+ /* Well we still lack the clearing bit... */ - s390_ipl_reset_request(cs, S390_RESET_REIPL); - break; -- case 5: -- if ((r1 & 1) || (addr & 0x0fffULL)) { -- s390_program_interrupt(env, PGM_SPECIFICATION, ra); -- return; -- } -- if (!address_space_access_valid(&address_space_memory, addr, -- sizeof(IplParameterBlock), false, -- MEMTXATTRS_UNSPECIFIED)) { -- s390_program_interrupt(env, PGM_ADDRESSING, ra); -+ case DIAG308_SET: -+ if (diag308_parm_check(env, r1, addr, ra, false)) { - return; - } - iplb = g_new0(IplParameterBlock, 1); -@@ -110,15 +127,8 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra) - out: - g_free(iplb); - return; -- case 6: -- if ((r1 & 1) || (addr & 0x0fffULL)) { -- s390_program_interrupt(env, PGM_SPECIFICATION, ra); -- return; -- } -- if (!address_space_access_valid(&address_space_memory, addr, -- sizeof(IplParameterBlock), true, -- MEMTXATTRS_UNSPECIFIED)) { -- s390_program_interrupt(env, PGM_ADDRESSING, ra); -+ case DIAG308_STORE: -+ if (diag308_parm_check(env, r1, addr, ra, true)) { - return; - } - iplb = s390_ipl_get_iplb(); diff --git a/s390x-Don-t-do-a-normal-reset-on-the-ini.patch b/s390x-Don-t-do-a-normal-reset-on-the-ini.patch deleted file mode 100644 index b501ea4..0000000 --- a/s390x-Don-t-do-a-normal-reset-on-the-ini.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Janosch Frank -Date: Wed, 27 Nov 2019 12:50:41 -0500 -Subject: s390x: Don't do a normal reset on the initial cpu - -References: bsc#1167075 - -The initiating cpu needs to be reset with an initial reset. While -doing a normal reset followed by a initial reset is not wrong per se, -the Ultravisor will only allow the correct reset to be performed. - -Signed-off-by: Janosch Frank -Reviewed-by: David Hildenbrand -Reviewed-by: Cornelia Huck -Message-Id: <20191127175046.4911-2-frankja@linux.ibm.com> -Signed-off-by: Cornelia Huck -(cherry picked from commit ec9227339fce99412830d44a37eb0bd2fadd5f75) -Signed-off-by: Bruce Rogers ---- - hw/s390x/s390-virtio-ccw.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index d3edeef0ad924af160eb83ea6724..c1d1440272a42eef86eb14724f52 100644 ---- a/hw/s390x/s390-virtio-ccw.c -+++ b/hw/s390x/s390-virtio-ccw.c -@@ -348,6 +348,9 @@ static void s390_machine_reset(MachineState *machine) - break; - case S390_RESET_LOAD_NORMAL: - CPU_FOREACH(t) { -+ if (t == cs) { -+ continue; -+ } - run_on_cpu(t, s390_do_cpu_reset, RUN_ON_CPU_NULL); - } - subsystem_reset(); diff --git a/s390x-Move-clear-reset.patch b/s390x-Move-clear-reset.patch deleted file mode 100644 index f25acb8..0000000 --- a/s390x-Move-clear-reset.patch +++ /dev/null @@ -1,129 +0,0 @@ -From: Janosch Frank -Date: Wed, 27 Nov 2019 12:50:44 -0500 -Subject: s390x: Move clear reset - -References: bsc#1167075 - -Let's also move the clear reset function into the reset handler. - -Signed-off-by: Janosch Frank -Message-Id: <20191127175046.4911-5-frankja@linux.ibm.com> -Reviewed-by: David Hildenbrand -Reviewed-by: Thomas Huth -Signed-off-by: Cornelia Huck -(cherry picked from commit eb8adcc3e9e3b8405c104ede72cf9f3bb2a5e226) -Signed-off-by: Bruce Rogers ---- - target/s390x/cpu-qom.h | 1 + - target/s390x/cpu.c | 58 +++++++++++++----------------------------- - 2 files changed, 18 insertions(+), 41 deletions(-) - -diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h -index 6f0a12042ed4802de7da08d63612..dbe5346ec9019f4f5939598b7a83 100644 ---- a/target/s390x/cpu-qom.h -+++ b/target/s390x/cpu-qom.h -@@ -37,6 +37,7 @@ typedef struct S390CPUDef S390CPUDef; - typedef enum cpu_reset_type { - S390_CPU_RESET_NORMAL, - S390_CPU_RESET_INITIAL, -+ S390_CPU_RESET_CLEAR, - } cpu_reset_type; - - /** -diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index ca62fe768569b992bbf41b064734..bd39cb54b7aa3fa8edba5d9975a4 100644 ---- a/target/s390x/cpu.c -+++ b/target/s390x/cpu.c -@@ -94,6 +94,9 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); - - switch (type) { -+ case S390_CPU_RESET_CLEAR: -+ memset(env, 0, offsetof(CPUS390XState, start_initial_reset_fields)); -+ /* fall through */ - case S390_CPU_RESET_INITIAL: - /* initial reset does not clear everything! */ - memset(&env->start_initial_reset_fields, 0, -@@ -107,6 +110,14 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - env->cregs[0] = CR0_RESET; - env->cregs[14] = CR14_RESET; - -+#if defined(CONFIG_USER_ONLY) -+ /* user mode should always be allowed to use the full FPU */ -+ env->cregs[0] |= CR0_AFP; -+ if (s390_has_feat(S390_FEAT_VECTOR)) { -+ env->cregs[0] |= CR0_VECTOR; -+ } -+#endif -+ - /* tininess for underflow is detected before rounding */ - set_float_detect_tininess(float_tininess_before_rounding, - &env->fpu_status); -@@ -125,46 +136,6 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - } - } - --/* CPUClass:reset() */ --static void s390_cpu_full_reset(CPUState *s) --{ -- S390CPU *cpu = S390_CPU(s); -- S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); -- CPUS390XState *env = &cpu->env; -- -- scc->parent_reset(s); -- cpu->env.sigp_order = 0; -- s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); -- -- memset(env, 0, offsetof(CPUS390XState, end_reset_fields)); -- -- /* architectured initial values for CR 0 and 14 */ -- env->cregs[0] = CR0_RESET; -- env->cregs[14] = CR14_RESET; -- --#if defined(CONFIG_USER_ONLY) -- /* user mode should always be allowed to use the full FPU */ -- env->cregs[0] |= CR0_AFP; -- if (s390_has_feat(S390_FEAT_VECTOR)) { -- env->cregs[0] |= CR0_VECTOR; -- } --#endif -- -- /* architectured initial value for Breaking-Event-Address register */ -- env->gbea = 1; -- -- env->pfault_token = -1UL; -- -- /* tininess for underflow is detected before rounding */ -- set_float_detect_tininess(float_tininess_before_rounding, -- &env->fpu_status); -- -- /* Reset state inside the kernel that we cannot access yet from QEMU. */ -- if (kvm_enabled()) { -- kvm_s390_reset_vcpu(cpu); -- } --} -- - #if !defined(CONFIG_USER_ONLY) - static void s390_cpu_machine_reset_cb(void *opaque) - { -@@ -456,6 +427,11 @@ static Property s390x_cpu_properties[] = { - DEFINE_PROP_END_OF_LIST() - }; - -+static void s390_cpu_reset_full(CPUState *s) -+{ -+ return s390_cpu_reset(s, S390_CPU_RESET_CLEAR); -+} -+ - static void s390_cpu_class_init(ObjectClass *oc, void *data) - { - S390CPUClass *scc = S390_CPU_CLASS(oc); -@@ -472,7 +448,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) - scc->load_normal = s390_cpu_load_normal; - #endif - scc->reset = s390_cpu_reset; -- cc->reset = s390_cpu_full_reset; -+ cc->reset = s390_cpu_reset_full; - cc->class_by_name = s390_cpu_class_by_name, - cc->has_work = s390_cpu_has_work; - #ifdef CONFIG_TCG diff --git a/s390x-Move-initial-reset.patch b/s390x-Move-initial-reset.patch deleted file mode 100644 index 8ab9cbe..0000000 --- a/s390x-Move-initial-reset.patch +++ /dev/null @@ -1,142 +0,0 @@ -From: Janosch Frank -Date: Thu, 28 Nov 2019 03:37:23 -0500 -Subject: s390x: Move initial reset - -References: bsc#1167075 - -Let's move the intial reset into the reset handler and cleanup -afterwards. - -Signed-off-by: Janosch Frank -Reviewed-by: David Hildenbrand -Message-Id: <20191128083723.11937-1-frankja@linux.ibm.com> -Reviewed-by: Thomas Huth -Signed-off-by: Cornelia Huck -(cherry picked from commit 81b9222358e5c8f666f0d86057c75e40531d804c) -Signed-off-by: Bruce Rogers ---- - target/s390x/cpu-qom.h | 2 +- - target/s390x/cpu.c | 46 +++++++++++++++++------------------------- - target/s390x/cpu.h | 2 +- - target/s390x/sigp.c | 2 +- - 4 files changed, 21 insertions(+), 31 deletions(-) - -diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h -index f3b71bac67c91c9e307fa250b47a..6f0a12042ed4802de7da08d63612 100644 ---- a/target/s390x/cpu-qom.h -+++ b/target/s390x/cpu-qom.h -@@ -36,6 +36,7 @@ typedef struct S390CPUDef S390CPUDef; - - typedef enum cpu_reset_type { - S390_CPU_RESET_NORMAL, -+ S390_CPU_RESET_INITIAL, - } cpu_reset_type; - - /** -@@ -62,7 +63,6 @@ typedef struct S390CPUClass { - void (*parent_reset)(CPUState *cpu); - void (*load_normal)(CPUState *cpu); - void (*reset)(CPUState *cpu, cpu_reset_type type); -- void (*initial_cpu_reset)(CPUState *cpu); - } S390CPUClass; - - typedef struct S390CPU S390CPU; -diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index 67d6fbfa4401720aa24f2ace8e3c..ca62fe768569b992bbf41b064734 100644 ---- a/target/s390x/cpu.c -+++ b/target/s390x/cpu.c -@@ -94,6 +94,23 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); - - switch (type) { -+ case S390_CPU_RESET_INITIAL: -+ /* initial reset does not clear everything! */ -+ memset(&env->start_initial_reset_fields, 0, -+ offsetof(CPUS390XState, end_reset_fields) - -+ offsetof(CPUS390XState, start_initial_reset_fields)); -+ -+ /* architectured initial value for Breaking-Event-Address register */ -+ env->gbea = 1; -+ -+ /* architectured initial values for CR 0 and 14 */ -+ env->cregs[0] = CR0_RESET; -+ env->cregs[14] = CR14_RESET; -+ -+ /* tininess for underflow is detected before rounding */ -+ set_float_detect_tininess(float_tininess_before_rounding, -+ &env->fpu_status); -+ /* fall through */ - case S390_CPU_RESET_NORMAL: - env->pfault_token = -1UL; - env->bpbc = false; -@@ -101,35 +118,9 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - default: - g_assert_not_reached(); - } --} -- --/* S390CPUClass::initial_reset() */ --static void s390_cpu_initial_reset(CPUState *s) --{ -- S390CPU *cpu = S390_CPU(s); -- CPUS390XState *env = &cpu->env; -- -- s390_cpu_reset(s, S390_CPU_RESET_NORMAL); -- /* initial reset does not clear everything! */ -- memset(&env->start_initial_reset_fields, 0, -- offsetof(CPUS390XState, end_reset_fields) - -- offsetof(CPUS390XState, start_initial_reset_fields)); -- -- /* architectured initial values for CR 0 and 14 */ -- env->cregs[0] = CR0_RESET; -- env->cregs[14] = CR14_RESET; -- -- /* architectured initial value for Breaking-Event-Address register */ -- env->gbea = 1; -- -- env->pfault_token = -1UL; -- -- /* tininess for underflow is detected before rounding */ -- set_float_detect_tininess(float_tininess_before_rounding, -- &env->fpu_status); - - /* Reset state inside the kernel that we cannot access yet from QEMU. */ -- if (kvm_enabled()) { -+ if (kvm_enabled() && type != S390_CPU_RESET_NORMAL) { - kvm_s390_reset_vcpu(cpu); - } - } -@@ -481,7 +472,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) - scc->load_normal = s390_cpu_load_normal; - #endif - scc->reset = s390_cpu_reset; -- scc->initial_cpu_reset = s390_cpu_initial_reset; - cc->reset = s390_cpu_full_reset; - cc->class_by_name = s390_cpu_class_by_name, - cc->has_work = s390_cpu_has_work; -diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h -index 18123dfd5bd13f530fcc3f8c54c4..d2af13b345ccd9094f82385cd528 100644 ---- a/target/s390x/cpu.h -+++ b/target/s390x/cpu.h -@@ -748,7 +748,7 @@ static inline void s390_do_cpu_initial_reset(CPUState *cs, run_on_cpu_data arg) - { - S390CPUClass *scc = S390_CPU_GET_CLASS(cs); - -- scc->initial_cpu_reset(cs); -+ scc->reset(cs, S390_CPU_RESET_INITIAL); - } - - static inline void s390_do_cpu_load_normal(CPUState *cs, run_on_cpu_data arg) -diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c -index 850139b9cd544c4bb34497fec554..727875bb4ab9b6c6f606e4ba8afb 100644 ---- a/target/s390x/sigp.c -+++ b/target/s390x/sigp.c -@@ -254,7 +254,7 @@ static void sigp_initial_cpu_reset(CPUState *cs, run_on_cpu_data arg) - SigpInfo *si = arg.host_ptr; - - cpu_synchronize_state(cs); -- scc->initial_cpu_reset(cs); -+ scc->reset(cs, S390_CPU_RESET_INITIAL); - cpu_synchronize_post_reset(cs); - si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; - } diff --git a/s390x-Move-reset-normal-to-shared-reset-.patch b/s390x-Move-reset-normal-to-shared-reset-.patch deleted file mode 100644 index 9910bbf..0000000 --- a/s390x-Move-reset-normal-to-shared-reset-.patch +++ /dev/null @@ -1,128 +0,0 @@ -From: Janosch Frank -Date: Wed, 27 Nov 2019 12:50:42 -0500 -Subject: s390x: Move reset normal to shared reset handler - -References: bsc#1167075 - -Let's start moving the cpu reset functions into a single function with -a switch/case, so we can later use fallthroughs and share more code -between resets. - -This patch introduces the reset function by renaming cpu_reset(). - -Signed-off-by: Janosch Frank -Reviewed-by: David Hildenbrand -Message-Id: <20191127175046.4911-3-frankja@linux.ibm.com> -Reviewed-by: Thomas Huth -Signed-off-by: Cornelia Huck -(cherry picked from commit eac4f82791f1807c423e85670837db103b9d59b3) -Signed-off-by: Bruce Rogers ---- - target/s390x/cpu-qom.h | 6 +++++- - target/s390x/cpu.c | 19 +++++++++++++------ - target/s390x/cpu.h | 2 +- - target/s390x/sigp.c | 2 +- - 4 files changed, 20 insertions(+), 9 deletions(-) - -diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h -index b809ec8418e016cf8b227489f905..f3b71bac67c91c9e307fa250b47a 100644 ---- a/target/s390x/cpu-qom.h -+++ b/target/s390x/cpu-qom.h -@@ -34,6 +34,10 @@ - typedef struct S390CPUModel S390CPUModel; - typedef struct S390CPUDef S390CPUDef; - -+typedef enum cpu_reset_type { -+ S390_CPU_RESET_NORMAL, -+} cpu_reset_type; -+ - /** - * S390CPUClass: - * @parent_realize: The parent class' realize handler. -@@ -57,7 +61,7 @@ typedef struct S390CPUClass { - DeviceRealize parent_realize; - void (*parent_reset)(CPUState *cpu); - void (*load_normal)(CPUState *cpu); -- void (*cpu_reset)(CPUState *cpu); -+ void (*reset)(CPUState *cpu, cpu_reset_type type); - void (*initial_cpu_reset)(CPUState *cpu); - } S390CPUClass; - -diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index 3abe7e80fd0a067a95545c7c3b9b..67d6fbfa4401720aa24f2ace8e3c 100644 ---- a/target/s390x/cpu.c -+++ b/target/s390x/cpu.c -@@ -82,18 +82,25 @@ static void s390_cpu_load_normal(CPUState *s) - } - #endif - --/* S390CPUClass::cpu_reset() */ --static void s390_cpu_reset(CPUState *s) -+/* S390CPUClass::reset() */ -+static void s390_cpu_reset(CPUState *s, cpu_reset_type type) - { - S390CPU *cpu = S390_CPU(s); - S390CPUClass *scc = S390_CPU_GET_CLASS(cpu); - CPUS390XState *env = &cpu->env; - -- env->pfault_token = -1UL; -- env->bpbc = false; - scc->parent_reset(s); - cpu->env.sigp_order = 0; - s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu); -+ -+ switch (type) { -+ case S390_CPU_RESET_NORMAL: -+ env->pfault_token = -1UL; -+ env->bpbc = false; -+ break; -+ default: -+ g_assert_not_reached(); -+ } - } - - /* S390CPUClass::initial_reset() */ -@@ -102,7 +109,7 @@ static void s390_cpu_initial_reset(CPUState *s) - S390CPU *cpu = S390_CPU(s); - CPUS390XState *env = &cpu->env; - -- s390_cpu_reset(s); -+ s390_cpu_reset(s, S390_CPU_RESET_NORMAL); - /* initial reset does not clear everything! */ - memset(&env->start_initial_reset_fields, 0, - offsetof(CPUS390XState, end_reset_fields) - -@@ -473,7 +480,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) - #if !defined(CONFIG_USER_ONLY) - scc->load_normal = s390_cpu_load_normal; - #endif -- scc->cpu_reset = s390_cpu_reset; -+ scc->reset = s390_cpu_reset; - scc->initial_cpu_reset = s390_cpu_initial_reset; - cc->reset = s390_cpu_full_reset; - cc->class_by_name = s390_cpu_class_by_name, -diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h -index 17460ed7b381070b4d8206e2c4cb..18123dfd5bd13f530fcc3f8c54c4 100644 ---- a/target/s390x/cpu.h -+++ b/target/s390x/cpu.h -@@ -741,7 +741,7 @@ static inline void s390_do_cpu_reset(CPUState *cs, run_on_cpu_data arg) - { - S390CPUClass *scc = S390_CPU_GET_CLASS(cs); - -- scc->cpu_reset(cs); -+ scc->reset(cs, S390_CPU_RESET_NORMAL); - } - - static inline void s390_do_cpu_initial_reset(CPUState *cs, run_on_cpu_data arg) -diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c -index 2ce22d4dc18bb764948f0abe1084..850139b9cd544c4bb34497fec554 100644 ---- a/target/s390x/sigp.c -+++ b/target/s390x/sigp.c -@@ -266,7 +266,7 @@ static void sigp_cpu_reset(CPUState *cs, run_on_cpu_data arg) - SigpInfo *si = arg.host_ptr; - - cpu_synchronize_state(cs); -- scc->cpu_reset(cs); -+ scc->reset(cs, S390_CPU_RESET_NORMAL); - cpu_synchronize_post_reset(cs); - si->cc = SIGP_CC_ORDER_CODE_ACCEPTED; - } diff --git a/s390x-adapter-routes-error-handling.patch b/s390x-adapter-routes-error-handling.patch deleted file mode 100644 index ca86743..0000000 --- a/s390x-adapter-routes-error-handling.patch +++ /dev/null @@ -1,76 +0,0 @@ -From: Cornelia Huck -Date: Thu, 16 Jan 2020 13:10:35 +0100 -Subject: s390x: adapter routes error handling - -Git-commit: 3c5fd8074335c67777d9391b84f97070c35d9c63 - -If the kernel irqchip has been disabled, we don't want the -{add,release}_adapter_routes routines to call any kvm_irqchip_* -interfaces, as they may rely on an irqchip actually having been -created. Just take a quick exit in that case instead. If you are -trying to use irqfd without a kernel irqchip, we will fail with -an error. - -Also initialize routes->gsi[] with -1 in the virtio-ccw handling, -to make sure we don't trip over other errors, either. (Nobody -else uses the gsi array in that structure.) - -Fixes: d426d9fba8ea ("s390x/virtio-ccw: wire up irq routing and irqfds") -Reviewed-by: Thomas Huth -Acked-by: Christian Borntraeger -Message-Id: <20200117111147.5006-1-cohuck@redhat.com> -Signed-off-by: Cornelia Huck -Signed-off-by: Bruce Rogers ---- - hw/intc/s390_flic_kvm.c | 8 ++++++++ - hw/s390x/virtio-ccw.c | 4 ++++ - 2 files changed, 12 insertions(+) - -diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c -index c9ee80eaae02dea3a46bbaf82d4a..98cc15868374034d9d18b539dc42 100644 ---- a/hw/intc/s390_flic_kvm.c -+++ b/hw/intc/s390_flic_kvm.c -@@ -331,6 +331,10 @@ static int kvm_s390_add_adapter_routes(S390FLICState *fs, - int ret, i; - uint64_t ind_offset = routes->adapter.ind_offset; - -+ if (!kvm_gsi_routing_enabled()) { -+ return -ENOSYS; -+ } -+ - for (i = 0; i < routes->num_routes; i++) { - ret = kvm_irqchip_add_adapter_route(kvm_state, &routes->adapter); - if (ret < 0) { -@@ -358,6 +362,10 @@ static void kvm_s390_release_adapter_routes(S390FLICState *fs, - { - int i; - -+ if (!kvm_gsi_routing_enabled()) { -+ return; -+ } -+ - for (i = 0; i < routes->num_routes; i++) { - if (routes->gsi[i] >= 0) { - kvm_irqchip_release_virq(kvm_state, routes->gsi[i]); -diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c -index 6580ce5907dd0b3c87bae8e04923..13f57e7b67f18c644dee4c292fdf 100644 ---- a/hw/s390x/virtio-ccw.c -+++ b/hw/s390x/virtio-ccw.c -@@ -697,6 +697,7 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *dev, Error **errp) - CCWDeviceClass *ck = CCW_DEVICE_GET_CLASS(ccw_dev); - SubchDev *sch; - Error *err = NULL; -+ int i; - - sch = css_create_sch(ccw_dev->devno, errp); - if (!sch) { -@@ -717,6 +718,9 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *dev, Error **errp) - ccw_dev->sch = sch; - dev->indicators = NULL; - dev->revision = -1; -+ for (i = 0; i < ADAPTER_ROUTES_MAX_GSI; i++) { -+ dev->routes.gsi[i] = -1; -+ } - css_sch_build_virtual_schib(sch, 0, VIRTIO_CCW_CHPID_TYPE); - - trace_virtio_ccw_new_device( diff --git a/s390x-ipl-Consolidate-iplb-validity-chec.patch b/s390x-ipl-Consolidate-iplb-validity-chec.patch deleted file mode 100644 index 3465f21..0000000 --- a/s390x-ipl-Consolidate-iplb-validity-chec.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Janosch Frank -Date: Tue, 10 Mar 2020 05:09:50 -0400 -Subject: s390x: ipl: Consolidate iplb validity check into one function - -References: bsc#1167075 - -It's nicer to just call one function than calling a function for each -possible iplb type. - -Signed-off-by: Janosch Frank -Reviewed-by: David Hildenbrand -Message-Id: <20200310090950.61172-1-frankja@linux.ibm.com> -Reviewed-by: Christian Borntraeger -Signed-off-by: Christian Borntraeger -(cherry picked from commit 94c21436e5a89143f8b9cb4d089d1a2f3f4fd377) -Signed-off-by: Bruce Rogers ---- - hw/s390x/ipl.h | 18 +++++++++--------- - target/s390x/diag.c | 2 +- - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h -index d4813105db33253fd1eba53cd7e3..3e44abe1c651d8a01f4708c2801c 100644 ---- a/hw/s390x/ipl.h -+++ b/hw/s390x/ipl.h -@@ -173,16 +173,16 @@ static inline bool iplb_valid_len(IplParameterBlock *iplb) - return be32_to_cpu(iplb->len) <= sizeof(IplParameterBlock); - } - --static inline bool iplb_valid_ccw(IplParameterBlock *iplb) -+static inline bool iplb_valid(IplParameterBlock *iplb) - { -- return be32_to_cpu(iplb->len) >= S390_IPLB_MIN_CCW_LEN && -- iplb->pbt == S390_IPL_TYPE_CCW; --} -- --static inline bool iplb_valid_fcp(IplParameterBlock *iplb) --{ -- return be32_to_cpu(iplb->len) >= S390_IPLB_MIN_FCP_LEN && -- iplb->pbt == S390_IPL_TYPE_FCP; -+ switch (iplb->pbt) { -+ case S390_IPL_TYPE_FCP: -+ return be32_to_cpu(iplb->len) >= S390_IPLB_MIN_FCP_LEN; -+ case S390_IPL_TYPE_CCW: -+ return be32_to_cpu(iplb->len) >= S390_IPLB_MIN_CCW_LEN; -+ default: -+ return false; -+ } - } - - #endif -diff --git a/target/s390x/diag.c b/target/s390x/diag.c -index 53c2f81f2a1aad58d417bc3dc79c..0c81d8e1efbfe37a384199488a72 100644 ---- a/target/s390x/diag.c -+++ b/target/s390x/diag.c -@@ -100,7 +100,7 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra) - - cpu_physical_memory_read(addr, iplb, be32_to_cpu(iplb->len)); - -- if (!iplb_valid_ccw(iplb) && !iplb_valid_fcp(iplb)) { -+ if (!iplb_valid(iplb)) { - env->regs[r1 + 1] = DIAG_308_RC_INVALID; - goto out; - } diff --git a/s390x-kvm-Make-kvm_sclp_service_call-voi.patch b/s390x-kvm-Make-kvm_sclp_service_call-voi.patch deleted file mode 100644 index feff53f..0000000 --- a/s390x-kvm-Make-kvm_sclp_service_call-voi.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Janosch Frank -Date: Fri, 29 Nov 2019 04:17:13 -0500 -Subject: s390x: kvm: Make kvm_sclp_service_call void - -References: bsc#1167075 - -It defaults to returning 0 anyway and that return value is not -necessary, as 0 is also the default rc that the caller would return. - -While doing that we can simplify the logic a bit and return early if -we inject a PGM exception. - -Signed-off-by: Janosch Frank -Reviewed-by: Thomas Huth -Message-Id: <20191129091713.4582-1-frankja@linux.ibm.com> -Reviewed-by: David Hildenbrand -Signed-off-by: Cornelia Huck -(cherry picked from commit 15b6c0370c3e2774fd9ffda5c10c6e36952e8eb6) -Signed-off-by: Bruce Rogers ---- - target/s390x/kvm.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index 0c9d14b4b115de974e21af3f0f47..ad6e38c8761be7e0cad57771f49b 100644 ---- a/target/s390x/kvm.c -+++ b/target/s390x/kvm.c -@@ -1159,13 +1159,13 @@ void kvm_s390_access_exception(S390CPU *cpu, uint16_t code, uint64_t te_code) - kvm_s390_vcpu_interrupt(cpu, &irq); - } - --static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, -+static void kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, - uint16_t ipbh0) - { - CPUS390XState *env = &cpu->env; - uint64_t sccb; - uint32_t code; -- int r = 0; -+ int r; - - sccb = env->regs[ipbh0 & 0xf]; - code = env->regs[(ipbh0 & 0xf0) >> 4]; -@@ -1173,11 +1173,9 @@ static int kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, - r = sclp_service_call(env, sccb, code); - if (r < 0) { - kvm_s390_program_interrupt(cpu, -r); -- } else { -- setcc(cpu, r); -+ return; - } -- -- return 0; -+ setcc(cpu, r); - } - - static int handle_b2(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) -@@ -1240,7 +1238,7 @@ static int handle_b2(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) - setcc(cpu, 3); - break; - case PRIV_B2_SCLP_CALL: -- rc = kvm_sclp_service_call(cpu, run, ipbh0); -+ kvm_sclp_service_call(cpu, run, ipbh0); - break; - default: - rc = -1; diff --git a/s390x-protvirt-Add-migration-blocker.patch b/s390x-protvirt-Add-migration-blocker.patch index bd0d588..c74952f 100644 --- a/s390x-protvirt-Add-migration-blocker.patch +++ b/s390x-protvirt-Add-migration-blocker.patch @@ -18,10 +18,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 18 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 5149030d2216040c396a02d977c8..ed910a099627dae96ab5da747fb3 100644 +index b4d681da43af43f23f66206cacf6..e00040a00ba60b20b42ee26a299b 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c -@@ -44,6 +44,9 @@ +@@ -45,6 +45,9 @@ #include "sysemu/sysemu.h" #include "hw/s390x/pv.h" #include @@ -31,7 +31,7 @@ index 5149030d2216040c396a02d977c8..ed910a099627dae96ab5da747fb3 100644 S390CPU *s390_cpu_addr2state(uint16_t cpu_addr) { -@@ -325,15 +328,30 @@ static void s390_machine_unprotect(S390CcwMachineState *ms) +@@ -324,15 +327,30 @@ static void s390_machine_unprotect(S390CcwMachineState *ms) { s390_pv_vm_disable(); ms->pv = false; diff --git a/s390x-protvirt-Disable-address-checks-fo.patch b/s390x-protvirt-Disable-address-checks-fo.patch index e985f70..b39bed2 100644 --- a/s390x-protvirt-Disable-address-checks-fo.patch +++ b/s390x-protvirt-Disable-address-checks-fo.patch @@ -23,7 +23,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c -index c437a1d8c6afed80199034ab6f6a..bbcccf6be23456393282287bf116 100644 +index 0e840cc5792afe02d543568ba880..8828482eec306a2bccd8bef269b7 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -16,6 +16,25 @@ diff --git a/s390x-protvirt-Handle-SIGP-store-status-.patch b/s390x-protvirt-Handle-SIGP-store-status-.patch index fcc698d..18d8518 100644 --- a/s390x-protvirt-Handle-SIGP-store-status-.patch +++ b/s390x-protvirt-Handle-SIGP-store-status-.patch @@ -19,7 +19,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 6 insertions(+) diff --git a/target/s390x/helper.c b/target/s390x/helper.c -index 6808dfda01f42acbaa1d36ef787b..36b6d3d9d1bca9db90aac1c7bec6 100644 +index ed726849114f2f353471233f670b..09f60406aa33c938ff54a0dbda13 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -25,6 +25,7 @@ @@ -39,6 +39,6 @@ index 6808dfda01f42acbaa1d36ef787b..36b6d3d9d1bca9db90aac1c7bec6 100644 + return 0; + } + - sa = cpu_physical_memory_map(addr, &len, 1); + sa = cpu_physical_memory_map(addr, &len, true); if (!sa) { return -EFAULT; diff --git a/s390x-protvirt-Inhibit-balloon-when-swit.patch b/s390x-protvirt-Inhibit-balloon-when-swit.patch index f0a9995..91f6294 100644 --- a/s390x-protvirt-Inhibit-balloon-when-swit.patch +++ b/s390x-protvirt-Inhibit-balloon-when-swit.patch @@ -36,10 +36,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 11 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index ed910a099627dae96ab5da747fb3..85250bf046ed72313b03c6ff6c54 100644 +index e00040a00ba60b20b42ee26a299b..db45249320abf7920ec8730790c2 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c -@@ -42,6 +42,7 @@ +@@ -43,6 +43,7 @@ #include "hw/qdev-properties.h" #include "hw/s390x/tod.h" #include "sysemu/sysemu.h" @@ -47,7 +47,7 @@ index ed910a099627dae96ab5da747fb3..85250bf046ed72313b03c6ff6c54 100644 #include "hw/s390x/pv.h" #include #include "migration/blocker.h" -@@ -330,6 +331,7 @@ static void s390_machine_unprotect(S390CcwMachineState *ms) +@@ -329,6 +330,7 @@ static void s390_machine_unprotect(S390CcwMachineState *ms) ms->pv = false; migrate_del_blocker(pv_mig_blocker); error_free_or_abort(&pv_mig_blocker); @@ -55,7 +55,7 @@ index ed910a099627dae96ab5da747fb3..85250bf046ed72313b03c6ff6c54 100644 } static int s390_machine_protect(S390CcwMachineState *ms) -@@ -337,10 +339,18 @@ static int s390_machine_protect(S390CcwMachineState *ms) +@@ -336,10 +338,18 @@ static int s390_machine_protect(S390CcwMachineState *ms) Error *local_err = NULL; int rc; @@ -74,7 +74,7 @@ index ed910a099627dae96ab5da747fb3..85250bf046ed72313b03c6ff6c54 100644 error_report_err(local_err); error_free_or_abort(&pv_mig_blocker); return rc; -@@ -349,6 +359,7 @@ static int s390_machine_protect(S390CcwMachineState *ms) +@@ -348,6 +358,7 @@ static int s390_machine_protect(S390CcwMachineState *ms) /* Create SE VM */ rc = s390_pv_vm_enable(); if (rc) { diff --git a/s390x-protvirt-KVM-intercept-changes.patch b/s390x-protvirt-KVM-intercept-changes.patch index 571f65d..6c33aab 100644 --- a/s390x-protvirt-KVM-intercept-changes.patch +++ b/s390x-protvirt-KVM-intercept-changes.patch @@ -37,7 +37,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 4 insertions(+) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index d8d02ff34f4fc942cb7935deec58..abeeaaa67452b0b938557b0d0dea 100644 +index b2b14bde2b251986230153adca9a..1988809ec2e7b1b6db33ba85eaef 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -115,6 +115,8 @@ @@ -49,7 +49,7 @@ index d8d02ff34f4fc942cb7935deec58..abeeaaa67452b0b938557b0d0dea 100644 #define NR_LOCAL_IRQS 32 /* -@@ -1695,6 +1697,8 @@ static int handle_intercept(S390CPU *cpu) +@@ -1698,6 +1700,8 @@ static int handle_intercept(S390CPU *cpu) (long)cs->kvm_run->psw_addr); switch (icpt_code) { case ICPT_INSTRUCTION: diff --git a/s390x-protvirt-Move-IO-control-structure.patch b/s390x-protvirt-Move-IO-control-structure.patch index 3b62666..485a83d 100644 --- a/s390x-protvirt-Move-IO-control-structure.patch +++ b/s390x-protvirt-Move-IO-control-structure.patch @@ -17,7 +17,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c -index bbcccf6be23456393282287bf116..f40c35c6ff58315622510ae72103 100644 +index 8828482eec306a2bccd8bef269b7..7a14c52c123b842bba0b13f96b16 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -138,7 +138,9 @@ void ioinst_handle_msch(S390CPU *cpu, uint64_t reg1, uint32_t ipb, uintptr_t ra) diff --git a/s390x-protvirt-Move-STSI-data-over-SIDAD.patch b/s390x-protvirt-Move-STSI-data-over-SIDAD.patch index 7087ed6..1c1e899 100644 --- a/s390x-protvirt-Move-STSI-data-over-SIDAD.patch +++ b/s390x-protvirt-Move-STSI-data-over-SIDAD.patch @@ -18,7 +18,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index 941e4df630ad9b3dc780d3c92e6b..d00e05cc10d274790a215d0f4359 100644 +index 0e93778ed15d0e04e83eff1baccf..e0b61680ab086a5ff5875c42b7e5 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -50,6 +50,7 @@ @@ -29,9 +29,9 @@ index 941e4df630ad9b3dc780d3c92e6b..d00e05cc10d274790a215d0f4359 100644 #ifndef DEBUG_KVM #define DEBUG_KVM 0 -@@ -1803,7 +1804,9 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar) +@@ -1808,7 +1809,9 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar) SysIB_322 sysib; - int del; + int del, i; - if (s390_cpu_virt_mem_read(cpu, addr, ar, &sysib, sizeof(sysib))) { + if (s390_is_pv()) { @@ -40,7 +40,7 @@ index 941e4df630ad9b3dc780d3c92e6b..d00e05cc10d274790a215d0f4359 100644 return; } /* Shift the stack of Extended Names to prepare for our own data */ -@@ -1843,7 +1846,11 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar) +@@ -1861,7 +1864,11 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar) /* Insert UUID */ memcpy(sysib.vm[0].uuid, &qemu_uuid, sizeof(sysib.vm[0].uuid)); diff --git a/s390x-protvirt-SCLP-interpretation.patch b/s390x-protvirt-SCLP-interpretation.patch index 20abaea..dee5cf0 100644 --- a/s390x-protvirt-SCLP-interpretation.patch +++ b/s390x-protvirt-SCLP-interpretation.patch @@ -25,7 +25,7 @@ Signed-off-by: Bruce Rogers 3 files changed, 67 insertions(+), 16 deletions(-) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c -index f57ce7b73943564f4d44dcbe0cf0..1c380a49cc7140687329e43e9745 100644 +index f0c35aa57afde03f7ec3e5f52f49..ede056b3efd7d92445d00f2e1298 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -33,6 +33,22 @@ static inline SCLPDevice *get_sclp_device(void) @@ -86,8 +86,8 @@ index f57ce7b73943564f4d44dcbe0cf0..1c380a49cc7140687329e43e9745 100644 int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code) { SCLPDevice *sclp = get_sclp_device(); -@@ -230,17 +274,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code) - goto out; +@@ -225,17 +269,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code) + return -PGM_SPECIFICATION; } - switch (code & SCLP_CMD_CODE_MASK) { @@ -106,7 +106,7 @@ index f57ce7b73943564f4d44dcbe0cf0..1c380a49cc7140687329e43e9745 100644 goto out_write; } diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h -index c54413b78cf01b274cc249b1409b..c0a3faa37d7304536e75d32f2050 100644 +index cd7b24359f28deb4b659b1f284f6..822eff4396ff5dded7496e50575d 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -217,5 +217,7 @@ void s390_sclp_init(void); @@ -118,10 +118,10 @@ index c54413b78cf01b274cc249b1409b..c0a3faa37d7304536e75d32f2050 100644 #endif diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index d00e05cc10d274790a215d0f4359..d94b915da419c3ad0a1f9622ca13 100644 +index e0b61680ab086a5ff5875c42b7e5..870dd1b52b6e424f6cbd751cce0d 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c -@@ -1230,12 +1230,27 @@ static void kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, +@@ -1233,12 +1233,27 @@ static void kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, sccb = env->regs[ipbh0 & 0xf]; code = env->regs[(ipbh0 & 0xf0) >> 4]; diff --git a/s390x-protvirt-Set-guest-IPL-PSW.patch b/s390x-protvirt-Set-guest-IPL-PSW.patch index d8c02aa..364ae4d 100644 --- a/s390x-protvirt-Set-guest-IPL-PSW.patch +++ b/s390x-protvirt-Set-guest-IPL-PSW.patch @@ -17,22 +17,37 @@ Reviewed-by: Cornelia Huck (cherry picked from commit e8686d9849f1625f4f4b28403f0555181b72d1b6) Signed-off-by: Bruce Rogers --- - target/s390x/cpu.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) + target/s390x/cpu.c | 26 +++++++++++++++++--------- + 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index 479f1978c974722ceeb72ac5fb32..6da0c3f15530310fba5f609b8c7f 100644 +index bb7a588e3b791fe48b4e0a0826dd..f2ccf0a06a0c9c1dde202988ceee 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c -@@ -77,8 +77,16 @@ static bool s390_cpu_has_work(CPUState *cs) +@@ -77,16 +77,24 @@ static bool s390_cpu_has_work(CPUState *cs) static void s390_cpu_load_normal(CPUState *s) { S390CPU *cpu = S390_CPU(s); -- cpu->env.psw.addr = ldl_phys(s->as, 4) & PSW_MASK_ESA_ADDR; -- cpu->env.psw.mask = PSW_MASK_32 | PSW_MASK_64; +- uint64_t spsw = ldq_phys(s->as, 0); +- +- cpu->env.psw.mask = spsw & PSW_MASK_SHORT_CTRL; +- /* +- * Invert short psw indication, so SIE will report a specification +- * exception if it was not set. +- */ +- cpu->env.psw.mask ^= PSW_MASK_SHORTPSW; +- cpu->env.psw.addr = spsw & PSW_MASK_SHORT_ADDR; ++ uint64_t spsw; + + if (!s390_is_pv()) { -+ cpu->env.psw.addr = ldl_phys(s->as, 4) & PSW_MASK_ESA_ADDR; -+ cpu->env.psw.mask = PSW_MASK_32 | PSW_MASK_64; ++ spsw = ldq_phys(s->as, 0); ++ cpu->env.psw.mask = spsw & PSW_MASK_SHORT_CTRL; ++ /* ++ * Invert short psw indication, so SIE will report a specification ++ * exception if it was not set. ++ */ ++ cpu->env.psw.mask ^= PSW_MASK_SHORTPSW; ++ cpu->env.psw.addr = spsw & PSW_MASK_SHORT_ADDR; + } else { + /* + * Firmware requires us to set the load state before we set diff --git a/s390x-protvirt-Support-unpack-facility.patch b/s390x-protvirt-Support-unpack-facility.patch index 28ef6d3..b065d0d 100644 --- a/s390x-protvirt-Support-unpack-facility.patch +++ b/s390x-protvirt-Support-unpack-facility.patch @@ -44,10 +44,10 @@ Signed-off-by: Bruce Rogers 14 files changed, 468 insertions(+), 10 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS -index 5e5e3e52d614d05e7d6e8225e3b7..1dbe9345a022a25b7b40a5b5e9c8 100644 +index 8cbc1fac2bfcec86e0e9415ab244..831d4b014aea8c3ce17050cea880 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -385,6 +385,8 @@ F: target/s390x/machine.c +@@ -396,6 +396,8 @@ F: target/s390x/machine.c F: target/s390x/sigp.c F: target/s390x/cpu_features*.[ch] F: target/s390x/cpu_models.[ch] @@ -69,7 +69,7 @@ index e02ed80b6829a511362abc3525ec..a46a1c7894e0f612a2d74cec74f6 100644 obj-y += ap-device.o obj-y += ap-bridge.o diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c -index ca544d64c5e04782fb49d12521d5..c343cfb0bed4272cecf31207dae8 100644 +index 8c3e019571764920857540be62aa..ce21494c08f77a35269b5e4b3ad5 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -1,10 +1,11 @@ @@ -93,7 +93,7 @@ index ca544d64c5e04782fb49d12521d5..c343cfb0bed4272cecf31207dae8 100644 #include "ipl.h" #include "qemu/error-report.h" #include "qemu/config-file.h" -@@ -533,11 +535,30 @@ void s390_ipl_update_diag308(IplParameterBlock *iplb) +@@ -566,12 +568,31 @@ void s390_ipl_update_diag308(IplParameterBlock *iplb) { S390IPLState *ipl = get_ipl_device(); @@ -111,6 +111,7 @@ index ca544d64c5e04782fb49d12521d5..c343cfb0bed4272cecf31207dae8 100644 + ipl->iplb_valid = true; + } ipl->netboot = is_virtio_net_device(iplb); + update_machine_ipl_properties(iplb); } +IplParameterBlock *s390_ipl_get_iplb_pv(void) @@ -126,7 +127,7 @@ index ca544d64c5e04782fb49d12521d5..c343cfb0bed4272cecf31207dae8 100644 IplParameterBlock *s390_ipl_get_iplb(void) { S390IPLState *ipl = get_ipl_device(); -@@ -626,6 +647,38 @@ static void s390_ipl_prepare_qipl(S390CPU *cpu) +@@ -660,6 +681,38 @@ static void s390_ipl_prepare_qipl(S390CPU *cpu) cpu_physical_memory_unmap(addr, len, 1, len); } @@ -444,7 +445,7 @@ index 0000000000000000000000000000000000000000..8cf5cd2c9bcd48b03af1e546fb3a85cd + s390_pv_cmd_exit(KVM_PV_VM_UNSHARE_ALL, NULL); +} diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index c1d1440272a42eef86eb14724f52..5149030d2216040c396a02d977c8 100644 +index 0fa00a9fff3dbda8b34d29aad187..b4d681da43af43f23f66206cacf6 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -1,9 +1,10 @@ @@ -459,7 +460,7 @@ index c1d1440272a42eef86eb14724f52..5149030d2216040c396a02d977c8 100644 * * This work is licensed under the terms of the GNU GPL, version 2 or (at * your option) any later version. See the COPYING file in the top-level -@@ -41,6 +42,8 @@ +@@ -42,6 +43,8 @@ #include "hw/qdev-properties.h" #include "hw/s390x/tod.h" #include "sysemu/sysemu.h" @@ -468,7 +469,7 @@ index c1d1440272a42eef86eb14724f52..5149030d2216040c396a02d977c8 100644 S390CPU *s390_cpu_addr2state(uint16_t cpu_addr) { -@@ -318,10 +321,78 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on_cpu_data arg) +@@ -317,10 +320,78 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on_cpu_data arg) s390_cpu_set_state(S390_CPU_STATE_OPERATING, cpu); } @@ -547,7 +548,7 @@ index c1d1440272a42eef86eb14724f52..5149030d2216040c396a02d977c8 100644 /* get the reset parameters, reset them once done */ s390_ipl_get_reset_request(&cs, &reset_type); -@@ -329,9 +400,15 @@ static void s390_machine_reset(MachineState *machine) +@@ -328,9 +399,15 @@ static void s390_machine_reset(MachineState *machine) /* all CPUs are paused and synchronized at this point */ s390_cmma_reset(); @@ -563,7 +564,7 @@ index c1d1440272a42eef86eb14724f52..5149030d2216040c396a02d977c8 100644 qemu_devices_reset(); s390_crypto_reset(); -@@ -339,22 +416,56 @@ static void s390_machine_reset(MachineState *machine) +@@ -338,22 +415,56 @@ static void s390_machine_reset(MachineState *machine) run_on_cpu(cs, s390_do_cpu_ipl, RUN_ON_CPU_NULL); break; case S390_RESET_MODIFIED_CLEAR: @@ -697,7 +698,7 @@ index 8aa27199c9123bab03d3450313a5..cd1dccc6e3ba86455a9de5eb41cb 100644 } S390CcwMachineState; diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c -index 52fefa1586caa3cbd366fe230630..479f1978c974722ceeb72ac5fb32 100644 +index 427a46e3e1b61da1b7aae1f0e543..bb7a588e3b791fe48b4e0a0826dd 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -37,6 +37,7 @@ @@ -839,7 +840,7 @@ index c4cd497f850eb9c7a859932b0f1f..aa185017a2a886ca300fa75747ed 100644 { return 0; diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c -index f633472980b48757989db245fb1f..d8d02ff34f4fc942cb7935deec58 100644 +index 7f7ebab84279290cb0992d41e706..b2b14bde2b251986230153adca9a 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -321,6 +321,11 @@ void kvm_s390_set_max_pagesize(uint64_t pagesize, Error **errp) diff --git a/s390x-s390-virtio-ccw-Fix-build-on-syste.patch b/s390x-s390-virtio-ccw-Fix-build-on-syste.patch index fcc338c..d39c10d 100644 --- a/s390x-s390-virtio-ccw-Fix-build-on-syste.patch +++ b/s390x-s390-virtio-ccw-Fix-build-on-syste.patch @@ -63,10 +63,10 @@ index 8cf5cd2c9bcd48b03af1e546fb3a..2c4d5e89890b7d21abdcd718c2f2 100644 + env->regs[r1 + 1] = DIAG_308_RC_INVAL_FOR_PV; +} diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c -index 85250bf046ed72313b03c6ff6c54..5df455e065504bc0eef0f1f084dc 100644 +index db45249320abf7920ec8730790c2..501d4a66b346cfe9a987cebe884d 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c -@@ -44,7 +44,6 @@ +@@ -45,7 +45,6 @@ #include "sysemu/sysemu.h" #include "sysemu/balloon.h" #include "hw/s390x/pv.h" @@ -74,7 +74,7 @@ index 85250bf046ed72313b03c6ff6c54..5df455e065504bc0eef0f1f084dc 100644 #include "migration/blocker.h" static Error *pv_mig_blocker; -@@ -392,15 +391,6 @@ out_err: +@@ -391,15 +390,6 @@ out_err: return rc; } @@ -90,7 +90,7 @@ index 85250bf046ed72313b03c6ff6c54..5df455e065504bc0eef0f1f084dc 100644 static void s390_pv_prepare_reset(S390CcwMachineState *ms) { CPUState *cs; -@@ -486,7 +476,7 @@ static void s390_machine_reset(MachineState *machine) +@@ -485,7 +475,7 @@ static void s390_machine_reset(MachineState *machine) run_on_cpu(cs, s390_do_cpu_reset, RUN_ON_CPU_NULL); if (s390_machine_protect(ms)) { diff --git a/scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch b/scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch deleted file mode 100644 index 3828f4a..0000000 --- a/scsi-qemu-pr-helper-Fix-out-of-bounds-ac.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: Christophe de Dinechin -Date: Fri, 28 Feb 2020 16:00:59 +0100 -Subject: scsi/qemu-pr-helper: Fix out-of-bounds access to trnptid_list[] -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 4ce1e15fbc7266a108a7c77a3962644b3935346e - -Compile error reported by gcc 10.0.1: - -scsi/qemu-pr-helper.c: In function ‘multipath_pr_out’: -scsi/qemu-pr-helper.c:523:32: error: array subscript is outside array bounds of ‘struct transportid *[0]’ [-Werror=array-bounds] - 523 | paramp.trnptid_list[paramp.num_transportid++] = id; - | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ -In file included from scsi/qemu-pr-helper.c:36: -/usr/include/mpath_persist.h:168:22: note: while referencing ‘trnptid_list’ - 168 | struct transportid *trnptid_list[]; - | ^~~~~~~~~~~~ -scsi/qemu-pr-helper.c:424:35: note: defined here ‘paramp’ - 424 | struct prout_param_descriptor paramp; - | ^~~~~~ - -This highlights an actual implementation issue in function multipath_pr_out. -The variable paramp is declared with type `struct prout_param_descriptor`, -which is a struct terminated by an empty array in mpath_persist.h: - - struct transportid *trnptid_list[]; - -That empty array was filled with code that looked like that: - - trnptid_list[paramp.descr.num_transportid++] = id; - -This is an actual out-of-bounds access. - -The fix is to malloc `paramp`. - -Signed-off-by: Christophe de Dinechin -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - scsi/qemu-pr-helper.c | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c -index debb18f4aa5d55a1720587cf82ea..38c273de19573ad8421da6439153 100644 ---- a/scsi/qemu-pr-helper.c -+++ b/scsi/qemu-pr-helper.c -@@ -421,10 +421,13 @@ static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, - int rq_servact = cdb[1]; - int rq_scope = cdb[2] >> 4; - int rq_type = cdb[2] & 0xf; -- struct prout_param_descriptor paramp; -+ g_autofree struct prout_param_descriptor *paramp = NULL; - char transportids[PR_HELPER_DATA_SIZE]; - int r; - -+ paramp = g_malloc0(sizeof(struct prout_param_descriptor) -+ + sizeof(struct transportid *) * MPATH_MX_TIDS); -+ - if (sz < PR_OUT_FIXED_PARAM_SIZE) { - /* Illegal request, Parameter list length error. This isn't fatal; - * we have read the data, send an error without closing the socket. -@@ -454,10 +457,9 @@ static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, - * used by libmpathpersist (which, of course, will immediately - * do the opposite). - */ -- memset(¶mp, 0, sizeof(paramp)); -- memcpy(¶mp.key, ¶m[0], 8); -- memcpy(¶mp.sa_key, ¶m[8], 8); -- paramp.sa_flags = param[20]; -+ memcpy(¶mp->key, ¶m[0], 8); -+ memcpy(¶mp->sa_key, ¶m[8], 8); -+ paramp->sa_flags = param[20]; - if (sz > PR_OUT_FIXED_PARAM_SIZE) { - size_t transportid_len; - int i, j; -@@ -520,12 +522,13 @@ static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, - return CHECK_CONDITION; - } - -- paramp.trnptid_list[paramp.num_transportid++] = id; -+ assert(paramp->num_transportid < MPATH_MX_TIDS); -+ paramp->trnptid_list[paramp->num_transportid++] = id; - } - } - - r = mpath_persistent_reserve_out(fd, rq_servact, rq_scope, rq_type, -- ¶mp, noisy, verbose); -+ paramp, noisy, verbose); - return mpath_reconstruct_sense(fd, r, sense); - } - #endif diff --git a/sheepdog-Consistently-set-bdrv_has_zero_.patch b/sheepdog-Consistently-set-bdrv_has_zero_.patch deleted file mode 100644 index f7904f0..0000000 --- a/sheepdog-Consistently-set-bdrv_has_zero_.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Eric Blake -Date: Tue, 24 Mar 2020 12:42:33 -0500 -Subject: sheepdog: Consistently set bdrv_has_zero_init_truncate -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: ed049910637be991c88cc25c864115bc5b1e4dab - -block_int.h claims that .bdrv_has_zero_init must return 0 if -.bdrv_has_zero_init_truncate does likewise; but this is violated if -only the former callback is provided if .bdrv_co_truncate also exists. -When adding the latter callback, it was mistakenly added to only one -of the three possible sheepdog instantiations. - -Fixes: 1dcaf527 -Signed-off-by: Eric Blake -Message-Id: <20200324174233.1622067-5-eblake@redhat.com> -Reviewed-by: John Snow -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/sheepdog.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/block/sheepdog.c b/block/sheepdog.c -index cfa84338a2d6b653ce243ae53c7a..522c16a936762ff00ee23a5e9ca3 100644 ---- a/block/sheepdog.c -+++ b/block/sheepdog.c -@@ -3269,6 +3269,7 @@ static BlockDriver bdrv_sheepdog_tcp = { - .bdrv_co_create = sd_co_create, - .bdrv_co_create_opts = sd_co_create_opts, - .bdrv_has_zero_init = bdrv_has_zero_init_1, -+ .bdrv_has_zero_init_truncate = bdrv_has_zero_init_1, - .bdrv_getlength = sd_getlength, - .bdrv_get_allocated_file_size = sd_get_allocated_file_size, - .bdrv_co_truncate = sd_co_truncate, -@@ -3307,6 +3308,7 @@ static BlockDriver bdrv_sheepdog_unix = { - .bdrv_co_create = sd_co_create, - .bdrv_co_create_opts = sd_co_create_opts, - .bdrv_has_zero_init = bdrv_has_zero_init_1, -+ .bdrv_has_zero_init_truncate = bdrv_has_zero_init_1, - .bdrv_getlength = sd_getlength, - .bdrv_get_allocated_file_size = sd_get_allocated_file_size, - .bdrv_co_truncate = sd_co_truncate, diff --git a/slirp-use-correct-size-while-emulating-I.patch b/slirp-use-correct-size-while-emulating-I.patch deleted file mode 100644 index 60c4533..0000000 --- a/slirp-use-correct-size-while-emulating-I.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Prasad J Pandit -Date: Thu, 9 Jan 2020 15:12:27 +0530 -Subject: slirp: use correct size while emulating IRC commands - -Git-commit: ce131029d6d4a405cb7d3ac6716d03e58fb4a5d9 -References: bsc#1163018, CVE-2020-8608 - -While emulating IRC DCC commands, tcp_emu() uses 'mbuf' size -'m->m_size' to write DCC commands via snprintf(3). This may -lead to OOB write access, because 'bptr' points somewhere in -the middle of 'mbuf' buffer, not at the start. Use M_FREEROOM(m) -size to avoid OOB access. - -Reported-by: Vishnu Dev TJ -Signed-off-by: Prasad J Pandit -Reviewed-by: Samuel Thibault -Message-Id: <20200109094228.79764-2-ppandit@redhat.com> -Signed-off-by: Bruce Rogers ---- - src/tcp_subr.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c -index d6dd133a9f7082dbc6fafdfa7e01..6cd181c9f2875528adab3f636aec 100644 ---- a/slirp/src/tcp_subr.c -+++ b/slirp/src/tcp_subr.c -@@ -778,7 +778,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, m->m_size, "DCC CHAT chat %lu %u%c\n", -+ m->m_len += snprintf(bptr, M_FREEROOM(m), -+ "DCC CHAT chat %lu %u%c\n", - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), 1); - } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, -@@ -788,8 +789,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += -- snprintf(bptr, m->m_size, "DCC SEND %s %lu %u %u%c\n", buff, -+ m->m_len += snprintf(bptr, M_FREEROOM(m), -+ "DCC SEND %s %lu %u %u%c\n", buff, - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); - } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, -@@ -799,8 +800,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += -- snprintf(bptr, m->m_size, "DCC MOVE %s %lu %u %u%c\n", buff, -+ m->m_len += snprintf(bptr, M_FREEROOM(m), -+ "DCC MOVE %s %lu %u %u%c\n", buff, - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); - } diff --git a/slirp-use-correct-size-while-emulating-c.patch b/slirp-use-correct-size-while-emulating-c.patch deleted file mode 100644 index d71385b..0000000 --- a/slirp-use-correct-size-while-emulating-c.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Prasad J Pandit -Date: Thu, 9 Jan 2020 15:12:28 +0530 -Subject: slirp: use correct size while emulating commands - -Git-commit: 82ebe9c370a0e2970fb5695aa19aa5214a6a1c80 -References: bsc#1161066, CVE2020-7039, bsc#1163018, CVE-2020-8608 - -While emulating services in tcp_emu(), it uses 'mbuf' size -'m->m_size' to write commands via snprintf(3). Use M_FREEROOM(m) -size to avoid possible OOB access. - -Signed-off-by: Prasad J Pandit -Signed-off-by: Samuel Thibault -Message-Id: <20200109094228.79764-3-ppandit@redhat.com> -Signed-off-by: Bruce Rogers ---- - src/tcp_subr.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c -index cedbfb28686604dbb7e8e5b35dd1..954d1a6f5e6292b585638a8c0558 100644 ---- a/slirp/src/tcp_subr.c -+++ b/slirp/src/tcp_subr.c -@@ -696,7 +696,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) - n4 = (laddr & 0xff); - - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, m->m_size - m->m_len, -+ m->m_len += snprintf(bptr, M_FREEROOM(m), - "ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4, - n5, n6, x == 7 ? buff : ""); - return 1; -@@ -731,8 +731,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) - n4 = (laddr & 0xff); - - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += -- snprintf(bptr, m->m_size - m->m_len, -+ m->m_len += snprintf(bptr, M_FREEROOM(m), - "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", - n1, n2, n3, n4, n5, n6, x == 7 ? buff : ""); - -@@ -758,8 +757,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) - if (m->m_data[m->m_len - 1] == '\0' && lport != 0 && - (so = tcp_listen(slirp, INADDR_ANY, 0, so->so_laddr.s_addr, - htons(lport), SS_FACCEPTONCE)) != NULL) -- m->m_len = -- snprintf(m->m_data, m->m_size, "%d", ntohs(so->so_fport)) + 1; -+ m->m_len = snprintf(m->m_data, M_ROOM(m), -+ "%d", ntohs(so->so_fport)) + 1; - return 1; - - case EMU_IRC: diff --git a/spapr-Fix-failure-path-for-attempting-to.patch b/spapr-Fix-failure-path-for-attempting-to.patch deleted file mode 100644 index 9eea839..0000000 --- a/spapr-Fix-failure-path-for-attempting-to.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: David Gibson -Date: Thu, 26 Mar 2020 16:12:40 +1100 -Subject: spapr: Fix failure path for attempting to hot unplug PCI bridges - -Git-commit: 7aab5899764887f6b0512cb2e5c11bdc2a5d3644 - -For various technical reasons we can't currently allow unplug a PCI to PCI -bridge on the pseries machine. spapr_pci_unplug_request() correctly -generates an error message if that's attempted. - -But.. if the given errp is not error_abort or error_fatal, it doesn't -actually stop trying to unplug the bridge anyway. - -Fixes: 14e714900f6b "spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges" -Signed-off-by: David Gibson -Reviewed-by: Greg Kurz -Signed-off-by: Bruce Rogers ---- - hw/ppc/spapr_pci.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c -index f6fbcf99edaaf9844fe669951716..5b544adb4a4d7868cf17d6534e19 100644 ---- a/hw/ppc/spapr_pci.c -+++ b/hw/ppc/spapr_pci.c -@@ -1663,6 +1663,7 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler, - - if (pc->is_bridge) { - error_setg(errp, "PCI: Hot unplug of PCI bridges not supported"); -+ return; - } - - /* ensure any other present functions are pending unplug */ diff --git a/supported.arm.txt b/supported.arm.txt index f8bb8ad..bc0ff96 100644 --- a/supported.arm.txt +++ b/supported.arm.txt @@ -1,6 +1,6 @@ [qemu-arm package document] -SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS +POST SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS Overview -------- @@ -202,9 +202,10 @@ Deprecated, Superseded, Modified and Dropped Features and could possibly change syntax in the future. - This previously unsupported command line option is now deprecated: - -bt + -tb-size - These previously unsupported command line options are no longer recognized: + -bt -device at24c-eeprom -device mmio_interface -device ssi-sd @@ -299,7 +300,9 @@ QEMU Command-Line and Monitor Syntax and Support -d ... -daemonize -debugcon ... - -device [VGA|rtl8139|virtio-net-pci|virtio-blk-pci|virtio-balloon-pci| + -device + + [VGA|rtl8139|virtio-net-pci|virtio-blk-pci|virtio-balloon-pci| virtio-9p-pci|usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse| usb-kbd|virtserialport|virtconsole|virtio-serial-pci|i82559er| virtio-scsi-pci|scsi-cd|scsi-hd|scsi-generic|scsi-disk|scsi-block| @@ -328,10 +331,14 @@ QEMU Command-Line and Monitor Syntax and Support virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p| virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| virtio-gpu|virtio-scsi|virtio-rng|e1000-82540em) + -dfilter range, ... -display ... - -drive ... (if specified if=[virtio] and format=[qcow2|raw] and + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and snapshot=off only) + -echr ... -enable-fips -enable-kvm @@ -357,8 +364,11 @@ QEMU Command-Line and Monitor Syntax and Support -monitor ... -msg ... -name ... - -net [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, and virtio are supported) + -netdev [bridge|tap|user] ... -nic ... -no-acpi @@ -634,12 +644,14 @@ QEMU Command-Line and Monitor Syntax and Support watchdog-set-action - The following command line options are unsupported: + -acpitable ... - -bt ... -chroot ... -cpu ... (all except host) -curses - -device [160s33b|320s33b|640s33b|a15mpcore_priv|a9mpcore_priv|a9-scu|adlib| + -device + + [160s33b|320s33b|640s33b|a15mpcore_priv|a9mpcore_priv|a9-scu|adlib| ads7846|allwinner-a10|allwinner-a10-pic|allwinner-A10-timer| allwinner-emac|amd-iommu|AMDVI-PCI|arm1026-arm-cpu|arm1136-arm-cpu| arm1136-r2-arm-cpu|arm1176-arm-cpu|arm11mpcore-arm-cpu| @@ -703,24 +715,35 @@ QEMU Command-Line and Monitor Syntax and Support strongarm-gpio|strongarm_pic|strongarm-ppc|strongarm-rtc| strongarm-ssp|strongarm-uart|tegra2-ehci-usb|ti925t-arm-cpu|tmp105| tosa_dac|tosa-ssp|tusb6010|twl92230|tz-msc|usb-redir|versatile_i2c| - versatilepb_sic|versatile_pci|versatile_pci_host| - vfio-pci-igd-lpc-bridge|vfio-pci-nohotplug|vfio-platform| - vhost-vsock-device|virtconsole|virtio-crypto-device|vmgenid| - vmware-svga|w25q256|w25q32|w25q32dw|w25q64|w25q80|w25q80bl|w25x10| - w25x16|w25x20|w25x32|w25x40|w25x64|w25x80|wm8750|*-x86_64-cpu| + versatilepb_sic|versatile_pci|versatile_pci_host|vfio-pci-nohotplug| + vfio-platform|vhost-vsock-device|virtconsole|virtio-crypto-device| + vmgenid|vmware-svga|w25q256|w25q32|w25q32dw|w25q64|w25q80|w25q80bl| + w25x10|w25x16|w25x20|w25x32|w25x40|w25x64|w25x80|wm8750|*-x86_64-cpu| xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|xgmac| - xilinxzynq_slcr|xlnx-versal|xlnx.ps7-qspi|xlnx.ps7-spi|xlnxps7-usb| - xlnxzynqmp|xlnxzynq-xadc|armsse-cpuid|armsse-mhu|cpu-cluster| - luminary-watchdog|microbit.i2c|nrf51_soc.gpio|nrf51_soc.nvm| - nrf51_soc.rng|nrf51_soc.timer|platform-ehci-usb|sse-200|vmware-svga| - vmxnet3|ati-vga|cirrus-vga|vhost-user-fs-device|tulip|ati-vga] + xilinxzynq_slcr|xlnx-versal|xlnx.ps7-qspi|xlnx.ps7-spi|xlnxzynqmp| + xlnxzynq-xadc|armsse-cpuid|armsse-mhu|cpu-cluster|luminary-watchdog| + microbit.i2c|nrf51_soc.gpio|nrf51_soc.nvm|nrf51_soc.rng| + nrf51_soc.timer|platform-ehci-usb|sse-200|vmware-svga|vmxnet3|ati-vga| + cirrus-vga|vhost-user-fs-device|tulip|ati-vga|aw-hc-ehci-usb| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|virtio-iommu-pci-transitional| + cortex-m7-arm-cpu|allwinner-cpucfg|allwinner-h3|allwinner-h3-ccu| + allwinner-h3-dramc|allwinner-h3-sysctrl|allwinner-rtc-sun4i| + allwinner-rtc-sun6i|allwinner-rtc-sun7i|allwinner-sdhost-sun4i| + allwinner-sdhost-sun5i|allwinner-sid|allwinner-sun8i-emac|imx.rngc| + imx.usbphy|serial|serial-io|stm32f405-soc|stm32f4xx-exti| + stm32f4xx-syscfg|tpm-tis-device] (the following are aliases of these unsupported devices: lsi| piix3-usb-uhci) (note that some of these device names represent supported devices and are used internally, but are not specifyable via -device even though they appear in the list of devices) - -drive ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or raw] + -dtb file -enable-hax -enable-sync-profile @@ -729,25 +752,33 @@ QEMU Command-Line and Monitor Syntax and Support -hda/-hdb/-hdc/-hdd ... -icount ... -L ... - -M [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie|connex| + -M + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie|connex| cubieboard|highbank|imx25-pdk|integratorcp|kzm|lm3s6965evb|lm3s811evb| mainstone|mcimx6ul-evk|mcimx7d-sabre|microbit|midway|mps2-an385|mps2-an505| - mps2-an511|mps2-an521|musca-a|musca-b1|musicpal|n800|n810|netduino2|nuri| - palmetto-bmc|raspi2|raspi3|realview-eb|realview-eb-mpcore|realview-pb-a8| - realview-pbx-a9|romulus-bmc|sabrelite|sbsa-ref|smdkc210|spitz|swift-bmc| - sx1|sx1-v1|terrier|tosa|verdex|versatileab|versatilepb|vexpress-a15| - vexpress-a9|virt-2.7|virt-2.8|virt-2.12|virt-3.0|virt-4.0|virt-4.1| - witherspoon-bmc|xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] - -machine [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie| + mps2-an511|mps2-an521|musca-a|musca-b1|musicpal|n800|n810|netduino2| + netduinoplus2|nuri|orangepi-pc|palmetto-bmc|raspi2|raspi3|realview-eb| + realview-eb-mpcore|realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite| + sbsa-ref|smdkc210|spitz|swift-bmc|sx1|sx1-v1|tacoma-bmc|terrier|tosa| + verdex|versatileab|versatilepb|vexpress-a15|vexpress-a9|virt-2.7|virt-2.8| + virt-2.12|virt-3.0|virt-4.0|virt-4.1|virt-5.0|witherspoon-bmc| + xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + + -machine + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie| connex|cubieboard|highbank|imx25-pdk|integratorcp|kzm|lm3s6965evb| lm3s811evb|mainstone|mcimx6ul-evk|mcimx7d-sabre|microbit|midway| mps2-an385|mps2-an521|mps2-an505|mps2-an511|musca-a|musca-b1| - musicpal|n800|n810|netduino2|nuri|palmetto-bmc|raspi2|raspi3| - realview-eb|realview-eb-mpcore|realview-pb-a8|realview-pbx-a9| - romulus-bmc|sabrelite|sbsa-ref|smdkc210|spitz|swift-bmc|sx1|sx1-v1| - terrier|tosa|verdex|versatileab|versatilepb|vexpress-a15|vexpress-a9| - virt-2.7|virt-2.8|virt-2.12|virt-3.0|virt-4.0|virt-4.1| - witherspoon-bmc|xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + musicpal|n800|n810|netduino2|netduinoplus2|nuri|orangepi-pc| + palmetto-bmc|raspi2|raspi3|realview-eb|realview-eb-mpcore| + realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite|sbsa-ref| + smdkc210|spitz|swift-bmc|sx1|sx1-v1|tacoma-bmc|terrier|tosa|verdex| + versatileab|versatilepb|vexpress-a15|vexpress-a9|virt-2.7|virt-2.8| + virt-2.12|virt-3.0|virt-4.0|virt-4.1|virt-5.0|witherspoon-bmc| + xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + -mtdblock file -net [dump|socket|vde] ... -netdev [dump|hubport|l2tpv3|socket|vde] ... diff --git a/supported.ppc.txt b/supported.ppc.txt index 47545d9..f05f69a 100644 --- a/supported.ppc.txt +++ b/supported.ppc.txt @@ -1,5 +1,5 @@ [qemu-ppc package document] -SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS +POST SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS QEMU/KVM on ppc is not supported. diff --git a/supported.s390.txt b/supported.s390.txt index d6940d7..5de8aba 100644 --- a/supported.s390.txt +++ b/supported.s390.txt @@ -1,6 +1,6 @@ [qemu-s390 package document] -SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS +POST SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS Overview -------- @@ -197,6 +197,7 @@ Deprecated, Superseded, Modified and Dropped Features -bt -device ide-drive (use ide-hd or ide-cd) -device scsi-disk (use scsi-hd or scsi-cd) + -tb-size - These previously unsupported command line options are no longer recognized: -device mmio_interface @@ -292,7 +293,9 @@ QEMU Command-Line and Monitor Syntax and Support -d ... -daemonize -debugcon ... - -device [virtio-net-pci|virtio-blk-pci|virtio-balloon-pci|virtserialport| + -device + + [virtio-net-pci|virtio-blk-pci|virtio-balloon-pci|virtserialport| virtconsole|virtio-serial-pci|virtio-scsi-pci|scsi-cd|scsi-hd| scsi-generic|scsi-disk|scsi-block|virtio-rng-pci|pci-bridge| megasas-gen2|e1000e|e1000|zpci|virtio-gpu-ccw|virtio-keyboard-ccw| @@ -319,10 +322,14 @@ QEMU Command-Line and Monitor Syntax and Support virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| virtio-gpu|virtio-9p|virtio-net|virtio-serial|virtio-balloon| virtio-scsi|virtio-rng) + -dfilter range, ... -display ... - -drive ... (if specified if=[virtio] and format=[qcow2|raw] and + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and snapshot=off only) + -echr ... -enable-fips -enable-kvm @@ -340,18 +347,27 @@ QEMU Command-Line and Monitor Syntax and Support -kernel ... -loadvm ... -m ... - -M [help|?|none|s390-ccw-virtio|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| + -M + + [help|?|none|s390-ccw-virtio|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| s390-ccw-virtio-2.11|s390-ccw-virtio-3.1|s390-ccw-virtio-4.2] - -machine [help|?|none|s390-ccw-virtio|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| + + -machine + + [help|?|none|s390-ccw-virtio|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| s390-ccw-virtio-2.11|s390-ccw-virtio-3.1|s390-ccw-virtio-4.2] + -mem-path ... -mem-prealloc -mon ... -monitor ... -msg ... -name ... - -net [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, and virtio are supported) + -netdev [bridge|tap|user] ... -nic ... -nodefaults @@ -618,12 +634,14 @@ QEMU Command-Line and Monitor Syntax and Support watchdog-set-action - The following command line options are unsupported: + -acpitable ... - -bt ... -chroot ... -cpu ... (all except host) -curses - -device [AC97|adlib|am53c974|amd-iommu|AMDVI-PCI|ccid-card-emulated| + -device + + [AC97|adlib|am53c974|amd-iommu|AMDVI-PCI|ccid-card-emulated| ccid-card-passthrough|cirrus-vga|cs4231a|dc390|diag288|e1000-82544gc| e1000-82545em|edu|ES1370|floppy|generic-sdhci|gus|hda-duplex| hda-micro|hda-output|hyperv-testdev|*-i386-cpu|i8042|i82550|i82551| @@ -642,40 +660,45 @@ QEMU Command-Line and Monitor Syntax and Support s390-sclp-event-facility|s390-skeys-qemu|sb16|sclp|sclpconsole| sclp-cpu-hotplug|sclplmconsole|sclp-memory-hotplug-dev|sclpquiesce| sd-card|sdhci-pci|secondary-vga|sga|smbus-eeprom|tpci200|usb-audio| - usb-bot|usb-bt-dongle|usb-ccid|usb-mtp|usb-uas|vfio-ap| - vfio-pci-nohotplug|virtio-9p-device|virtual-css-bridge|vmcoreinfo| - vmgenid|vmware-svga|vmxnet3|vt82c686b-usb-uhci|x3130-upstream| - *-x86_64-cpu|xen-backend|xen-pci-passthrough|xen-platform| - xen-pvdevice|xio3130-downstream|z10BC.2-base-s390x-cpu| - z10BC.2-s390x-cpu|z10BC-base-s390x-cpu|z10BC-s390x-cpu| - z10EC.2-base-s390x-cpu|z10EC.2-s390x-cpu|z10EC.3-base-s390x-cpu| - z10EC.3-s390x-cpu|z10EC-base-s390x-cpu|z10EC-s390x-cpu| - z114-base-s390x-cpu|z114-s390x-cpu|z13.2-base-s390x-cpu| - z13.2-s390x-cpu|z13-base-s390x-cpu|z13-s390x-cpu|z13s-base-s390x-cpu| - z13s-s390x-cpu|z196.2-base-s390x-cpu|z196.2-s390x-cpu| - z196-base-s390x-cpu|z196-s390x-cpu|z800-base-s390x-cpu|z800-s390x-cpu| - z890.2-base-s390x-cpu|z890.2-s390x-cpu|z890.3-base-s390x-cpu| - z890.3-s390x-cpu|z890-base-s390x-cpu|z890-s390x-cpu| - z900.2-base-s390x-cpu|z900.2-s390x-cpu|z900.3-base-s390x-cpu| - z900.3-s390x-cpu|z900-base-s390x-cpu|z900-s390x-cpu| - z990.2-base-s390x-cpu|z990.2-s390x-cpu|z990.3-base-s390x-cpu| - z990.3-s390x-cpu|z990.4-base-s390x-cpu|z990.4-s390x-cpu| - z990.5-base-s390x-cpu|z990.5-s390x-cpu|z990-base-s390x-cpu| - z990-s390x-cpu|z9BC.2-base-s390x-cpu|z9BC.2-s390x-cpu| - z9BC-base-s390x-cpu|z9BC-s390x-cpu|z9EC.2-base-s390x-cpu| - z9EC.2-s390x-cpu|z9EC.3-base-s390x-cpu|z9EC.3-s390x-cpu| - z9EC-base-s390x-cpu|z9EC-s390x-cpu|z14ZR1-base-s390x-cpu| - z14ZR1-s390x-cpu|zBC12-base-s390x-cpu|zBC12-s390x-cpu| - zEC12.2-base-s390x-cpu|zEC12.2-s390x-cpu|zEC12-base-s390x-cpu| - zEC12-s390x-cpu|cpu-cluster|z14.2-base-s390x-cpu|z14.2-s390x-cpu| - vhost-user-fs-device] + usb-bot|usb-ccid|usb-mtp|usb-uas|vfio-ap|vfio-pci-nohotplug| + virtio-9p-device|virtual-css-bridge|vmcoreinfo|vmgenid|vmware-svga| + vmxnet3|vt82c686b-usb-uhci|x3130-upstream|*-x86_64-cpu|xen-backend| + xen-pci-passthrough|xen-platform|xen-pvdevice|xio3130-downstream| + z10BC.2-base-s390x-cpu|z10BC.2-s390x-cpu|z10BC-base-s390x-cpu| + z10BC-s390x-cpu|z10EC.2-base-s390x-cpu|z10EC.2-s390x-cpu| + z10EC.3-base-s390x-cpu|z10EC.3-s390x-cpu|z10EC-base-s390x-cpu| + z10EC-s390x-cpu|z114-base-s390x-cpu|z114-s390x-cpu| + z13.2-base-s390x-cpu|z13.2-s390x-cpu|z13-base-s390x-cpu|z13-s390x-cpu| + z13s-base-s390x-cpu|z13s-s390x-cpu|z196.2-base-s390x-cpu| + z196.2-s390x-cpu|z196-base-s390x-cpu|z196-s390x-cpu| + z800-base-s390x-cpu|z800-s390x-cpu|z890.2-base-s390x-cpu| + z890.2-s390x-cpu|z890.3-base-s390x-cpu|z890.3-s390x-cpu| + z890-base-s390x-cpu|z890-s390x-cpu|z900.2-base-s390x-cpu| + z900.2-s390x-cpu|z900.3-base-s390x-cpu|z900.3-s390x-cpu| + z900-base-s390x-cpu|z900-s390x-cpu|z990.2-base-s390x-cpu| + z990.2-s390x-cpu|z990.3-base-s390x-cpu|z990.3-s390x-cpu| + z990.4-base-s390x-cpu|z990.4-s390x-cpu|z990.5-base-s390x-cpu| + z990.5-s390x-cpu|z990-base-s390x-cpu|z990-s390x-cpu| + z9BC.2-base-s390x-cpu|z9BC.2-s390x-cpu|z9BC-base-s390x-cpu| + z9BC-s390x-cpu|z9EC.2-base-s390x-cpu|z9EC.2-s390x-cpu| + z9EC.3-base-s390x-cpu|z9EC.3-s390x-cpu|z9EC-base-s390x-cpu| + z9EC-s390x-cpu|z14ZR1-base-s390x-cpu|z14ZR1-s390x-cpu| + zBC12-base-s390x-cpu|zBC12-s390x-cpu|zEC12.2-base-s390x-cpu| + zEC12.2-s390x-cpu|zEC12-base-s390x-cpu|zEC12-s390x-cpu|cpu-cluster| + z14.2-base-s390x-cpu|z14.2-s390x-cpu|vhost-user-fs-device| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|virtio-iommu-pci-transitional] (the following are aliases of these unsupported devices: lsi| ahci|e1000-82540em|vfio-ccw) (note that some of these device names represent supported devices and are used internally, but are not specifyable via -device even though they appear in the list of devices) - -drive ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or raw] + -dtb file -enable-hax -enable-sync-profile @@ -684,12 +707,20 @@ QEMU Command-Line and Monitor Syntax and Support -hda/-hdb/-hdc/-hdd ... -icount ... -L ... - -M [s390-ccw-virtio-2.4|s390-ccw-virtio-2.5|s390-ccw-virtio-2.7| + -M + + [s390-ccw-virtio-2.4|s390-ccw-virtio-2.5|s390-ccw-virtio-2.7| s390-ccw-virtio-2.8|s390-ccw-virtio-2.10|s390-ccw-virtio-2.12| - s390-ccw-virtio-3.0|s390-ccw-virtio-4.0|s390-ccw-virtio-4.1] - -machine [s390-ccw-virtio-2.4|s390-ccw-virtio-2.5|s390-ccw-virtio-2.7| + s390-ccw-virtio-3.0|s390-ccw-virtio-4.0|s390-ccw-virtio-4.1| + s390-ccw-virtio-5.0] + + -machine + + [s390-ccw-virtio-2.4|s390-ccw-virtio-2.5|s390-ccw-virtio-2.7| s390-ccw-virtio-2.8|s390-ccw-virtio-2.10|s390-ccw-virtio-2.12| - s390-ccw-virtio-3.0|s390-ccw-virtio-4.0|s390-ccw-virtio-4.1] + s390-ccw-virtio-3.0|s390-ccw-virtio-4.0|s390-ccw-virtio-4.1| + s390-ccw-virtio-5.0] + -mtdblock file -net [dump|socket|vde] ... -netdev [dump|hubport|l2tpv3|socket|vde] ... diff --git a/supported.x86.txt b/supported.x86.txt index 9f0052e..b43c364 100644 --- a/supported.x86.txt +++ b/supported.x86.txt @@ -1,6 +1,6 @@ [qemu-x86 package document] -SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS +POST SLES 15 SP2 QEMU/KVM RELATED SUPPORT STATEMENTS Overview -------- @@ -205,9 +205,6 @@ Deprecated, Superseded, Modified and Dropped Features threads) the derived guest ABI is not guaranteed to be equivalent in future versions. -- The previously supported machine types pc-0.12, pc-0.14 and pc-0.15 are now - deprecated. - - These previously supported command line options are now considered deprecated: -device ide-drive (use ide-hd or ide-cd instead) -device scsi-disk (use scsi-hd or scsi-cd instead) @@ -218,6 +215,9 @@ Deprecated, Superseded, Modified and Dropped Features - These previously supported command line options are no longer supported: +- The previously supported machine types pc-0.12, pc-0.14 and pc-0.15 are no + longer recognized. Switch to a newer machine type. + - These previously supported command line options are no longer recognized: -balloon (use -device virtio-balloon instead) -clock @@ -240,17 +240,15 @@ Deprecated, Superseded, Modified and Dropped Features and could possibly change syntax in the future. - These previously unsupported command line options are now deprecated: - -bt -no-kvm-pit + -tb-size -- The previously unsupported machine types pc-0.13 and pc-0.14 are now - deprecated. - - The case of specified sockets, cores, and threads not matching the vcpu count is no longer silently ignored. QEMU now requires that the topology match the vcpu count. - These previously unsupported command line options are no longer recognized: + -bt -device at24c-eeprom -device ccid-card-passthru -device cfi.pflash01 @@ -287,8 +285,11 @@ Deprecated, Superseded, Modified and Dropped Features -tdf (note: mistakenly listed previously as supported) -xen-create -- The previously unsupported machine types pc-0.10 and pc-0.11 are no longer - recognized. +- The previously unsupported machine types pc-1.0, pc-1.1, pc-1.2 and pc-1.3 are + now deprecated. + +- The previously unsupported machine types pc-0.10, pc-0.13, pc-0.14 and + pc-0.11 are no longer recognized. - These previously supported QMP commands are now deprecated: change (use blockdev-change-medium or change-vnc-password instead) @@ -390,7 +391,9 @@ QEMU Command-Line and Monitor Syntax and Support -d ... -daemonize -debugcon ... - -device [isa-serial|isa-parallel|isa-fdc|ide-drive|ide-hd|ide-cd|VGA| + -device + + [isa-serial|isa-parallel|isa-fdc|ide-drive|ide-hd|ide-cd|VGA| cirrus-vga|rtl8139|usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse| usb-kbd|virtserialport|virtconsole|sga|i82559er|scsi-cd|scsi-hd| scsi-generic|scsi-disk|scsi-block|pci-serial|pci-serial-2x| @@ -427,10 +430,14 @@ QEMU Command-Line and Monitor Syntax and Support e1000|virtio-blk|virtio-net|virtio-serial|virtio-balloon|virtio-9p| virtio-scsi|virtio-rng|virtio-input-host|virtio-keyboard|virtio-mouse| virtio-tablet|virtio-gpu) + -dfilter range, ... -display ... - -drive ... (if specified if=[floppy|ide|virtio] and format=[qcow2|raw] and + -drive + + ... (if specified if=[floppy|ide|virtio] and format=[qcow2|raw] and snapshot=off only) + -echr ... -enable-fips -enable-kvm @@ -450,22 +457,30 @@ QEMU Command-Line and Monitor Syntax and Support -kernel ... -loadvm ... -m ... - -M [help|?|none|pc|pc-0.12|pc-0.14|pc-0.15|pc-i440fx-1.4|pc-i440fx-1.7| - pc-i440fx-2.0|pc-i440fx-2.3|pc-i440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11| - pc-i440fx-3.1|pc-i440fx-4.2|q35|pc-q35-2.6|pc-q35-2.9|pc-q35-2.11| - pc-q35-3.1|pc-q35-4.2|xenfv|xenpv] - -machine [help|?|none|pc|pc-0.12|pc-0.14|pc-0.15|pc-i440fx-1.4|pc-i440fx-1.7| - pc-i440fx-2.0|pc-i440fx-2.3|pc-440fx-2.6|pc-i440fx-2.9| - pc-i440fx-2.11|pc-i440fx-3.1|pc-i440fx-4.2|q35|pc-q35-2.6|pc-q35-2.9| - pc-q35-2.11|pc-q35-3.1|pc-q35-4.2|xenfv|xenpv] + -M + + [help|?|none|pc|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0|pc-i440fx-2.3| + pc-i440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11|pc-i440fx-3.1|pc-i440fx-4.2|q35| + pc-q35-2.6|pc-q35-2.9|pc-q35-2.11|pc-q35-3.1|pc-q35-4.2|xenfv|xenfv-4.2] + + -machine + + [help|?|none|pc|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0| + pc-i440fx-2.3|pc-440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11| + pc-i440fx-3.1|pc-i440fx-4.2|q35|pc-q35-2.6|pc-q35-2.9|pc-q35-2.11| + pc-q35-3.1|pc-q35-4.2|xenfv|xenifv-4.2] + -mem-path ... -mem-prealloc -mon ... -monitor ... -msg ... -name ... - -net [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, and virtio are supported) + -netdev [bridge|tap|user] ... -nic ... -no-acpi @@ -754,20 +769,22 @@ QEMU Command-Line and Monitor Syntax and Support xen-set-global-dirty-log - The following command line options are unsupported: + -acpitable ... - -bt ... -chroot ... -cpu host -curses - -device [ipoctal232|i82562|nec-usb-xhci|hda-duplex|hda-output|usb-bot| + -device + + [ipoctal232|i82562|nec-usb-xhci|hda-duplex|hda-output|usb-bot| lsi53c810a|isa-debug-exit|ne2k_pci|usb-uas|ioh3420|isa-ide|usb-ccid| pcnet|ich9-intel-hda|dc390|hda-micro|x3130-upstream|isa-cirrus-vga| pc-testdev|ne2k_isa|isa-vga|cs4231a|gus|vmware-svga|i82801b11-bridge| i82557a|i82557c|i82557b|i82801|AC97|am53c974|intel-hda|i82558a| i82558b|usb-audio|i82550|isa-debugcon|sb16|megasas|i82551| xio3130-downstream|vt82c686b-usb-uhci|tpci200|i82559a|i82559b|i82559c| - isa-applesmc|usb-bt-dongle|adlib|ES1370|lsi53c810|nvme|pci-testdev| - pvscsi|virtio-9p-device|virtio-balloon-device|virtio-blk-device| + isa-applesmc|adlib|ES1370|lsi53c810|nvme|pci-testdev|pvscsi| + virtio-9p-device|virtio-balloon-device|virtio-blk-device| virtio-net-device|virtio-rng-device|virtio-scsi-device| virtio-serial-device|vmxnet3|xen-pci-passthrough|xen-platform| xen-pvdevice|piix3-ide|piix3-ide-xen|piix3-ide|i8042|sdhci-pci| @@ -783,33 +800,46 @@ QEMU Command-Line and Monitor Syntax and Support mioe3680_pci|pcm3680_pci|hyperv-synic|vfio-pci-nohotplug| vfio-platform|xen-bridge|xen-cdrom|xen-disk|ati-vga|cpu-cluster| intel-iommu|vhost-user-fs-device|tulip|ati-vga|i2c-ddc|pci-ipmi-bt| - pci-ipmi-kcs] + pci-ipmi-kcs|serial|serial-io|serial-mm|virtio-iommu-device| + virtio-iommu-pci|virtio-iommu-pci-nontransitional| + virtio-iommu-pci-transitional|xen-sysdev|imx.usbphy] (the following are aliases of these unsupported devices: lsi) (note that some of these device names represent supported devices and are used internally, but are not specifyable via -device even though they appear in the list of devices) - -drive ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or raw] + -dtb file -enable-hax -enable-sync-profile -g ... -icount ... -L ... - -M [isapc|microvm|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5| - pc-i440fx-1.6|pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5| - pc-i440fx-2.7|pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0| - pc-i440fx-4.0|pc-i440fx-4.1|pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7| + -M + + [isapc|microvm|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5|pc-i440fx-1.6| + pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7| + pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0| + pc-i440fx-4.1|pc-i440fx-5.0|pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7| pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3|pc-q35-2.4|pc-q35-2.5| pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12|pc-q35-3.0|pc-q35-4.0| - pc-q35-4.1] - -machine [isapc|microvm|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5| + pc-q35-4.1|pc-q35-5.0] + + -machine + + [isapc|microvm|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5| pc-i440fx-1.6|pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4| pc-i440fx-2.5|pc-i440fx-2.7|pc-i440fx-2.8|pc-i440fx-2.10| - pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0|pc-i440fx-4.1|pc-q35-1.4| - pc-q35-1.5|pc-q35-1.6|pc-q35-1.7|pc-q35-2.0|pc-q35-2.1|pc-q35-2.2| - pc-q35-2.3|pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|pc-q35-2.10| - pc-q35-2.12|pc-q35-3.0|pc-q35-4.0|pc-q35-4.1] + pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0|pc-i440fx-4.1| + pc-i440fx-5.0|pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7| + pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3|pc-q35-2.4|pc-q35-2.5| + pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12|pc-q35-3.0| + pc-q35-4.0|pc-q35-4.1|pc-q35-5.0] + -mtdblock file -net [dump|socket|vde] ... -netdev [dump|hubport|l2tpv3|socket|vde] ... diff --git a/target-arm-Correct-definition-of-PMCRDP.patch b/target-arm-Correct-definition-of-PMCRDP.patch deleted file mode 100644 index cbabf06..0000000 --- a/target-arm-Correct-definition-of-PMCRDP.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Peter Maydell -Date: Fri, 14 Feb 2020 17:51:11 +0000 -Subject: target/arm: Correct definition of PMCRDP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: a1ed04dd79aabb9dbeeb5fa7d49f1a3de0357553 - -The PMCR_EL0.DP bit is bit 5, which is 0x20, not 0x10. 0x10 is 'X'. -Correct our #define of PMCRDP and add the missing PMCRX. - -We do have the correct behaviour for handling the DP bit being -set, so this fixes a guest-visible bug. - -Fixes: 033614c47de -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: Richard Henderson -Signed-off-by: Peter Maydell -Message-id: 20200214175116.9164-17-peter.maydell@linaro.org -Signed-off-by: Bruce Rogers ---- - target/arm/helper.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/target/arm/helper.c b/target/arm/helper.c -index 0bf8f53d4b8d80ba1edb69c2c759..886ffaba82d36da9acc36f1596f5 100644 ---- a/target/arm/helper.c -+++ b/target/arm/helper.c -@@ -1016,7 +1016,8 @@ static const ARMCPRegInfo v6_cp_reginfo[] = { - #define PMCRN_MASK 0xf800 - #define PMCRN_SHIFT 11 - #define PMCRLC 0x40 --#define PMCRDP 0x10 -+#define PMCRDP 0x20 -+#define PMCRX 0x10 - #define PMCRD 0x8 - #define PMCRC 0x4 - #define PMCRP 0x2 diff --git a/target-arm-Fix-PAuth-sbox-functions.patch b/target-arm-Fix-PAuth-sbox-functions.patch deleted file mode 100644 index 8f8542f..0000000 --- a/target-arm-Fix-PAuth-sbox-functions.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Vincent Dehors -Date: Thu, 23 Jan 2020 15:22:38 +0000 -Subject: target/arm: Fix PAuth sbox functions - -Git-commit: de0b1bae6461f67243282555475f88b2384a1eb9 -References: bsc#1168681, CVE-2020-10702 - -In the PAC computation, sbox was applied over wrong bits. -As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16. - -Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was -used to verify one computation of the pauth_computepac() function which -uses sbox2. - -Launchpad: https://bugs.launchpad.net/bugs/1859713 -Reviewed-by: Richard Henderson -Signed-off-by: Vincent DEHORS -Signed-off-by: Adrien GRASSEIN -Message-id: 20200116230809.19078-2-richard.henderson@linaro.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/pauth_helper.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c -index d3194f20437b717ec1cc13a1003e..0a5f41e10c5f03d85a727b2b7c42 100644 ---- a/target/arm/pauth_helper.c -+++ b/target/arm/pauth_helper.c -@@ -89,7 +89,7 @@ static uint64_t pac_sub(uint64_t i) - uint64_t o = 0; - int b; - -- for (b = 0; b < 64; b += 16) { -+ for (b = 0; b < 64; b += 4) { - o |= (uint64_t)sub[(i >> b) & 0xf] << b; - } - return o; -@@ -104,7 +104,7 @@ static uint64_t pac_inv_sub(uint64_t i) - uint64_t o = 0; - int b; - -- for (b = 0; b < 64; b += 16) { -+ for (b = 0; b < 64; b += 4) { - o |= (uint64_t)inv_sub[(i >> b) & 0xf] << b; - } - return o; diff --git a/target-arm-Return-correct-IL-bit-in-merg.patch b/target-arm-Return-correct-IL-bit-in-merg.patch deleted file mode 100644 index 49a15a2..0000000 --- a/target-arm-Return-correct-IL-bit-in-merg.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Jeff Kubascik -Date: Fri, 17 Jan 2020 14:09:31 +0000 -Subject: target/arm: Return correct IL bit in merge_syn_data_abort - -Git-commit: 30d544839e278dc76017b9a42990c41e84a34377 - -The IL bit is set for 32-bit instructions, thus passing false -with the is_16bit parameter to syn_data_abort_with_iss() makes -a syn mask that always has the IL bit set. - -Pass is_16bit as true to make the initial syn mask have IL=0, -so that the final IL value comes from or'ing template_syn. - -Cc: qemu-stable@nongnu.org -Fixes: aaa1f954d4ca ("target-arm: A64: Create Instruction Syndromes for Data Aborts") -Signed-off-by: Jeff Kubascik -Signed-off-by: Richard Henderson -Message-id: 20200117004618.2742-2-richard.henderson@linaro.org -[rth: Extracted this as a self-contained bug fix from a larger patch] -Signed-off-by: Richard Henderson -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/tlb_helper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/arm/tlb_helper.c b/target/arm/tlb_helper.c -index 5feb3129417a5c55bdbe6b77b540..e63f8bda29636d8b23eead31004a 100644 ---- a/target/arm/tlb_helper.c -+++ b/target/arm/tlb_helper.c -@@ -44,7 +44,7 @@ static inline uint32_t merge_syn_data_abort(uint32_t template_syn, - syn = syn_data_abort_with_iss(same_el, - 0, 0, 0, 0, 0, - ea, 0, s1ptw, is_write, fsc, -- false); -+ true); - /* Merge the runtime syndrome with the template syndrome. */ - syn |= template_syn; - } diff --git a/target-arm-Set-ISSIs16Bit-in-make_issinf.patch b/target-arm-Set-ISSIs16Bit-in-make_issinf.patch deleted file mode 100644 index c3b4e91..0000000 --- a/target-arm-Set-ISSIs16Bit-in-make_issinf.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Richard Henderson -Date: Fri, 17 Jan 2020 14:09:31 +0000 -Subject: target/arm: Set ISSIs16Bit in make_issinfo - -Git-commit: 1a1fbc6cbb34c26d43d8360c66c1d21681af14a9 - -During the conversion to decodetree, the setting of -ISSIs16Bit got lost. This causes the guest os to -incorrectly adjust trapping memory operations. - -Cc: qemu-stable@nongnu.org -Fixes: 46beb58efbb8a2a32 ("target/arm: Convert T16, load (literal)") -Reported-by: Jeff Kubascik -Signed-off-by: Richard Henderson -Message-id: 20200117004618.2742-3-richard.henderson@linaro.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/translate.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/target/arm/translate.c b/target/arm/translate.c -index 4d5d4bd8886c138196cec746f0e7..24e3d6619b202c78835dc068a2ce 100644 ---- a/target/arm/translate.c -+++ b/target/arm/translate.c -@@ -8552,6 +8552,9 @@ static ISSInfo make_issinfo(DisasContext *s, int rd, bool p, bool w) - /* ISS not valid if writeback */ - if (p && !w) { - ret = rd; -+ if (s->base.pc_next - s->pc_curr == 2) { -+ ret |= ISSIs16Bit; -+ } - } else { - ret = ISSInvalid; - } diff --git a/target-arm-fix-TCG-leak-for-fcvt-half-do.patch b/target-arm-fix-TCG-leak-for-fcvt-half-do.patch deleted file mode 100644 index a88edc0..0000000 --- a/target-arm-fix-TCG-leak-for-fcvt-half-do.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: =?UTF-8?q?Alex=20Benn=C3=A9e?= -Date: Fri, 31 Jan 2020 15:34:39 +0000 -Subject: target/arm: fix TCG leak for fcvt half->double -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: aeab8e5eb220cc5ff84b0b68b9afccc611bf0fcd - -When support for the AHP flag was added we inexplicably only freed the -new temps in one of the two legs. Move those tcg_temp_free to the same -level as the allocation to fix that leak. - -Fixes: 486624fcd3eac -Signed-off-by: Alex Bennée -Message-id: 20200131153439.26027-1-alex.bennee@linaro.org -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/translate-a64.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c -index d4bebbe62958ed2264e8db880bac..045da9266717203d85258110ed10 100644 ---- a/target/arm/translate-a64.c -+++ b/target/arm/translate-a64.c -@@ -5778,8 +5778,6 @@ static void handle_fp_fcvt(DisasContext *s, int opcode, - TCGv_i32 tcg_rd = tcg_temp_new_i32(); - gen_helper_vfp_fcvt_f16_to_f32(tcg_rd, tcg_rn, tcg_fpst, tcg_ahp); - write_fp_sreg(s, rd, tcg_rd); -- tcg_temp_free_ptr(tcg_fpst); -- tcg_temp_free_i32(tcg_ahp); - tcg_temp_free_i32(tcg_rd); - } else { - /* Half to double */ -@@ -5789,6 +5787,8 @@ static void handle_fp_fcvt(DisasContext *s, int opcode, - tcg_temp_free_i64(tcg_rd); - } - tcg_temp_free_i32(tcg_rn); -+ tcg_temp_free_ptr(tcg_fpst); -+ tcg_temp_free_i32(tcg_ahp); - break; - } - default: diff --git a/target-arm-monitor-query-cpu-model-expan.patch b/target-arm-monitor-query-cpu-model-expan.patch deleted file mode 100644 index b2db4b5..0000000 --- a/target-arm-monitor-query-cpu-model-expan.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Liang Yan -Date: Fri, 7 Feb 2020 14:04:21 +0000 -Subject: target/arm/monitor: query-cpu-model-expansion crashed qemu when using - machine type none - -Git-commit: 0999a4ba8718aa96105b978d3567fc7e90244c7e -References: bsc#1159443 - -Commit e19afd566781 mentioned that target-arm only supports queryable -cpu models 'max', 'host', and the current type when KVM is in use. -The logic works well until using machine type none. - -For machine type none, cpu_type will be null if cpu option is not -set by command line, strlen(cpu_type) will terminate process. -So We add a check above it. - -This won't affect i386 and s390x since they do not use current_cpu. - -Signed-off-by: Liang Yan -Message-id: 20200203134251.12986-1-lyan@suse.com -Reviewed-by: Andrew Jones -Tested-by: Andrew Jones -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/monitor.c | 15 +++++++++------ - 1 file changed, 9 insertions(+), 6 deletions(-) - -diff --git a/target/arm/monitor.c b/target/arm/monitor.c -index fa054f8a369c8221c8746b8d8046..782085ca2120b243584f7c058ef8 100644 ---- a/target/arm/monitor.c -+++ b/target/arm/monitor.c -@@ -136,17 +136,20 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, - } - - if (kvm_enabled()) { -- const char *cpu_type = current_machine->cpu_type; -- int len = strlen(cpu_type) - strlen(ARM_CPU_TYPE_SUFFIX); - bool supported = false; - - if (!strcmp(model->name, "host") || !strcmp(model->name, "max")) { - /* These are kvmarm's recommended cpu types */ - supported = true; -- } else if (strlen(model->name) == len && -- !strncmp(model->name, cpu_type, len)) { -- /* KVM is enabled and we're using this type, so it works. */ -- supported = true; -+ } else if (current_machine->cpu_type) { -+ const char *cpu_type = current_machine->cpu_type; -+ int len = strlen(cpu_type) - strlen(ARM_CPU_TYPE_SUFFIX); -+ -+ if (strlen(model->name) == len && -+ !strncmp(model->name, cpu_type, len)) { -+ /* KVM is enabled and we're using this type, so it works. */ -+ supported = true; -+ } - } - if (!supported) { - error_setg(errp, "We cannot guarantee the CPU type '%s' works " diff --git a/target-i386-Add-missed-features-to-Coope.patch b/target-i386-Add-missed-features-to-Coope.patch deleted file mode 100644 index e9a3f4a..0000000 --- a/target-i386-Add-missed-features-to-Coope.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: Xiaoyao Li -Date: Wed, 8 Jan 2020 13:32:40 +0100 -Subject: target/i386: Add missed features to Cooperlake CPU model - -Git-commit: 2dea9d9ca4ea7e9afe83d0b4153b21a16987e866 -References: jsc#SLE-7923 - -It lacks VMX features and two security feature bits (disclosed recently) in -MSR_IA32_ARCH_CAPABILITIES in current Cooperlake CPU model, so add them. - -Fixes: 22a866b6166d ("i386: Add new CPU model Cooperlake") -Signed-off-by: Xiaoyao Li -Message-Id: <20191225063018.20038-3-xiaoyao.li@intel.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 50 insertions(+), 1 deletion(-) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 8a1993ac64bd763b7bb70c98b8b8..876bd166652365397514ada0dec7 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -3201,7 +3201,8 @@ static X86CPUDefinition builtin_x86_defs[] = { - CPUID_7_0_EDX_SPEC_CTRL_SSBD | CPUID_7_0_EDX_ARCH_CAPABILITIES, - .features[FEAT_ARCH_CAPABILITIES] = - MSR_ARCH_CAP_RDCL_NO | MSR_ARCH_CAP_IBRS_ALL | -- MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY | MSR_ARCH_CAP_MDS_NO, -+ MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY | MSR_ARCH_CAP_MDS_NO | -+ MSR_ARCH_CAP_PSCHANGE_MC_NO | MSR_ARCH_CAP_TAA_NO, - .features[FEAT_7_1_EAX] = - CPUID_7_1_EAX_AVX512_BF16, - /* -@@ -3216,6 +3217,54 @@ static X86CPUDefinition builtin_x86_defs[] = { - CPUID_XSAVE_XGETBV1, - .features[FEAT_6_EAX] = - CPUID_6_EAX_ARAT, -+ /* Missing: Mode-based execute control (XS/XU), processor tracing, TSC scaling */ -+ .features[FEAT_VMX_BASIC] = MSR_VMX_BASIC_INS_OUTS | -+ MSR_VMX_BASIC_TRUE_CTLS, -+ .features[FEAT_VMX_ENTRY_CTLS] = VMX_VM_ENTRY_IA32E_MODE | -+ VMX_VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL | VMX_VM_ENTRY_LOAD_IA32_PAT | -+ VMX_VM_ENTRY_LOAD_DEBUG_CONTROLS | VMX_VM_ENTRY_LOAD_IA32_EFER, -+ .features[FEAT_VMX_EPT_VPID_CAPS] = MSR_VMX_EPT_EXECONLY | -+ MSR_VMX_EPT_PAGE_WALK_LENGTH_4 | MSR_VMX_EPT_WB | MSR_VMX_EPT_2MB | -+ MSR_VMX_EPT_1GB | MSR_VMX_EPT_INVEPT | -+ MSR_VMX_EPT_INVEPT_SINGLE_CONTEXT | MSR_VMX_EPT_INVEPT_ALL_CONTEXT | -+ MSR_VMX_EPT_INVVPID | MSR_VMX_EPT_INVVPID_SINGLE_ADDR | -+ MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT | MSR_VMX_EPT_INVVPID_ALL_CONTEXT | -+ MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS | MSR_VMX_EPT_AD_BITS, -+ .features[FEAT_VMX_EXIT_CTLS] = -+ VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_DEBUG_CONTROLS | -+ VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL | -+ VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_LOAD_IA32_EFER | -+ VMX_VM_EXIT_SAVE_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER | -+ VMX_VM_EXIT_SAVE_VMX_PREEMPTION_TIMER, -+ .features[FEAT_VMX_MISC] = MSR_VMX_MISC_ACTIVITY_HLT | -+ MSR_VMX_MISC_STORE_LMA | MSR_VMX_MISC_VMWRITE_VMEXIT, -+ .features[FEAT_VMX_PINBASED_CTLS] = VMX_PIN_BASED_EXT_INTR_MASK | -+ VMX_PIN_BASED_NMI_EXITING | VMX_PIN_BASED_VIRTUAL_NMIS | -+ VMX_PIN_BASED_VMX_PREEMPTION_TIMER | VMX_PIN_BASED_POSTED_INTR, -+ .features[FEAT_VMX_PROCBASED_CTLS] = VMX_CPU_BASED_VIRTUAL_INTR_PENDING | -+ VMX_CPU_BASED_USE_TSC_OFFSETING | VMX_CPU_BASED_HLT_EXITING | -+ VMX_CPU_BASED_INVLPG_EXITING | VMX_CPU_BASED_MWAIT_EXITING | -+ VMX_CPU_BASED_RDPMC_EXITING | VMX_CPU_BASED_RDTSC_EXITING | -+ VMX_CPU_BASED_CR8_LOAD_EXITING | VMX_CPU_BASED_CR8_STORE_EXITING | -+ VMX_CPU_BASED_TPR_SHADOW | VMX_CPU_BASED_MOV_DR_EXITING | -+ VMX_CPU_BASED_UNCOND_IO_EXITING | VMX_CPU_BASED_USE_IO_BITMAPS | -+ VMX_CPU_BASED_MONITOR_EXITING | VMX_CPU_BASED_PAUSE_EXITING | -+ VMX_CPU_BASED_VIRTUAL_NMI_PENDING | VMX_CPU_BASED_USE_MSR_BITMAPS | -+ VMX_CPU_BASED_CR3_LOAD_EXITING | VMX_CPU_BASED_CR3_STORE_EXITING | -+ VMX_CPU_BASED_MONITOR_TRAP_FLAG | -+ VMX_CPU_BASED_ACTIVATE_SECONDARY_CONTROLS, -+ .features[FEAT_VMX_SECONDARY_CTLS] = -+ VMX_SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES | -+ VMX_SECONDARY_EXEC_WBINVD_EXITING | VMX_SECONDARY_EXEC_ENABLE_EPT | -+ VMX_SECONDARY_EXEC_DESC | VMX_SECONDARY_EXEC_RDTSCP | -+ VMX_SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE | -+ VMX_SECONDARY_EXEC_ENABLE_VPID | VMX_SECONDARY_EXEC_UNRESTRICTED_GUEST | -+ VMX_SECONDARY_EXEC_APIC_REGISTER_VIRT | -+ VMX_SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY | -+ VMX_SECONDARY_EXEC_RDRAND_EXITING | VMX_SECONDARY_EXEC_ENABLE_INVPCID | -+ VMX_SECONDARY_EXEC_ENABLE_VMFUNC | VMX_SECONDARY_EXEC_SHADOW_VMCS | -+ VMX_SECONDARY_EXEC_RDSEED_EXITING | VMX_SECONDARY_EXEC_ENABLE_PML, -+ .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING, - .xlevel = 0x80000008, - .model_id = "Intel Xeon Processor (Cooperlake)", - }, diff --git a/target-i386-Add-new-bit-definitions-of-M.patch b/target-i386-Add-new-bit-definitions-of-M.patch deleted file mode 100644 index 318bfa8..0000000 --- a/target-i386-Add-new-bit-definitions-of-M.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Xiaoyao Li -Date: Wed, 8 Jan 2020 13:32:39 +0100 -Subject: target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES - -Git-commit: 6c997b4adb300788d61d72e2b8bc67c03a584956 -References: jsc#SLE-7923 - -The bit 6, 7 and 8 of MSR_IA32_ARCH_CAPABILITIES are recently disclosed -for some security issues. Add the definitions for them to be used by named -CPU models. - -Signed-off-by: Xiaoyao Li -Message-Id: <20191225063018.20038-2-xiaoyao.li@intel.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.h | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/target/i386/cpu.h b/target/i386/cpu.h -index af282936a785a25f651d0db1a8cf..594326a7946798aba6ac42415164 100644 ---- a/target/i386/cpu.h -+++ b/target/i386/cpu.h -@@ -835,12 +835,15 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; - #define CPUID_TOPOLOGY_LEVEL_DIE (5U << 8) - - /* MSR Feature Bits */ --#define MSR_ARCH_CAP_RDCL_NO (1U << 0) --#define MSR_ARCH_CAP_IBRS_ALL (1U << 1) --#define MSR_ARCH_CAP_RSBA (1U << 2) -+#define MSR_ARCH_CAP_RDCL_NO (1U << 0) -+#define MSR_ARCH_CAP_IBRS_ALL (1U << 1) -+#define MSR_ARCH_CAP_RSBA (1U << 2) - #define MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY (1U << 3) --#define MSR_ARCH_CAP_SSB_NO (1U << 4) --#define MSR_ARCH_CAP_MDS_NO (1U << 5) -+#define MSR_ARCH_CAP_SSB_NO (1U << 4) -+#define MSR_ARCH_CAP_MDS_NO (1U << 5) -+#define MSR_ARCH_CAP_PSCHANGE_MC_NO (1U << 6) -+#define MSR_ARCH_CAP_TSX_CTRL_MSR (1U << 7) -+#define MSR_ARCH_CAP_TAA_NO (1U << 8) - - #define MSR_CORE_CAP_SPLIT_LOCK_DETECT (1U << 5) - diff --git a/target-i386-do-not-set-unsupported-VMX-s.patch b/target-i386-do-not-set-unsupported-VMX-s.patch deleted file mode 100644 index 91277cd..0000000 --- a/target-i386-do-not-set-unsupported-VMX-s.patch +++ /dev/null @@ -1,100 +0,0 @@ -From: Vitaly Kuznetsov -Date: Tue, 31 Mar 2020 18:27:52 +0200 -Subject: target/i386: do not set unsupported VMX secondary execution controls - -Git-commit: 4a910e1f6ab4155ec8b24c49b2585cc486916985 - -Commit 048c95163b4 ("target/i386: work around KVM_GET_MSRS bug for -secondary execution controls") added a workaround for KVM pre-dating -commit 6defc591846d ("KVM: nVMX: include conditional controls in /dev/kvm -KVM_GET_MSRS") which wasn't setting certain available controls. The -workaround uses generic CPUID feature bits to set missing VMX controls. - -It was found that in some cases it is possible to observe hosts which -have certain CPUID features but lack the corresponding VMX control. - -In particular, it was reported that Azure VMs have RDSEED but lack -VMX_SECONDARY_EXEC_RDSEED_EXITING; attempts to enable this feature -bit result in QEMU abort. - -Resolve the issue but not applying the workaround when we don't have -to. As there is no good way to find out if KVM has the fix itself, use -95c5c7c77c ("KVM: nVMX: list VMX MSRs in KVM_GET_MSR_INDEX_LIST") instead -as these [are supposed to] come together. - -Fixes: 048c95163b4 ("target/i386: work around KVM_GET_MSRS bug for secondary execution controls") -Suggested-by: Paolo Bonzini -Signed-off-by: Vitaly Kuznetsov -Message-Id: <20200331162752.1209928-1-vkuznets@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/kvm.c | 41 ++++++++++++++++++++++++++--------------- - 1 file changed, 26 insertions(+), 15 deletions(-) - -diff --git a/target/i386/kvm.c b/target/i386/kvm.c -index b8ea67a644c802358826a840bdf1..91cd4976e262ad6bbb83206114b3 100644 ---- a/target/i386/kvm.c -+++ b/target/i386/kvm.c -@@ -105,6 +105,7 @@ static bool has_msr_smi_count; - static bool has_msr_arch_capabs; - static bool has_msr_core_capabs; - static bool has_msr_vmx_vmfunc; -+static bool has_msr_vmx_procbased_ctls2; - - static uint32_t has_architectural_pmu_version; - static uint32_t num_architectural_pmu_gp_counters; -@@ -489,21 +490,28 @@ uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index) - value = msr_data.entries[0].data; - switch (index) { - case MSR_IA32_VMX_PROCBASED_CTLS2: -- /* KVM forgot to add these bits for some time, do this ourselves. */ -- if (kvm_arch_get_supported_cpuid(s, 0xD, 1, R_ECX) & CPUID_XSAVE_XSAVES) { -- value |= (uint64_t)VMX_SECONDARY_EXEC_XSAVES << 32; -- } -- if (kvm_arch_get_supported_cpuid(s, 1, 0, R_ECX) & CPUID_EXT_RDRAND) { -- value |= (uint64_t)VMX_SECONDARY_EXEC_RDRAND_EXITING << 32; -- } -- if (kvm_arch_get_supported_cpuid(s, 7, 0, R_EBX) & CPUID_7_0_EBX_INVPCID) { -- value |= (uint64_t)VMX_SECONDARY_EXEC_ENABLE_INVPCID << 32; -- } -- if (kvm_arch_get_supported_cpuid(s, 7, 0, R_EBX) & CPUID_7_0_EBX_RDSEED) { -- value |= (uint64_t)VMX_SECONDARY_EXEC_RDSEED_EXITING << 32; -- } -- if (kvm_arch_get_supported_cpuid(s, 0x80000001, 0, R_EDX) & CPUID_EXT2_RDTSCP) { -- value |= (uint64_t)VMX_SECONDARY_EXEC_RDTSCP << 32; -+ if (!has_msr_vmx_procbased_ctls2) { -+ /* KVM forgot to add these bits for some time, do this ourselves. */ -+ if (kvm_arch_get_supported_cpuid(s, 0xD, 1, R_ECX) & -+ CPUID_XSAVE_XSAVES) { -+ value |= (uint64_t)VMX_SECONDARY_EXEC_XSAVES << 32; -+ } -+ if (kvm_arch_get_supported_cpuid(s, 1, 0, R_ECX) & -+ CPUID_EXT_RDRAND) { -+ value |= (uint64_t)VMX_SECONDARY_EXEC_RDRAND_EXITING << 32; -+ } -+ if (kvm_arch_get_supported_cpuid(s, 7, 0, R_EBX) & -+ CPUID_7_0_EBX_INVPCID) { -+ value |= (uint64_t)VMX_SECONDARY_EXEC_ENABLE_INVPCID << 32; -+ } -+ if (kvm_arch_get_supported_cpuid(s, 7, 0, R_EBX) & -+ CPUID_7_0_EBX_RDSEED) { -+ value |= (uint64_t)VMX_SECONDARY_EXEC_RDSEED_EXITING << 32; -+ } -+ if (kvm_arch_get_supported_cpuid(s, 0x80000001, 0, R_EDX) & -+ CPUID_EXT2_RDTSCP) { -+ value |= (uint64_t)VMX_SECONDARY_EXEC_RDTSCP << 32; -+ } - } - /* fall through */ - case MSR_IA32_VMX_TRUE_PINBASED_CTLS: -@@ -2056,6 +2064,9 @@ static int kvm_get_supported_msrs(KVMState *s) - case MSR_IA32_VMX_VMFUNC: - has_msr_vmx_vmfunc = true; - break; -+ case MSR_IA32_VMX_PROCBASED_CTLS2: -+ has_msr_vmx_procbased_ctls2 = true; -+ break; - } - } - } diff --git a/target-i386-kvm-initialize-feature-MSRs-.patch b/target-i386-kvm-initialize-feature-MSRs-.patch deleted file mode 100644 index 9563c04..0000000 --- a/target-i386-kvm-initialize-feature-MSRs-.patch +++ /dev/null @@ -1,163 +0,0 @@ -From: Paolo Bonzini -Date: Mon, 20 Jan 2020 19:21:42 +0100 -Subject: target/i386: kvm: initialize feature MSRs very early - -Git-commit: 420ae1fc51c99abfd03b1c590f55617edd2a2bed - -Some read-only MSRs affect the behavior of ioctls such as -KVM_SET_NESTED_STATE. We can initialize them once and for all -right after the CPU is realized, since they will never be modified -by the guest. - -Reported-by: Qingua Cheng -Cc: qemu-stable@nongnu.org -Signed-off-by: Paolo Bonzini -Message-Id: <1579544504-3616-2-git-send-email-pbonzini@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/kvm.c | 81 +++++++++++++++++++++++++----------------- - target/i386/kvm_i386.h | 1 + - 2 files changed, 49 insertions(+), 33 deletions(-) - -diff --git a/target/i386/kvm.c b/target/i386/kvm.c -index 1d10046a6c31b1f412b403c3ab20..b8ea67a644c802358826a840bdf1 100644 ---- a/target/i386/kvm.c -+++ b/target/i386/kvm.c -@@ -67,6 +67,8 @@ - * 255 kvm_msr_entry structs */ - #define MSR_BUF_SIZE 4096 - -+static void kvm_init_msrs(X86CPU *cpu); -+ - const KVMCapabilityInfo kvm_arch_required_capabilities[] = { - KVM_CAP_INFO(SET_TSS_ADDR), - KVM_CAP_INFO(EXT_CPUID), -@@ -1842,6 +1844,8 @@ int kvm_arch_init_vcpu(CPUState *cs) - has_msr_tsc_aux = false; - } - -+ kvm_init_msrs(cpu); -+ - r = hyperv_init_vcpu(cpu); - if (r) { - goto fail; -@@ -2660,11 +2664,53 @@ static void kvm_msr_entry_add_vmx(X86CPU *cpu, FeatureWordArray f) - VMCS12_MAX_FIELD_INDEX << 1); - } - -+static int kvm_buf_set_msrs(X86CPU *cpu) -+{ -+ int ret = kvm_vcpu_ioctl(CPU(cpu), KVM_SET_MSRS, cpu->kvm_msr_buf); -+ if (ret < 0) { -+ return ret; -+ } -+ -+ if (ret < cpu->kvm_msr_buf->nmsrs) { -+ struct kvm_msr_entry *e = &cpu->kvm_msr_buf->entries[ret]; -+ error_report("error: failed to set MSR 0x%" PRIx32 " to 0x%" PRIx64, -+ (uint32_t)e->index, (uint64_t)e->data); -+ } -+ -+ assert(ret == cpu->kvm_msr_buf->nmsrs); -+ return 0; -+} -+ -+static void kvm_init_msrs(X86CPU *cpu) -+{ -+ CPUX86State *env = &cpu->env; -+ -+ kvm_msr_buf_reset(cpu); -+ if (has_msr_arch_capabs) { -+ kvm_msr_entry_add(cpu, MSR_IA32_ARCH_CAPABILITIES, -+ env->features[FEAT_ARCH_CAPABILITIES]); -+ } -+ -+ if (has_msr_core_capabs) { -+ kvm_msr_entry_add(cpu, MSR_IA32_CORE_CAPABILITY, -+ env->features[FEAT_CORE_CAPABILITY]); -+ } -+ -+ /* -+ * Older kernels do not include VMX MSRs in KVM_GET_MSR_INDEX_LIST, but -+ * all kernels with MSR features should have them. -+ */ -+ if (kvm_feature_msrs && cpu_has_vmx(env)) { -+ kvm_msr_entry_add_vmx(cpu, env->features); -+ } -+ -+ assert(kvm_buf_set_msrs(cpu) == 0); -+} -+ - static int kvm_put_msrs(X86CPU *cpu, int level) - { - CPUX86State *env = &cpu->env; - int i; -- int ret; - - kvm_msr_buf_reset(cpu); - -@@ -2722,17 +2768,6 @@ static int kvm_put_msrs(X86CPU *cpu, int level) - } - #endif - -- /* If host supports feature MSR, write down. */ -- if (has_msr_arch_capabs) { -- kvm_msr_entry_add(cpu, MSR_IA32_ARCH_CAPABILITIES, -- env->features[FEAT_ARCH_CAPABILITIES]); -- } -- -- if (has_msr_core_capabs) { -- kvm_msr_entry_add(cpu, MSR_IA32_CORE_CAPABILITY, -- env->features[FEAT_CORE_CAPABILITY]); -- } -- - /* - * The following MSRs have side effects on the guest or are too heavy - * for normal writeback. Limit them to reset or full state updates. -@@ -2910,14 +2945,6 @@ static int kvm_put_msrs(X86CPU *cpu, int level) - - /* Note: MSR_IA32_FEATURE_CONTROL is written separately, see - * kvm_put_msr_feature_control. */ -- -- /* -- * Older kernels do not include VMX MSRs in KVM_GET_MSR_INDEX_LIST, but -- * all kernels with MSR features should have them. -- */ -- if (kvm_feature_msrs && cpu_has_vmx(env)) { -- kvm_msr_entry_add_vmx(cpu, env->features); -- } - } - - if (env->mcg_cap) { -@@ -2933,19 +2960,7 @@ static int kvm_put_msrs(X86CPU *cpu, int level) - } - } - -- ret = kvm_vcpu_ioctl(CPU(cpu), KVM_SET_MSRS, cpu->kvm_msr_buf); -- if (ret < 0) { -- return ret; -- } -- -- if (ret < cpu->kvm_msr_buf->nmsrs) { -- struct kvm_msr_entry *e = &cpu->kvm_msr_buf->entries[ret]; -- error_report("error: failed to set MSR 0x%" PRIx32 " to 0x%" PRIx64, -- (uint32_t)e->index, (uint64_t)e->data); -- } -- -- assert(ret == cpu->kvm_msr_buf->nmsrs); -- return 0; -+ return kvm_buf_set_msrs(cpu); - } - - -diff --git a/target/i386/kvm_i386.h b/target/i386/kvm_i386.h -index 06fe06bdb3d6d647d8cfb0eee87b..d98c6f69d08af549fe5f31fc4264 100644 ---- a/target/i386/kvm_i386.h -+++ b/target/i386/kvm_i386.h -@@ -66,4 +66,5 @@ bool kvm_enable_x2apic(void); - bool kvm_has_x2apic_api(void); - - bool kvm_hv_vpindex_settable(void); -+ - #endif diff --git a/target-ppc-Fix-rlwinm-on-ppc64.patch b/target-ppc-Fix-rlwinm-on-ppc64.patch deleted file mode 100644 index a0f24a4..0000000 --- a/target-ppc-Fix-rlwinm-on-ppc64.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Vitaly Chikunov -Date: Mon, 9 Mar 2020 23:45:57 +0300 -Subject: target/ppc: Fix rlwinm on ppc64 - -Git-commit: 94f040aaecf4e41cc68991b80204b1b6886bbdd0 - -rlwinm cannot just AND with Mask if shift value is zero on ppc64 when -Mask Begin is greater than Mask End and high bits are set to 1. - -Note that PowerISA 3.0B says that for `rlwinm' ROTL32 is used, and -ROTL32 is defined (in 3.3.14) so that rotated value should have two -copies of lower word of the source value. - -This seems to be another incarnation of the fix from 820724d170 -("target-ppc: Fix rlwimi, rlwinm, rlwnm again"), except I leave -optimization when Mask value is less than 32 bits. - -Fixes: 7b4d326f47 ("target-ppc: Use the new deposit and extract ops") -Cc: qemu-stable@nongnu.org -Signed-off-by: Vitaly Chikunov -Message-Id: <20200309204557.14836-1-vt@altlinux.org> -Reviewed-by: Richard Henderson -Signed-off-by: David Gibson -Signed-off-by: Bruce Rogers ---- - target/ppc/translate.c | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/target/ppc/translate.c b/target/ppc/translate.c -index f5fe5d06118a7c86d11f38767fab..f87f6eeaf7d988896c61b025320a 100644 ---- a/target/ppc/translate.c -+++ b/target/ppc/translate.c -@@ -1938,15 +1938,17 @@ static void gen_rlwinm(DisasContext *ctx) - me += 32; - #endif - mask = MASK(mb, me); -- if (sh == 0) { -- tcg_gen_andi_tl(t_ra, t_rs, mask); -- } else if (mask <= 0xffffffffu) { -- TCGv_i32 t0 = tcg_temp_new_i32(); -- tcg_gen_trunc_tl_i32(t0, t_rs); -- tcg_gen_rotli_i32(t0, t0, sh); -- tcg_gen_andi_i32(t0, t0, mask); -- tcg_gen_extu_i32_tl(t_ra, t0); -- tcg_temp_free_i32(t0); -+ if (mask <= 0xffffffffu) { -+ if (sh == 0) { -+ tcg_gen_andi_tl(t_ra, t_rs, mask); -+ } else { -+ TCGv_i32 t0 = tcg_temp_new_i32(); -+ tcg_gen_trunc_tl_i32(t0, t_rs); -+ tcg_gen_rotli_i32(t0, t0, sh); -+ tcg_gen_andi_i32(t0, t0, mask); -+ tcg_gen_extu_i32_tl(t_ra, t0); -+ tcg_temp_free_i32(t0); -+ } - } else { - #if defined(TARGET_PPC64) - tcg_gen_deposit_i64(t_ra, t_rs, t_rs, 32, 32); diff --git a/target-xtensa-fix-pasto-in-pfwait.r-opco.patch b/target-xtensa-fix-pasto-in-pfwait.r-opco.patch deleted file mode 100644 index 1ca43ee..0000000 --- a/target-xtensa-fix-pasto-in-pfwait.r-opco.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Max Filippov -Date: Wed, 26 Feb 2020 12:43:52 -0800 -Subject: target/xtensa: fix pasto in pfwait.r opcode name - -Git-commit: 1a03362b14affa4d8ddede55df6e21d7a07b87c2 - -Core xtensa opcode table has pfwait.o instead of pfwait.r. Fix that. - -Fixes: c884400f2988 ("target/xtensa: implement block prefetch option opcodes") -Signed-off-by: Max Filippov -Signed-off-by: Bruce Rogers ---- - target/xtensa/translate.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c -index a99f5296e2f4f1d01fd21cfb3fd0..2ec0e5a047ed0e9b9c0926518649 100644 ---- a/target/xtensa/translate.c -+++ b/target/xtensa/translate.c -@@ -3740,7 +3740,7 @@ static const XtensaOpcodeOps core_ops[] = { - .name = "pfwait.a", - .translate = translate_nop, - }, { -- .name = "pfwait.o", -+ .name = "pfwait.r", - .translate = translate_nop, - }, { - .name = "pitlb", diff --git a/tcg-i386-Fix-INDEX_op_dup2_vec.patch b/tcg-i386-Fix-INDEX_op_dup2_vec.patch deleted file mode 100644 index 103f928..0000000 --- a/tcg-i386-Fix-INDEX_op_dup2_vec.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Richard Henderson -Date: Sat, 28 Mar 2020 18:16:10 -0700 -Subject: tcg/i386: Fix INDEX_op_dup2_vec - -Git-commit: e20cb81d9c5a3d0f9c08f3642728a210a1c162c9 - -We were only constructing the 64-bit element, and not -replicating the 64-bit element across the rest of the vector. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Richard Henderson -Signed-off-by: Bruce Rogers ---- - tcg/i386/tcg-target.inc.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c -index 9d8ed974e011152d2df4cba613ad..77b78c941c5afcd065a8e153dca7 100644 ---- a/tcg/i386/tcg-target.inc.c -+++ b/tcg/i386/tcg-target.inc.c -@@ -2855,9 +2855,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, - goto gen_simd; - #if TCG_TARGET_REG_BITS == 32 - case INDEX_op_dup2_vec: -- /* Constraints have already placed both 32-bit inputs in xmm regs. */ -- insn = OPC_PUNPCKLDQ; -- goto gen_simd; -+ /* First merge the two 32-bit inputs to a single 64-bit element. */ -+ tcg_out_vex_modrm(s, OPC_PUNPCKLDQ, a0, a1, a2); -+ /* Then replicate the 64-bit elements across the rest of the vector. */ -+ if (type != TCG_TYPE_V64) { -+ tcg_out_dup_vec(s, type, MO_64, a0, a0); -+ } -+ break; - #endif - case INDEX_op_abs_vec: - insn = abs_insn[vece]; diff --git a/tcg-mips-mips-sync-encode-error.patch b/tcg-mips-mips-sync-encode-error.patch deleted file mode 100644 index 259650f..0000000 --- a/tcg-mips-mips-sync-encode-error.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: lixinyu -Date: Sat, 11 Apr 2020 20:46:12 +0800 -Subject: tcg/mips: mips sync* encode error -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: a4e57084c16d5b0eff3651693fba04f26b30b551 - -OPC_SYNC_WMB, OPC_SYNC_MB, OPC_SYNC_ACQUIRE, OPC_SYNC_RELEASE and -OPC_SYNC_RMB have wrong encode. According to the mips manual, -their encode should be 'OPC_SYNC | 0x?? << 6' rather than -'OPC_SYNC | 0x?? << 5'. Wrong encode can lead illegal instruction -errors. These instructions often appear with multi-threaded -simulation. - -Fixes: 6f0b99104a3 ("tcg/mips: Add support for fence") -Reviewed-by: Richard Henderson -Reviewed-by: Aleksandar Markovic -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: lixinyu -Message-Id: <20200411124612.12560-1-precinct@mail.ustc.edu.cn> -Signed-off-by: Richard Henderson -Signed-off-by: Bruce Rogers ---- - tcg/mips/tcg-target.inc.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c -index 544216704526a4bd24dce51ade83..006835348fe5c5818d89b0806ba3 100644 ---- a/tcg/mips/tcg-target.inc.c -+++ b/tcg/mips/tcg-target.inc.c -@@ -404,11 +404,11 @@ typedef enum { - - /* MIPS r6 introduced names for weaker variants of SYNC. These are - backward compatible to previous architecture revisions. */ -- OPC_SYNC_WMB = OPC_SYNC | 0x04 << 5, -- OPC_SYNC_MB = OPC_SYNC | 0x10 << 5, -- OPC_SYNC_ACQUIRE = OPC_SYNC | 0x11 << 5, -- OPC_SYNC_RELEASE = OPC_SYNC | 0x12 << 5, -- OPC_SYNC_RMB = OPC_SYNC | 0x13 << 5, -+ OPC_SYNC_WMB = OPC_SYNC | 0x04 << 6, -+ OPC_SYNC_MB = OPC_SYNC | 0x10 << 6, -+ OPC_SYNC_ACQUIRE = OPC_SYNC | 0x11 << 6, -+ OPC_SYNC_RELEASE = OPC_SYNC | 0x12 << 6, -+ OPC_SYNC_RMB = OPC_SYNC | 0x13 << 6, - - /* Aliases for convenience. */ - ALIAS_PADD = sizeof(void *) == 4 ? OPC_ADDU : OPC_DADDU, diff --git a/tcp_emu-Fix-oob-access.patch b/tcp_emu-Fix-oob-access.patch deleted file mode 100644 index 2e3b9a6..0000000 --- a/tcp_emu-Fix-oob-access.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Samuel Thibault -Date: Wed, 8 Jan 2020 00:58:48 +0100 -Subject: tcp_emu: Fix oob access - -Git-commit: 2655fffed7a9e765bcb4701dd876e9dab975f289 -References: bsc#1161066, CVE2020-7039, bsc#1161066, CVS-2020-7039 - -The main loop only checks for one available byte, while we sometimes -need two bytes. - -Signed-off-by: Bruce Rogers ---- - src/tcp_subr.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c -index 6cd181c9f2875528adab3f636aec..cedbfb28686604dbb7e8e5b35dd1 100644 ---- a/slirp/src/tcp_subr.c -+++ b/slirp/src/tcp_subr.c -@@ -887,6 +887,9 @@ int tcp_emu(struct socket *so, struct mbuf *m) - break; - - case 5: -+ if (bptr == m->m_data + m->m_len - 1) -+ return 1; /* We need two bytes */ -+ - /* - * The difference between versions 1.0 and - * 2.0 is here. For future versions of -@@ -902,6 +905,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) - /* This is the field containing the port - * number that RA-player is listening to. - */ -+ -+ if (bptr == m->m_data + m->m_len - 1) -+ return 1; /* We need two bytes */ -+ - lport = (((uint8_t *)bptr)[0] << 8) + ((uint8_t *)bptr)[1]; - if (lport < 6970) - lport += 256; /* don't know why */ diff --git a/tcp_emu-fix-unsafe-snprintf-usages.patch b/tcp_emu-fix-unsafe-snprintf-usages.patch deleted file mode 100644 index 2292f03..0000000 --- a/tcp_emu-fix-unsafe-snprintf-usages.patch +++ /dev/null @@ -1,134 +0,0 @@ -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Mon, 27 Jan 2020 10:24:14 +0100 -Subject: tcp_emu: fix unsafe snprintf() usages -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 68ccb8021a838066f0951d4b2817eb6b6f10a843 -References: bsc#1163018, CVE-2020-8608 - -Various calls to snprintf() assume that snprintf() returns "only" the -number of bytes written (excluding terminating NUL). - -https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04 - -"Upon successful completion, the snprintf() function shall return the -number of bytes that would be written to s had n been sufficiently -large excluding the terminating null byte." - -Before patch ce131029, if there isn't enough room in "m_data" for the -"DCC ..." message, we overflow "m_data". - -After the patch, if there isn't enough room for the same, we don't -overflow "m_data", but we set "m_len" out-of-bounds. The next time an -access is bounded by "m_len", we'll have a buffer overflow then. - -Use slirp_fmt*() to fix potential OOB memory access. - -Reported-by: Laszlo Ersek -Signed-off-by: Marc-André Lureau -Reviewed-by: Samuel Thibault -Message-Id: <20200127092414.169796-7-marcandre.lureau@redhat.com> -Signed-off-by: Bruce Rogers ---- - src/tcp_subr.c | 44 +++++++++++++++++++++----------------------- - 1 file changed, 21 insertions(+), 23 deletions(-) - -diff --git a/slirp/src/tcp_subr.c b/slirp/src/tcp_subr.c -index 954d1a6f5e6292b585638a8c0558..26d4ead543a5357577817b39a3d6 100644 ---- a/slirp/src/tcp_subr.c -+++ b/slirp/src/tcp_subr.c -@@ -655,8 +655,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) - NTOHS(n1); - NTOHS(n2); - m_inc(m, snprintf(NULL, 0, "%d,%d\r\n", n1, n2) + 1); -- m->m_len = snprintf(m->m_data, M_ROOM(m), "%d,%d\r\n", n1, n2); -- assert(m->m_len < M_ROOM(m)); -+ m->m_len = slirp_fmt(m->m_data, M_ROOM(m), "%d,%d\r\n", n1, n2); - } else { - *eol = '\r'; - } -@@ -696,9 +695,9 @@ int tcp_emu(struct socket *so, struct mbuf *m) - n4 = (laddr & 0xff); - - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, M_FREEROOM(m), -- "ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4, -- n5, n6, x == 7 ? buff : ""); -+ m->m_len += slirp_fmt(bptr, M_FREEROOM(m), -+ "ORT %d,%d,%d,%d,%d,%d\r\n%s", -+ n1, n2, n3, n4, n5, n6, x == 7 ? buff : ""); - return 1; - } else if ((bptr = (char *)strstr(m->m_data, "27 Entering")) != NULL) { - /* -@@ -731,10 +730,9 @@ int tcp_emu(struct socket *so, struct mbuf *m) - n4 = (laddr & 0xff); - - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, M_FREEROOM(m), -- "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", -- n1, n2, n3, n4, n5, n6, x == 7 ? buff : ""); -- -+ m->m_len += slirp_fmt(bptr, M_FREEROOM(m), -+ "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", -+ n1, n2, n3, n4, n5, n6, x == 7 ? buff : ""); - return 1; - } - -@@ -757,8 +755,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) - if (m->m_data[m->m_len - 1] == '\0' && lport != 0 && - (so = tcp_listen(slirp, INADDR_ANY, 0, so->so_laddr.s_addr, - htons(lport), SS_FACCEPTONCE)) != NULL) -- m->m_len = snprintf(m->m_data, M_ROOM(m), -- "%d", ntohs(so->so_fport)) + 1; -+ m->m_len = slirp_fmt0(m->m_data, M_ROOM(m), -+ "%d", ntohs(so->so_fport)); - return 1; - - case EMU_IRC: -@@ -777,10 +775,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, M_FREEROOM(m), -- "DCC CHAT chat %lu %u%c\n", -- (unsigned long)ntohl(so->so_faddr.s_addr), -- ntohs(so->so_fport), 1); -+ m->m_len += slirp_fmt(bptr, M_FREEROOM(m), -+ "DCC CHAT chat %lu %u%c\n", -+ (unsigned long)ntohl(so->so_faddr.s_addr), -+ ntohs(so->so_fport), 1); - } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, - &n1) == 4) { - if ((so = tcp_listen(slirp, INADDR_ANY, 0, htonl(laddr), -@@ -788,10 +786,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, M_FREEROOM(m), -- "DCC SEND %s %lu %u %u%c\n", buff, -- (unsigned long)ntohl(so->so_faddr.s_addr), -- ntohs(so->so_fport), n1, 1); -+ m->m_len += slirp_fmt(bptr, M_FREEROOM(m), -+ "DCC SEND %s %lu %u %u%c\n", buff, -+ (unsigned long)ntohl(so->so_faddr.s_addr), -+ ntohs(so->so_fport), n1, 1); - } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, - &n1) == 4) { - if ((so = tcp_listen(slirp, INADDR_ANY, 0, htonl(laddr), -@@ -799,10 +797,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) - return 1; - } - m->m_len = bptr - m->m_data; /* Adjust length */ -- m->m_len += snprintf(bptr, M_FREEROOM(m), -- "DCC MOVE %s %lu %u %u%c\n", buff, -- (unsigned long)ntohl(so->so_faddr.s_addr), -- ntohs(so->so_fport), n1, 1); -+ m->m_len += slirp_fmt(bptr, M_FREEROOM(m), -+ "DCC MOVE %s %lu %u %u%c\n", buff, -+ (unsigned long)ntohl(so->so_faddr.s_addr), -+ ntohs(so->so_fport), n1, 1); - } - return 1; - diff --git a/tests-Disable-some-block-tests-for-now.patch b/tests-Disable-some-block-tests-for-now.patch index 5d2eaa7..976f468 100644 --- a/tests-Disable-some-block-tests-for-now.patch +++ b/tests-Disable-some-block-tests-for-now.patch @@ -22,7 +22,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index 1c1b69f0581c9a0043376b440600..d293735679e23235092c614e2206 100644 +index 435dccd5af90754a3f80f4455bdb..8409dad73f2cbd7447235ea10b03 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -86,7 +86,7 @@ @@ -36,7 +36,7 @@ index 1c1b69f0581c9a0043376b440600..d293735679e23235092c614e2206 100644 068 rw quick @@ -150,7 +150,7 @@ 126 rw auto backing - 127 rw backing quick + 127 rw auto backing quick 128 rw quick -129 rw quick +#DISABLE FOR NOW 129 rw quick @@ -60,7 +60,7 @@ index 1c1b69f0581c9a0043376b440600..d293735679e23235092c614e2206 100644 @@ -198,7 +198,7 @@ 178 img 179 rw auto quick - 181 rw migration + 181 rw auto migration -182 rw quick +#DISABLE FOR NOW 182 rw quick 183 rw migration @@ -68,7 +68,7 @@ index 1c1b69f0581c9a0043376b440600..d293735679e23235092c614e2206 100644 185 rw @@ -220,7 +220,7 @@ 202 rw quick - 203 rw migration + 203 rw auto migration 204 rw quick -205 rw quick +#DISABLE FOR NOW 205 rw quick diff --git a/tests-Fix-block-tests-to-be-compatible-w.patch b/tests-Fix-block-tests-to-be-compatible-w.patch index 36b902f..b5a2f28 100644 --- a/tests-Fix-block-tests-to-be-compatible-w.patch +++ b/tests-Fix-block-tests-to-be-compatible-w.patch @@ -60,10 +60,10 @@ index e45285ccc311522481ac1b27ba99..7168bdf70c3eb32d4de0d28bb947 100644 file format: IMGFMT virtual size: 64 MiB (67108864 bytes) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 -index c969a1a16ff8382b9bb69252f6de..39d6da725bff3932a7cb88acff8e 100755 +index 2b1311176801e30485cf39ec65d8..608a377af5f3662dc25ddcebb01e 100755 --- a/tests/qemu-iotests/153 +++ b/tests/qemu-iotests/153 -@@ -206,7 +206,8 @@ _send_qemu_cmd $QEMU_HANDLE \ +@@ -202,7 +202,8 @@ _send_qemu_cmd $QEMU_HANDLE \ 'return' _run_cmd $QEMU_IMG commit -b "${TEST_IMG}.b" "${TEST_IMG}.c" @@ -73,7 +73,7 @@ index c969a1a16ff8382b9bb69252f6de..39d6da725bff3932a7cb88acff8e 100755 _launch_qemu -@@ -258,7 +259,8 @@ _send_qemu_cmd $QEMU_HANDLE \ +@@ -254,7 +255,8 @@ _send_qemu_cmd $QEMU_HANDLE \ _run_cmd $QEMU_IO "${TEST_IMG}" -c 'write 0 512' diff --git a/tests-numa-Add-case-for-QMP-build-HMAT.patch b/tests-numa-Add-case-for-QMP-build-HMAT.patch deleted file mode 100644 index 02209f2..0000000 --- a/tests-numa-Add-case-for-QMP-build-HMAT.patch +++ /dev/null @@ -1,252 +0,0 @@ -From: Tao Xu -Date: Fri, 13 Dec 2019 09:19:28 +0800 -Subject: tests/numa: Add case for QMP build HMAT - -Git-commit: d00817c944ed15fbe4a61d44fe7f9fe166c7df88 -References: jsc#SLE-8897 - -Check configuring HMAT usecase - -Acked-by: Markus Armbruster -Suggested-by: Igor Mammedov -Signed-off-by: Tao Xu -Message-Id: <20191213011929.2520-8-tao3.xu@intel.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Reviewed-by: Igor Mammedov -Signed-off-by: Bruce Rogers ---- - tests/numa-test.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 213 insertions(+) - -diff --git a/tests/numa-test.c b/tests/numa-test.c -index 8de8581231dd3e3299bc61d40d8d..17dd807d2a4329aea2e96a845edd 100644 ---- a/tests/numa-test.c -+++ b/tests/numa-test.c -@@ -327,6 +327,216 @@ static void pc_dynamic_cpu_cfg(const void *data) - qtest_quit(qs); - } - -+static void pc_hmat_build_cfg(const void *data) -+{ -+ QTestState *qs = qtest_initf("%s -nodefaults --preconfig -machine hmat=on " -+ "-smp 2,sockets=2 " -+ "-m 128M,slots=2,maxmem=1G " -+ "-object memory-backend-ram,size=64M,id=m0 " -+ "-object memory-backend-ram,size=64M,id=m1 " -+ "-numa node,nodeid=0,memdev=m0 " -+ "-numa node,nodeid=1,memdev=m1,initiator=0 " -+ "-numa cpu,node-id=0,socket-id=0 " -+ "-numa cpu,node-id=0,socket-id=1", -+ data ? (char *)data : ""); -+ -+ /* Fail: Initiator should be less than the number of nodes */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 2, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\" } }"))); -+ -+ /* Fail: Target should be less than the number of nodes */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 2," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\" } }"))); -+ -+ /* Fail: Initiator should contain cpu */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 1, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\" } }"))); -+ -+ /* Fail: Data-type mismatch */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"write-latency\"," -+ " 'bandwidth': 524288000 } }"))); -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"read-bandwidth\"," -+ " 'latency': 5 } }"))); -+ -+ /* Fail: Bandwidth should be 1MB (1048576) aligned */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-bandwidth\"," -+ " 'bandwidth': 1048575 } }"))); -+ -+ /* Configuring HMAT bandwidth and latency details */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 1 } }"))); /* 1 ns */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 5 } }"))); /* Fail: Duplicate configuration */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-bandwidth\"," -+ " 'bandwidth': 68717379584 } }"))); /* 65534 MB/s */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 1," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 65534 } }"))); /* 65534 ns */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 1," -+ " 'hierarchy': \"memory\", 'data-type': \"access-bandwidth\"," -+ " 'bandwidth': 34358689792 } }"))); /* 32767 MB/s */ -+ -+ /* Fail: node_id should be less than the number of nodes */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 2, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ -+ /* Fail: level should be less than HMAT_LB_LEVELS (4) */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 4, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ -+ /* Fail: associativity option should be 'none', if level is 0 */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 0, 'associativity': \"direct\", 'policy': \"none\"," -+ " 'line': 0 } }"))); -+ /* Fail: policy option should be 'none', if level is 0 */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 0, 'associativity': \"none\", 'policy': \"write-back\"," -+ " 'line': 0 } }"))); -+ /* Fail: line option should be 0, if level is 0 */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 0, 'associativity': \"none\", 'policy': \"none\"," -+ " 'line': 8 } }"))); -+ -+ /* Configuring HMAT memory side cache attributes */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); /* Fail: Duplicate configuration */ -+ /* Fail: The size of level 2 size should be small than level 1 */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 2, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ /* Fail: The size of level 0 size should be larger than level 1 */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 0, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 1, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ -+ /* let machine initialization to complete and run */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, -+ "{ 'execute': 'x-exit-preconfig' }"))); -+ qtest_qmp_eventwait(qs, "RESUME"); -+ -+ qtest_quit(qs); -+} -+ -+static void pc_hmat_off_cfg(const void *data) -+{ -+ QTestState *qs = qtest_initf("%s -nodefaults --preconfig " -+ "-smp 2,sockets=2 " -+ "-m 128M,slots=2,maxmem=1G " -+ "-object memory-backend-ram,size=64M,id=m0 " -+ "-object memory-backend-ram,size=64M,id=m1 " -+ "-numa node,nodeid=0,memdev=m0", -+ data ? (char *)data : ""); -+ -+ /* -+ * Fail: Enable HMAT with -machine hmat=on -+ * before using any of hmat specific options -+ */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'node', 'nodeid': 1, 'memdev': \"m1\"," -+ " 'initiator': 0 } }"))); -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'node', 'nodeid': 1, 'memdev': \"m1\" } }"))); -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 1 } }"))); -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ -+ /* let machine initialization to complete and run */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, -+ "{ 'execute': 'x-exit-preconfig' }"))); -+ qtest_qmp_eventwait(qs, "RESUME"); -+ -+ qtest_quit(qs); -+} -+ -+static void pc_hmat_erange_cfg(const void *data) -+{ -+ QTestState *qs = qtest_initf("%s -nodefaults --preconfig -machine hmat=on " -+ "-smp 2,sockets=2 " -+ "-m 128M,slots=2,maxmem=1G " -+ "-object memory-backend-ram,size=64M,id=m0 " -+ "-object memory-backend-ram,size=64M,id=m1 " -+ "-numa node,nodeid=0,memdev=m0 " -+ "-numa node,nodeid=1,memdev=m1,initiator=0 " -+ "-numa cpu,node-id=0,socket-id=0 " -+ "-numa cpu,node-id=0,socket-id=1", -+ data ? (char *)data : ""); -+ -+ /* Can't store the compressed latency */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 1 } }"))); /* 1 ns */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 1," -+ " 'hierarchy': \"memory\", 'data-type': \"access-latency\"," -+ " 'latency': 65535 } }"))); /* 65535 ns */ -+ -+ /* Test the 0 input (bandwidth not provided) */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 0," -+ " 'hierarchy': \"memory\", 'data-type': \"access-bandwidth\"," -+ " 'bandwidth': 0 } }"))); /* 0 MB/s */ -+ /* Fail: bandwidth should be provided before memory side cache attributes */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-cache', 'node-id': 0, 'size': 10240," -+ " 'level': 1, 'associativity': \"direct\", 'policy': \"write-back\"," -+ " 'line': 8 } }"))); -+ -+ /* Can't store the compressed bandwidth */ -+ g_assert_true(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'set-numa-node'," -+ " 'arguments': { 'type': 'hmat-lb', 'initiator': 0, 'target': 1," -+ " 'hierarchy': \"memory\", 'data-type': \"access-bandwidth\"," -+ " 'bandwidth': 68718428160 } }"))); /* 65535 MB/s */ -+ -+ /* let machine initialization to complete and run */ -+ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, -+ "{ 'execute': 'x-exit-preconfig' }"))); -+ qtest_qmp_eventwait(qs, "RESUME"); -+ -+ qtest_quit(qs); -+} -+ - int main(int argc, char **argv) - { - const char *args = NULL; -@@ -346,6 +556,9 @@ int main(int argc, char **argv) - if (!strcmp(arch, "i386") || !strcmp(arch, "x86_64")) { - qtest_add_data_func("/numa/pc/cpu/explicit", args, pc_numa_cpu); - qtest_add_data_func("/numa/pc/dynamic/cpu", args, pc_dynamic_cpu_cfg); -+ qtest_add_data_func("/numa/pc/hmat/build", args, pc_hmat_build_cfg); -+ qtest_add_data_func("/numa/pc/hmat/off", args, pc_hmat_off_cfg); -+ qtest_add_data_func("/numa/pc/hmat/erange", args, pc_hmat_erange_cfg); - } - - if (!strcmp(arch, "ppc64")) { diff --git a/tpm-ppi-page-align-PPI-RAM.patch b/tpm-ppi-page-align-PPI-RAM.patch deleted file mode 100644 index e4e1144..0000000 --- a/tpm-ppi-page-align-PPI-RAM.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Fri, 3 Jan 2020 11:39:59 +0400 -Subject: tpm-ppi: page-align PPI RAM -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 71e415c8a75c130875f14d6b2136825789feb297 - -post-copy migration fails on destination with error such as: -2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range: -Unaligned start address: 0x559d2afae9a0 - -Use qemu_memalign() to constrain the PPI RAM memory alignment. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Marc-André Lureau -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: Dr. David Alan Gilbert -Reviewed-by: Stefan Berger -Signed-off-by: Stefan Berger -Message-id: 20200103074000.1006389-3-marcandre.lureau@redhat.com -Signed-off-by: Bruce Rogers ---- - hw/tpm/tpm_ppi.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c -index ff314592b497b36853494c9600d7..6d9c1a3e40ee6f76d0b582d13f5b 100644 ---- a/hw/tpm/tpm_ppi.c -+++ b/hw/tpm/tpm_ppi.c -@@ -43,7 +43,8 @@ void tpm_ppi_reset(TPMPPI *tpmppi) - void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m, - hwaddr addr, Object *obj) - { -- tpmppi->buf = g_malloc0(HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE)); -+ tpmppi->buf = qemu_memalign(qemu_real_host_page_size, -+ HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE)); - memory_region_init_ram_device_ptr(&tpmppi->ram, obj, "tpm-ppi", - TPM_PPI_ADDR_SIZE, tpmppi->buf); - vmstate_register_ram(&tpmppi->ram, DEVICE(obj)); diff --git a/update_git.sh b/update_git.sh index c1aff92..d1f19cf 100644 --- a/update_git.sh +++ b/update_git.sh @@ -1,8 +1,4 @@ #!/bin/bash -#POKEALL used to document where ALL repos are POKED -#POKEALL? question what repos are actually poked here -#TEMP_CHECK - try to eliminate -# !! FIX AFTER RUN - LEAVING REPO NOT IN GOOD STATE # update_git.sh: script to manage package maintenance using a git-based # workflow. Commands are as follows: @@ -123,25 +119,23 @@ touch $BUNDLE_DIR/$GIT_UPSTREAM_COMMIT.id # Now go through all the submodule local repos that are present and create a bundle file for the patches found there for (( i=0; i <$REPO_COUNT; i++ )); do -#POKEALL (conditional on whether it IS there) if [[ -e $(readlink -f ${LOCAL_REPO_MAP[$i]}) ]]; then SUBDIR=${PATCH_PATH_MAP[$i]} GITREPO_COMMIT_ISH=($BUNDLE_DIR/$SUBDIR*.id) if [[ $GITREPO_COMMIT_ISH =~ .*(.{40})[.]id ]]; then GITREPO_COMMIT_ISH=${BASH_REMATCH[1]} echo "Using $GITREPO_COMMIT_ISH" + PATCH_RANGE_INDEX=$i mkdir -p $GIT_DIR/$SUBDIR git -C $GIT_DIR/$SUBDIR init -#POKEALL git -C $GIT_DIR/$SUBDIR remote add origin file://$(readlink -f \ - ${LOCAL_REPO_MAP[$i]}) + ${LOCAL_REPO_MAP[$PATCH_RANGE_INDEX]}) if [[ $(git -C $GIT_DIR/$SUBDIR ls-remote --heads origin $GIT_BRANCH) ]]; then git -C $GIT_DIR/$SUBDIR fetch origin $GIT_BRANCH if [[ $(git -C $GIT_DIR/$SUBDIR rev-list $GITREPO_COMMIT_ISH..FETCH_HEAD) ]]; then git -C $GIT_DIR/$SUBDIR bundle create $BUNDLE_DIR/$SUBDIR$GITREPO_COMMIT_ISH.bundle $GITREPO_COMMIT_ISH..FETCH_HEAD #TODO: post-process repo info to avoid un-needed diffs (eg git vs https) -#POKEALL - git -C $(readlink -f ${LOCAL_REPO_MAP[$i]}) remote get-url origin >$BUNDLE_DIR/$SUBDIR/repo + git -C $(readlink -f ${LOCAL_REPO_MAP[$PATCH_RANGE_INDEX]}) remote get-url origin >$BUNDLE_DIR/$SUBDIR/repo fi fi fi @@ -177,12 +171,12 @@ for entry in ${BUNDLE_FILES[@]}; do fi for (( i=0; i <$REPO_COUNT; i++ )); do if [[ "$SUBDIR" = "${PATCH_PATH_MAP[$i]}" ]]; then + PATCH_RANGE_INDEX=$i break fi done -#POKEALL ? - LOCAL_REPO=$(readlink -f ${LOCAL_REPO_MAP[$i]}) + LOCAL_REPO=$(readlink -f ${LOCAL_REPO_MAP[$PATCH_RANGE_INDEX]}) if [ -e $LOCAL_REPO ]; then git -C $LOCAL_REPO remote remove bundlerepo || true # git won't let you delete a branch we're on - so get onto master temporarily (TODO: is there a better approach?) @@ -280,7 +274,6 @@ mkdir -p $BUNDLE_DIR tar xJf bundles.tar.xz -C $BUNDLE_DIR # Now go through all the submodule local repos that are present and create a bundle file for the patches found there for (( i=0; i <$REPO_COUNT; i++ )); do -#POKEALL if [[ -e $(readlink -f ${LOCAL_REPO_MAP[$i]}) ]]; then if $(git -C ${LOCAL_REPO_MAP[$i]} branch | grep -F "frombundle" >/dev/null); then SUBDIR=${PATCH_PATH_MAP[$i]} @@ -332,19 +325,15 @@ for entry in ${BUNDLE_FILES[@]}; do fi for (( i=0; i <$REPO_COUNT; i++ )); do if [[ "$SUBDIR" = "${PATCH_PATH_MAP[$i]}" ]]; then + PATCH_RANGE_INDEX=$i break fi done - if [[ $i = $REPO_COUNT ]]; then - echo "Error matching bundle dir to project submodule path" - exit - fi mkdir -p $GIT_DIR/$SUBDIR git -C $GIT_DIR/$SUBDIR init -#POKEALL? git -C $GIT_DIR/$SUBDIR remote add origin file://$(readlink -f \ - ${LOCAL_REPO_MAP[$i]}) + ${LOCAL_REPO_MAP[$PATCH_RANGE_INDEX]}) git -C $GIT_DIR/$SUBDIR fetch origin $GIT_BRANCH git -C $GIT_DIR/$SUBDIR reset --hard $GITREPO_COMMIT_ISH git -C $GIT_DIR/$SUBDIR remote add bundle $BUNDLE_DIR/$entry @@ -352,7 +341,7 @@ for entry in ${BUNDLE_FILES[@]}; do git -C $GIT_DIR/$SUBDIR format-patch -N --suffix= --no-renames -o $CMP_DIR -k --stat=72 \ --indent-heuristic --zero-commit --no-signature --full-index \ --src-prefix=a/$SUBDIR --dst-prefix=b/$SUBDIR \ - --start-number=$(expr $i \* $PATCH_RANGE) \ + --start-number=$(expr $PATCH_RANGE_INDEX \* $PATCH_RANGE) \ $GITREPO_COMMIT_ISH..FETCH_HEAD > /dev/null done @@ -627,23 +616,35 @@ echo "and the qemu or qemu submodule repos as remotes named upstream" #============================================================================== -#?? Should we be LATEST or not specific here? if [[ ! -e $(readlink -f ${LOCAL_REPO_MAP[0]}) ]]; then - echo "ERROR: Main local QEMU related git repo not found. Please follow these setup instructions:" + echo "ERROR: Local QEMU related git repos not found. Please follow these setup instructions:" explain_setup exit fi +# There are some req's on needing a recent git, and a recent osc (double chk the osc part - I guess it's related to the osc service ) +# get the current state of the git superproject +# TODO: This sends output to stdout which we don't want to see +git -C ${LOCAL_REPO_MAP[0]} status --untracked-files=no --branch --porcelain=2 \ + | awk '{print "var"NR"="$3}' +# $var1 is the current commit +# $var2 is the current branch or 'detached', if not on a branch +# $var3 is the current upstream branch (if set), as in eg 'origin/opensuse-5.0' +# $var4 is not of use to us + +# TODO: What checks should be different between LATEST and non-LATEST? +# If we don't actually patch from the submodule repo, we shouldn't care about what's in the local one +# Does non-LATEST really require master? echo "WARNING: Script using local git repos. Some operations may be time consuming..." #TODO: Most of these checks are not necessary for (( i=0; i <$REPO_COUNT; i++ )); do -#POKEALL if [[ -e $(readlink -f ${LOCAL_REPO_MAP[$i]}) ]]; then if [[ -d ${LOCAL_REPO_MAP[$i]}/.git/rebase-merge || \ -d ${LOCAL_REPO_MAP[$i]}/.git/rebase-apply ]]; then echo "ERROR! Rebase appears to be in progress in ${LOCAL_REPO_MAP[$i]}. Please resolve" exit fi +# !! Does this presume the branch as indicated in config is the current branch? (I believe that's been my modus operandi to date, so perhaps THAT should be enforced at this point?) if ! git -C ${LOCAL_REPO_MAP[$i]} submodule update --init --recursive &> /dev/null; then echo "Please clean up state of local repo ${LOCAL_REPO_MAP[$i]} before using script" echo "(ensure git submodule update --init --recursive is successful)" @@ -684,7 +685,6 @@ if [ "$GIT_UPSTREAM_COMMIT_ISH" = "LATEST" ]; then fi fi fi -#POKEALL for (( i=0; i <$REPO_COUNT; i++ )); do if [[ -e $(readlink -f ${LOCAL_REPO_MAP[$i]}) ]]; then git -C ${LOCAL_REPO_MAP[$i]} remote update upstream &> /dev/null @@ -717,7 +717,7 @@ if [ "$GIT_UPSTREAM_COMMIT_ISH" = "LATEST" ]; then WRITE_LOG=0 echo "Processing LATEST upstream changes" echo "(If SUCCESS is not printed upon completion, see /tmp/latest.log for issues)" - TEMP_CHECK # DOING LATEST + TEMP_CHECK if [[ $QEMU_TARBALL =~ $BASE_RE$EXTRA_RE$SUFFIX_RE ]]; then OLD_COMMIT_ISH=${BASH_REMATCH[3]} else @@ -771,7 +771,7 @@ else # not LATEST SOURCE_VERSION=$OLD_SOURCE_VERSION_AND_EXTRA QEMU_VERSION=$(tar JxfO qemu-$SOURCE_VERSION$VERSION_EXTRA.tar.xz qemu-$SOURCE_VERSION/VERSION) if [ ! "$QEMU_VERSION" = "$OLD_SOURCE_VERSION_AND_EXTRA" ]; then - echo "Tarball name (which we decode) doesn't correspond to the VERSION file contained therein" + echo "Tarball name (which we decode) doesn't correspond to the VERSION file contained therein" exit fi MAJOR_VERSION=$(echo $QEMU_VERSION|awk -F. '{print $1}') @@ -788,7 +788,7 @@ else # not LATEST git2pkg ) echo "Updating the package using the $GIT_BRANCH branch of the local repos." echo "(If SUCCESS is not printed upon completion, see /tmp/git2pkg.log for issues)" - TEMP_CHECK #NOT LATEST + TEMP_CHECK initbundle &> /tmp/git2pkg.log bundle2spec &>> /tmp/git2pkg.log echo "SUCCESS" @@ -797,7 +797,7 @@ else # not LATEST pkg2git ) echo "Exporting the package's git bundles to the local repo's frombundle branches..." echo "(If SUCCESS is not printed upon completion, see /tmp/pkg2git.log for issues)" - TEMP_CHECK #NOT LATEST + TEMP_CHECK bundle2local &> /tmp/pkg2git.log echo "SUCCESS" echo "To modify package patches, use the frombundle branch as the basis for updating" @@ -808,7 +808,7 @@ else # not LATEST echo "Updating the spec file and patches from the spec file template and the bundle" echo "of bundles (bundles.tar.xz)" echo "(If SUCCESS is not printed upon completion, see /tmp/refresh.log for issues)" - TEMP_CHECK #NOT LATEST + TEMP_CHECK bundle2spec &> /tmp/refresh.log echo "SUCCESS" tail -9 /tmp/refresh.log diff --git a/util-add-slirp_fmt-helpers.patch b/util-add-slirp_fmt-helpers.patch deleted file mode 100644 index 8da70b1..0000000 --- a/util-add-slirp_fmt-helpers.patch +++ /dev/null @@ -1,125 +0,0 @@ -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Mon, 27 Jan 2020 10:24:09 +0100 -Subject: util: add slirp_fmt() helpers -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 30648c03b27fb8d9611b723184216cd3174b6775 -References: bsc#1163018, CVE-2020-8608 - -Various calls to snprintf() in libslirp assume that snprintf() returns -"only" the number of bytes written (excluding terminating NUL). - -https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04 - -"Upon successful completion, the snprintf() function shall return the -number of bytes that would be written to s had n been sufficiently -large excluding the terminating null byte." - -Introduce slirp_fmt() that handles several pathological cases the -way libslirp usually expect: - -- treat error as fatal (instead of silently returning -1) - -- fmt0() will always \0 end - -- return the number of bytes actually written (instead of what would -have been written, which would usually result in OOB later), including -the ending \0 for fmt0() - -- warn if truncation happened (instead of ignoring) - -Other less common cases can still be handled with strcpy/snprintf() etc. - -Signed-off-by: Marc-André Lureau -Reviewed-by: Samuel Thibault -Message-Id: <20200127092414.169796-2-marcandre.lureau@redhat.com> -Signed-off-by: Bruce Rogers ---- - src/util.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/util.h | 3 +++ - 2 files changed, 65 insertions(+) - -diff --git a/slirp/src/util.c b/slirp/src/util.c -index e5960871554e37ab67a640d2cd9b..e3b625717b0f5ef6e54756045a17 100644 ---- a/slirp/src/util.c -+++ b/slirp/src/util.c -@@ -364,3 +364,65 @@ void slirp_pstrcpy(char *buf, int buf_size, const char *str) - } - *q = '\0'; - } -+ -+static int slirp_vsnprintf(char *str, size_t size, -+ const char *format, va_list args) -+{ -+ int rv = vsnprintf(str, size, format, args); -+ -+ if (rv < 0) { -+ g_error("vsnprintf() failed: %s", g_strerror(errno)); -+ } -+ -+ return rv; -+} -+ -+/* -+ * A snprintf()-like function that: -+ * - returns the number of bytes written (excluding optional \0-ending) -+ * - dies on error -+ * - warn on truncation -+ */ -+int slirp_fmt(char *str, size_t size, const char *format, ...) -+{ -+ va_list args; -+ int rv; -+ -+ va_start(args, format); -+ rv = slirp_vsnprintf(str, size, format, args); -+ va_end(args); -+ -+ if (rv > size) { -+ g_critical("vsnprintf() truncation"); -+ } -+ -+ return MIN(rv, size); -+} -+ -+/* -+ * A snprintf()-like function that: -+ * - always \0-end (unless size == 0) -+ * - returns the number of bytes actually written, including \0 ending -+ * - dies on error -+ * - warn on truncation -+ */ -+int slirp_fmt0(char *str, size_t size, const char *format, ...) -+{ -+ va_list args; -+ int rv; -+ -+ va_start(args, format); -+ rv = slirp_vsnprintf(str, size, format, args); -+ va_end(args); -+ -+ if (rv >= size) { -+ g_critical("vsnprintf() truncation"); -+ if (size > 0) -+ str[size - 1] = '\0'; -+ rv = size; -+ } else { -+ rv += 1; /* include \0 */ -+ } -+ -+ return rv; -+} -diff --git a/slirp/src/util.h b/slirp/src/util.h -index 3c6223cecd9d881ca1a3f2d37af2..0558dfc222ec7d7b43beb2d18161 100644 ---- a/slirp/src/util.h -+++ b/slirp/src/util.h -@@ -177,4 +177,7 @@ static inline int slirp_socket_set_fast_reuse(int fd) - - void slirp_pstrcpy(char *buf, int buf_size, const char *str); - -+int slirp_fmt(char *str, size_t size, const char *format, ...); -+int slirp_fmt0(char *str, size_t size, const char *format, ...); -+ - #endif diff --git a/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch b/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch deleted file mode 100644 index 56f7aa1..0000000 --- a/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: =?UTF-8?q?Andreas=20F=C3=A4rber?= -Date: Wed, 12 Jun 2013 19:26:37 +0200 -Subject: vga: Raise VRAM to 16 MiB for pc-0.15 and below -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -References: bnc#812836 - -qemu-kvm.git commit a7fe0297840908a4fd65a1cf742481ccd45960eb -(Extend vram size to 16MB) deviated from qemu.git since kvm-61, and only -in commit 9e56edcf8dd1d4bc7ba2b1efb3641f36c0fad8ba (vga: raise default -vgamem size) did qemu.git adjust the VRAM size for v1.2. - -Add compatibility properties so that up to and including pc-0.15 we -maintain migration compatibility with qemu-kvm rather than QEMU and -from pc-1.0 on with QEMU (last qemu-kvm release was 1.2). - -Signed-off-by: Andreas Färber -[BR: adjust comma position in list in macro for v2.5.0 compat] -Signed-off-by: Bruce Rogers ---- - hw/i386/pc_piix.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index 1bd70d1abbc434edb8b5ca69ee5d..d760d3589607daf4997ea76854c4 100644 ---- a/hw/i386/pc_piix.c -+++ b/hw/i386/pc_piix.c -@@ -804,6 +804,31 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) - { - static GlobalProperty compat[] = { - PC_CPU_MODEL_IDS("0.15") -+ { -+ .driver = "VGA", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ },{ -+ .driver = "vmware-svga", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ },{ -+ .driver = "qxl-vga", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ },{ -+ .driver = "qxl", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ },{ -+ .driver = "isa-cirrus-vga", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ },{ -+ .driver = "cirrus-vga", -+ .property = "vgamem_mb", -+ .value = stringify(16), -+ }, - }; - - pc_i440fx_1_0_machine_options(m); diff --git a/vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch b/vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch deleted file mode 100644 index 07f3ac5..0000000 --- a/vhost-correctly-turn-on-VIRTIO_F_IOMMU_P.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Jason Wang -Date: Mon, 2 Mar 2020 12:24:54 +0800 -Subject: vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM - -References: bsc#1167075, bsc#1167445 - -We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on -platform without IOMMU support. This can lead unnecessary IOTLB -transactions which will damage the performance. - -Fixing this by check whether the device is backed by IOMMU and disable -device IOTLB. - -Reported-by: Halil Pasic -Tested-by: Halil Pasic -Reviewed-by: Halil Pasic -Signed-off-by: Jason Wang -Message-Id: <20200302042454.24814-1-jasowang@redhat.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -(cherry picked from commit f7ef7e6e3ba6e994e070cc609eb154339d1c4a11) -Signed-off-by: Bruce Rogers ---- - hw/virtio/vhost.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c -index 4da0d5a6c5867325cb8cacab4894..554e76434ffaf2dc9ada0d4bdd7a 100644 ---- a/hw/virtio/vhost.c -+++ b/hw/virtio/vhost.c -@@ -290,7 +290,14 @@ static int vhost_dev_has_iommu(struct vhost_dev *dev) - { - VirtIODevice *vdev = dev->vdev; - -- return virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); -+ /* -+ * For vhost, VIRTIO_F_IOMMU_PLATFORM means the backend support -+ * incremental memory mapping API via IOTLB API. For platform that -+ * does not have IOMMU, there's no need to enable this feature -+ * which may cause unnecessary IOTLB miss/update trnasactions. -+ */ -+ return vdev->dma_as != &address_space_memory && -+ virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); - } - - static void *vhost_memory_map(struct vhost_dev *dev, hwaddr addr, -@@ -762,6 +769,9 @@ static int vhost_dev_set_features(struct vhost_dev *dev, - if (enable_log) { - features |= 0x1ULL << VHOST_F_LOG_ALL; - } -+ if (!vhost_dev_has_iommu(dev)) { -+ features &= ~(0x1ULL << VIRTIO_F_IOMMU_PLATFORM); -+ } - r = dev->vhost_ops->vhost_set_features(dev, features); - if (r < 0) { - VHOST_OPS_DEBUG("vhost_set_features failed"); diff --git a/vhost-user-blk-delete-virtioqueues-in-un.patch b/vhost-user-blk-delete-virtioqueues-in-un.patch deleted file mode 100644 index 7971051..0000000 --- a/vhost-user-blk-delete-virtioqueues-in-un.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Pan Nengyuan -Date: Mon, 24 Feb 2020 12:13:35 +0800 -Subject: vhost-user-blk: delete virtioqueues in unrealize to fix memleaks - -Git-commit: 13e5468127111bf44c5dc314d1dd2ec5a65dfec4 - -virtio queues forgot to delete in unrealize, and aslo error path in -realize, this patch fix these memleaks, the leak stack is as follow: - -Direct leak of 114688 byte(s) in 16 object(s) allocated from: - #0 0x7f24024fdbf0 in calloc (/lib64/libasan.so.3+0xcabf0) - #1 0x7f2401642015 in g_malloc0 (/lib64/libglib-2.0.so.0+0x50015) - #2 0x55ad175a6447 in virtio_add_queue /mnt/sdb/qemu/hw/virtio/virtio.c:2327 - #3 0x55ad17570cf9 in vhost_user_blk_device_realize /mnt/sdb/qemu/hw/block/vhost-user-blk.c:419 - #4 0x55ad175a3707 in virtio_device_realize /mnt/sdb/qemu/hw/virtio/virtio.c:3509 - #5 0x55ad176ad0d1 in device_set_realized /mnt/sdb/qemu/hw/core/qdev.c:876 - #6 0x55ad1781ff9d in property_set_bool /mnt/sdb/qemu/qom/object.c:2080 - #7 0x55ad178245ae in object_property_set_qobject /mnt/sdb/qemu/qom/qom-qobject.c:26 - #8 0x55ad17821eb4 in object_property_set_bool /mnt/sdb/qemu/qom/object.c:1338 - #9 0x55ad177aeed7 in virtio_pci_realize /mnt/sdb/qemu/hw/virtio/virtio-pci.c:1801 - -Reported-by: Euler Robot -Signed-off-by: Pan Nengyuan -Reviewed-by: Stefan Hajnoczi -Message-Id: <20200224041336.30790-2-pannengyuan@huawei.com> -Reviewed-by: Stefan Hajnoczi -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/block/vhost-user-blk.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c -index 63da9bb619ccb30d63fa548d3078..2e59cbaa0da1e05842a62d6daf14 100644 ---- a/hw/block/vhost-user-blk.c -+++ b/hw/block/vhost-user-blk.c -@@ -455,6 +455,9 @@ reconnect: - virtio_err: - g_free(s->vqs); - g_free(s->inflight); -+ for (i = 0; i < s->num_queues; i++) { -+ virtio_del_queue(vdev, i); -+ } - virtio_cleanup(vdev); - vhost_user_cleanup(&s->vhost_user); - } -@@ -463,6 +466,7 @@ static void vhost_user_blk_device_unrealize(DeviceState *dev, Error **errp) - { - VirtIODevice *vdev = VIRTIO_DEVICE(dev); - VHostUserBlk *s = VHOST_USER_BLK(dev); -+ int i; - - virtio_set_status(vdev, 0); - qemu_chr_fe_set_handlers(&s->chardev, NULL, NULL, NULL, -@@ -471,6 +475,10 @@ static void vhost_user_blk_device_unrealize(DeviceState *dev, Error **errp) - vhost_dev_free_inflight(s->inflight); - g_free(s->vqs); - g_free(s->inflight); -+ -+ for (i = 0; i < s->num_queues; i++) { -+ virtio_del_queue(vdev, i); -+ } - virtio_cleanup(vdev); - vhost_user_cleanup(&s->vhost_user); - } diff --git a/vhost-user-gpu-Drop-trailing-json-comma.patch b/vhost-user-gpu-Drop-trailing-json-comma.patch deleted file mode 100644 index 38159d7..0000000 --- a/vhost-user-gpu-Drop-trailing-json-comma.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Cole Robinson -Date: Thu, 19 Sep 2019 16:33:44 -0400 -Subject: vhost-user-gpu: Drop trailing json comma -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: ca26b032e5a0e8a190c763ce828a8740d24b9b65 - -Trailing comma is not valid json: - -$ cat contrib/vhost-user-gpu/50-qemu-gpu.json.in | jq -parse error: Expected another key-value pair at line 5, column 1 - -Signed-off-by: Cole Robinson -Reviewed-by: Marc-André Lureau -Reviewed-by: Li Qiang -Reviewed-by: Philippe Mathieu-Daudé -Message-id: 7f5dd2ac9f3504e2699f23e69bc3d8051b729832.1568925097.git.crobinso@redhat.com -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - contrib/vhost-user-gpu/50-qemu-gpu.json.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/contrib/vhost-user-gpu/50-qemu-gpu.json.in b/contrib/vhost-user-gpu/50-qemu-gpu.json.in -index 658b545864b1acd02b1ceb8dee82..f5edd097f805b839939a7423395a 100644 ---- a/contrib/vhost-user-gpu/50-qemu-gpu.json.in -+++ b/contrib/vhost-user-gpu/50-qemu-gpu.json.in -@@ -1,5 +1,5 @@ - { - "description": "QEMU vhost-user-gpu", - "type": "gpu", -- "binary": "@libexecdir@/vhost-user-gpu", -+ "binary": "@libexecdir@/vhost-user-gpu" - } diff --git a/vhost-user-gpu-Release-memory-returned-b.patch b/vhost-user-gpu-Release-memory-returned-b.patch deleted file mode 100644 index a420705..0000000 --- a/vhost-user-gpu-Release-memory-returned-b.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Mon, 23 Mar 2020 12:29:41 +0100 -Subject: vhost-user-gpu: Release memory returned by vu_queue_pop() with free() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 4ff97121a3ee631971aadc87e3d4e7fb66f15aa8 - -vu_queue_pop() returns memory that must be freed with free(). - -Cc: qemu-stable@nongnu.org -Reported-by: Coverity (CID 1421887 ALLOC_FREE_MISMATCH) -Suggested-by: Peter Maydell -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Marc-André Lureau -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - contrib/vhost-user-gpu/main.c | 4 ++-- - contrib/vhost-user-gpu/virgl.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/contrib/vhost-user-gpu/main.c b/contrib/vhost-user-gpu/main.c -index b45d2019b46bdfac64b59d5702ae..a019d0a9acea61a7629f1c74c79a 100644 ---- a/contrib/vhost-user-gpu/main.c -+++ b/contrib/vhost-user-gpu/main.c -@@ -848,7 +848,7 @@ vg_handle_ctrl(VuDev *dev, int qidx) - QTAILQ_INSERT_TAIL(&vg->fenceq, cmd, next); - vg->inflight++; - } else { -- g_free(cmd); -+ free(cmd); - } - } - } -@@ -939,7 +939,7 @@ vg_handle_cursor(VuDev *dev, int qidx) - } - vu_queue_push(dev, vq, elem, 0); - vu_queue_notify(dev, vq); -- g_free(elem); -+ free(elem); - } - } - -diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c -index 43413e29df9d46739c09d2d501df..b0bc22c3c13db0e8b0b450dac19d 100644 ---- a/contrib/vhost-user-gpu/virgl.c -+++ b/contrib/vhost-user-gpu/virgl.c -@@ -519,7 +519,7 @@ virgl_write_fence(void *opaque, uint32_t fence) - g_debug("FENCE %" PRIu64, cmd->cmd_hdr.fence_id); - vg_ctrl_response_nodata(g, cmd, VIRTIO_GPU_RESP_OK_NODATA); - QTAILQ_REMOVE(&g->fenceq, cmd, next); -- g_free(cmd); -+ free(cmd); - g->inflight--; - } - } diff --git a/virtio-add-ability-to-delete-vq-through-.patch b/virtio-add-ability-to-delete-vq-through-.patch deleted file mode 100644 index 827b32a..0000000 --- a/virtio-add-ability-to-delete-vq-through-.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: "Michael S. Tsirkin" -Date: Mon, 9 Dec 2019 11:46:13 -0500 -Subject: virtio: add ability to delete vq through a pointer - -Git-commit: 722f8c51d8af223751dfb1d02de40043e8ba067e - -Devices tend to maintain vq pointers, allow deleting them trough a vq pointer. - -Signed-off-by: Michael S. Tsirkin -Reviewed-by: David Hildenbrand -Reviewed-by: David Hildenbrand -Signed-off-by: Bruce Rogers ---- - hw/virtio/virtio.c | 15 ++++++++++----- - include/hw/virtio/virtio.h | 2 ++ - 2 files changed, 12 insertions(+), 5 deletions(-) - -diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c -index 04716b5f6ce1ccfb3f21a5b81b77..31dd140990f784884b541b293105 100644 ---- a/hw/virtio/virtio.c -+++ b/hw/virtio/virtio.c -@@ -2330,17 +2330,22 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size, - return &vdev->vq[i]; - } - -+void virtio_delete_queue(VirtQueue *vq) -+{ -+ vq->vring.num = 0; -+ vq->vring.num_default = 0; -+ vq->handle_output = NULL; -+ vq->handle_aio_output = NULL; -+ g_free(vq->used_elems); -+} -+ - void virtio_del_queue(VirtIODevice *vdev, int n) - { - if (n < 0 || n >= VIRTIO_QUEUE_MAX) { - abort(); - } - -- vdev->vq[n].vring.num = 0; -- vdev->vq[n].vring.num_default = 0; -- vdev->vq[n].handle_output = NULL; -- vdev->vq[n].handle_aio_output = NULL; -- g_free(vdev->vq[n].used_elems); -+ virtio_delete_queue(&vdev->vq[n]); - } - - static void virtio_set_isr(VirtIODevice *vdev, int value) -diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h -index c32a815303730700e60c2ddd06c4..e18756d50d21259dda81bf1d1b1d 100644 ---- a/include/hw/virtio/virtio.h -+++ b/include/hw/virtio/virtio.h -@@ -183,6 +183,8 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size, - - void virtio_del_queue(VirtIODevice *vdev, int n); - -+void virtio_delete_queue(VirtQueue *vq); -+ - void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem, - unsigned int len); - void virtqueue_flush(VirtQueue *vq, unsigned int count); diff --git a/virtio-blk-fix-out-of-bounds-access-to-b.patch b/virtio-blk-fix-out-of-bounds-access-to-b.patch deleted file mode 100644 index e6acaa0..0000000 --- a/virtio-blk-fix-out-of-bounds-access-to-b.patch +++ /dev/null @@ -1,36 +0,0 @@ -From: Li Hangjing -Date: Mon, 16 Dec 2019 10:30:50 +0800 -Subject: virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh - -Git-commit: 725fe5d10dbd4259b1853b7d253cef83a3c0d22a - -When the number of a virtio-blk device's virtqueues is larger than -BITS_PER_LONG, the out-of-bounds access to bitmap[ ] will occur. - -Fixes: e21737ab15 ("virtio-blk: multiqueue batch notify") -Cc: qemu-stable@nongnu.org -Cc: Stefan Hajnoczi -Signed-off-by: Li Hangjing -Reviewed-by: Xie Yongji -Reviewed-by: Chai Wen -Message-id: 20191216023050.48620-1-lihangjing@baidu.com -Message-Id: <20191216023050.48620-1-lihangjing@baidu.com> -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - hw/block/dataplane/virtio-blk.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c -index 119906a5fe78dcd165f5775c42a0..1b52e8159c8d1056f56bd5f7c22f 100644 ---- a/hw/block/dataplane/virtio-blk.c -+++ b/hw/block/dataplane/virtio-blk.c -@@ -67,7 +67,7 @@ static void notify_guest_bh(void *opaque) - memset(s->batch_notify_vqs, 0, sizeof(bitmap)); - - for (j = 0; j < nvqs; j += BITS_PER_LONG) { -- unsigned long bits = bitmap[j]; -+ unsigned long bits = bitmap[j / BITS_PER_LONG]; - - while (bits != 0) { - unsigned i = j + ctzl(bits); diff --git a/virtio-crypto-do-delete-ctrl_vq-in-virti.patch b/virtio-crypto-do-delete-ctrl_vq-in-virti.patch deleted file mode 100644 index 587b5da..0000000 --- a/virtio-crypto-do-delete-ctrl_vq-in-virti.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Pan Nengyuan -Date: Tue, 25 Feb 2020 15:55:54 +0800 -Subject: virtio-crypto: do delete ctrl_vq in virtio_crypto_device_unrealize - -Git-commit: d56e1c8256cb37e68f9b5d98c6cc4e6ca463f1fd - -Similar to other virtio-deivces, ctrl_vq forgot to delete in virtio_crypto_device_unrealize, this patch fix it. -This device has aleardy maintained vq pointers. Thus, we use the new virtio_delete_queue function directly to do the cleanup. - -The leak stack: -Direct leak of 10752 byte(s) in 3 object(s) allocated from: - #0 0x7f4c024b1970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) - #1 0x7f4c018be49d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d) - #2 0x55a2f8017279 in virtio_add_queue /mnt/sdb/qemu-new/qemu_test/qemu/hw/virtio/virtio.c:2333 - #3 0x55a2f8057035 in virtio_crypto_device_realize /mnt/sdb/qemu-new/qemu_test/qemu/hw/virtio/virtio-crypto.c:814 - #4 0x55a2f8005d80 in virtio_device_realize /mnt/sdb/qemu-new/qemu_test/qemu/hw/virtio/virtio.c:3531 - #5 0x55a2f8497d1b in device_set_realized /mnt/sdb/qemu-new/qemu_test/qemu/hw/core/qdev.c:891 - #6 0x55a2f8b48595 in property_set_bool /mnt/sdb/qemu-new/qemu_test/qemu/qom/object.c:2238 - #7 0x55a2f8b54fad in object_property_set_qobject /mnt/sdb/qemu-new/qemu_test/qemu/qom/qom-qobject.c:26 - #8 0x55a2f8b4de2c in object_property_set_bool /mnt/sdb/qemu-new/qemu_test/qemu/qom/object.c:1390 - #9 0x55a2f80609c9 in virtio_crypto_pci_realize /mnt/sdb/qemu-new/qemu_test/qemu/hw/virtio/virtio-crypto-pci.c:58 - -Reported-by: Euler Robot -Signed-off-by: Pan Nengyuan -Cc: "Gonglei (Arei)" -Message-Id: <20200225075554.10835-5-pannengyuan@huawei.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/virtio/virtio-crypto.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c -index 6d42f95a890b7a58f8ba0bc75eae..b2e01fc015133decbe2dc3ee9073 100644 ---- a/hw/virtio/virtio-crypto.c -+++ b/hw/virtio/virtio-crypto.c -@@ -831,12 +831,13 @@ static void virtio_crypto_device_unrealize(DeviceState *dev, Error **errp) - - max_queues = vcrypto->multiqueue ? vcrypto->max_queues : 1; - for (i = 0; i < max_queues; i++) { -- virtio_del_queue(vdev, i); -+ virtio_delete_queue(vcrypto->vqs[i].dataq); - q = &vcrypto->vqs[i]; - qemu_bh_delete(q->dataq_bh); - } - - g_free(vcrypto->vqs); -+ virtio_delete_queue(vcrypto->ctrl_vq); - - virtio_cleanup(vdev); - cryptodev_backend_set_used(vcrypto->cryptodev, false); diff --git a/virtio-don-t-enable-notifications-during.patch b/virtio-don-t-enable-notifications-during.patch deleted file mode 100644 index 58c48b0..0000000 --- a/virtio-don-t-enable-notifications-during.patch +++ /dev/null @@ -1,145 +0,0 @@ -From: Stefan Hajnoczi -Date: Mon, 9 Dec 2019 21:09:57 +0000 -Subject: virtio: don't enable notifications during polling - -Git-commit: d0435bc513e23a4961b6af20164d1c6c219eb4ea - -Virtqueue notifications are not necessary during polling, so we disable -them. This allows the guest driver to avoid MMIO vmexits. -Unfortunately the virtio-blk and virtio-scsi handler functions re-enable -notifications, defeating this optimization. - -Fix virtio-blk and virtio-scsi emulation so they leave notifications -disabled. The key thing to remember for correctness is that polling -always checks one last time after ending its loop, therefore it's safe -to lose the race when re-enabling notifications at the end of polling. - -There is a measurable performance improvement of 5-10% with the null-co -block driver. Real-life storage configurations will see a smaller -improvement because the MMIO vmexit overhead contributes less to -latency. - -Signed-off-by: Stefan Hajnoczi -Message-Id: <20191209210957.65087-1-stefanha@redhat.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/block/virtio-blk.c | 9 +++++++-- - hw/scsi/virtio-scsi.c | 9 +++++++-- - hw/virtio/virtio.c | 12 ++++++------ - include/hw/virtio/virtio.h | 1 + - 4 files changed, 21 insertions(+), 10 deletions(-) - -diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c -index 4c357d2928ff1cfe94a601c93ffa..c4e55fb3defb711dbc39b67e00a1 100644 ---- a/hw/block/virtio-blk.c -+++ b/hw/block/virtio-blk.c -@@ -764,13 +764,16 @@ bool virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq) - { - VirtIOBlockReq *req; - MultiReqBuffer mrb = {}; -+ bool suppress_notifications = virtio_queue_get_notification(vq); - bool progress = false; - - aio_context_acquire(blk_get_aio_context(s->blk)); - blk_io_plug(s->blk); - - do { -- virtio_queue_set_notification(vq, 0); -+ if (suppress_notifications) { -+ virtio_queue_set_notification(vq, 0); -+ } - - while ((req = virtio_blk_get_request(s, vq))) { - progress = true; -@@ -781,7 +784,9 @@ bool virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq) - } - } - -- virtio_queue_set_notification(vq, 1); -+ if (suppress_notifications) { -+ virtio_queue_set_notification(vq, 1); -+ } - } while (!virtio_queue_empty(vq)); - - if (mrb.num_reqs) { -diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c -index e8b2b64d09fb185404fa83882ba9..f080545f48e6a3e411caf641b935 100644 ---- a/hw/scsi/virtio-scsi.c -+++ b/hw/scsi/virtio-scsi.c -@@ -597,12 +597,15 @@ bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq) - { - VirtIOSCSIReq *req, *next; - int ret = 0; -+ bool suppress_notifications = virtio_queue_get_notification(vq); - bool progress = false; - - QTAILQ_HEAD(, VirtIOSCSIReq) reqs = QTAILQ_HEAD_INITIALIZER(reqs); - - do { -- virtio_queue_set_notification(vq, 0); -+ if (suppress_notifications) { -+ virtio_queue_set_notification(vq, 0); -+ } - - while ((req = virtio_scsi_pop_req(s, vq))) { - progress = true; -@@ -622,7 +625,9 @@ bool virtio_scsi_handle_cmd_vq(VirtIOSCSI *s, VirtQueue *vq) - } - } - -- virtio_queue_set_notification(vq, 1); -+ if (suppress_notifications) { -+ virtio_queue_set_notification(vq, 1); -+ } - } while (ret != -EINVAL && !virtio_queue_empty(vq)); - - QTAILQ_FOREACH_SAFE(req, &reqs, next, next) { -diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c -index 31dd140990f784884b541b293105..d63a3691bf00e9d7951b2c85ef5f 100644 ---- a/hw/virtio/virtio.c -+++ b/hw/virtio/virtio.c -@@ -432,6 +432,11 @@ static void virtio_queue_packed_set_notification(VirtQueue *vq, int enable) - } - } - -+bool virtio_queue_get_notification(VirtQueue *vq) -+{ -+ return vq->notification; -+} -+ - void virtio_queue_set_notification(VirtQueue *vq, int enable) - { - vq->notification = enable; -@@ -3389,17 +3394,12 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque) - { - EventNotifier *n = opaque; - VirtQueue *vq = container_of(n, VirtQueue, host_notifier); -- bool progress; - - if (!vq->vring.desc || virtio_queue_empty(vq)) { - return false; - } - -- progress = virtio_queue_notify_aio_vq(vq); -- -- /* In case the handler function re-enabled notifications */ -- virtio_queue_set_notification(vq, 0); -- return progress; -+ return virtio_queue_notify_aio_vq(vq); - } - - static void virtio_queue_host_notifier_aio_poll_end(EventNotifier *n) -diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h -index e18756d50d21259dda81bf1d1b1d..91167f609aca8f50948b1b28fdf2 100644 ---- a/include/hw/virtio/virtio.h -+++ b/include/hw/virtio/virtio.h -@@ -226,6 +226,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id); - - void virtio_notify_config(VirtIODevice *vdev); - -+bool virtio_queue_get_notification(VirtQueue *vq); - void virtio_queue_set_notification(VirtQueue *vq, int enable); - - int virtio_queue_ready(VirtQueue *vq); diff --git a/virtio-mmio-update-queue-size-on-guest-w.patch b/virtio-mmio-update-queue-size-on-guest-w.patch deleted file mode 100644 index 04aea2a..0000000 --- a/virtio-mmio-update-queue-size-on-guest-w.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Denis Plotnikov -Date: Tue, 24 Dec 2019 11:14:46 +0300 -Subject: virtio-mmio: update queue size on guest write - -Git-commit: 1049f4c62c4070618cc5defc9963c6a17ae7a5ae - -Some guests read back queue size after writing it. -Always update the on size write otherwise they might be confused. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Denis Plotnikov -Message-Id: <20191224081446.17003-1-dplotnikov@virtuozzo.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/virtio/virtio-mmio.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c -index 94d934c44b6ca63a4d5c72258e90..1e40a74869dad64fd172e1279b25 100644 ---- a/hw/virtio/virtio-mmio.c -+++ b/hw/virtio/virtio-mmio.c -@@ -295,8 +295,9 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value, - break; - case VIRTIO_MMIO_QUEUE_NUM: - trace_virtio_mmio_queue_write(value, VIRTQUEUE_MAX_SIZE); -+ virtio_queue_set_num(vdev, vdev->queue_sel, value); -+ - if (proxy->legacy) { -- virtio_queue_set_num(vdev, vdev->queue_sel, value); - virtio_queue_update_rings(vdev, vdev->queue_sel); - } else { - proxy->vqs[vdev->queue_sel].num = value; diff --git a/virtio-net-delete-also-control-queue-whe.patch b/virtio-net-delete-also-control-queue-whe.patch deleted file mode 100644 index 58b10e8..0000000 --- a/virtio-net-delete-also-control-queue-whe.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Yuri Benditovich -Date: Thu, 26 Dec 2019 06:36:49 +0200 -Subject: virtio-net: delete also control queue when TX/RX deleted - -Git-commit: d945d9f1731244ef341f74ede93120fc9de35913 - -https://bugzilla.redhat.com/show_bug.cgi?id=1708480 -If the control queue is not deleted together with TX/RX, it -later will be ignored in freeing cache resources and hot -unplug will not be completed. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Yuri Benditovich -Message-Id: <20191226043649.14481-3-yuri.benditovich@daynix.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/net/virtio-net.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c -index db3d7c38e6feea5b7d6898389b17..f325440d0144d3388ad255b71178 100644 ---- a/hw/net/virtio-net.c -+++ b/hw/net/virtio-net.c -@@ -3101,7 +3101,8 @@ static void virtio_net_device_unrealize(DeviceState *dev, Error **errp) - for (i = 0; i < max_queues; i++) { - virtio_net_del_queue(n, i); - } -- -+ /* delete also control vq */ -+ virtio_del_queue(vdev, max_queues * 2); - qemu_announce_timer_del(&n->announce_timer, false); - g_free(n->vqs); - qemu_del_nic(n->nic); diff --git a/virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch b/virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch deleted file mode 100644 index cc668fa..0000000 --- a/virtio-pmem-do-delete-rq_vq-in-virtio_pm.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Pan Nengyuan -Date: Tue, 25 Feb 2020 15:55:53 +0800 -Subject: virtio-pmem: do delete rq_vq in virtio_pmem_unrealize -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 9861546e1dae05c5152de7d3bd14e341ecadc972 - -Similar to other virtio-devices, rq_vq forgot to delete in -virtio_pmem_unrealize, this patch fix it. This device has already -maintained a vq pointer, thus we use the new virtio_delete_queue -function directly to do the cleanup. - -Reported-by: Euler Robot -Signed-off-by: Pan Nengyuan -Message-Id: <20200225075554.10835-4-pannengyuan@huawei.com> -Reviewed-by: Philippe Mathieu-Daudé -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/virtio/virtio-pmem.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c -index c0c9395e559cf8b01878549b9f45..cad44fe0fc6231316e86c2317965 100644 ---- a/hw/virtio/virtio-pmem.c -+++ b/hw/virtio/virtio-pmem.c -@@ -130,6 +130,7 @@ static void virtio_pmem_unrealize(DeviceState *dev, Error **errp) - VirtIOPMEM *pmem = VIRTIO_PMEM(dev); - - host_memory_backend_set_mapped(pmem->memdev, false); -+ virtio_delete_queue(pmem->rq_vq); - virtio_cleanup(vdev); - } - diff --git a/virtio-update-queue-size-on-guest-write.patch b/virtio-update-queue-size-on-guest-write.patch deleted file mode 100644 index 9949564..0000000 --- a/virtio-update-queue-size-on-guest-write.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: "Michael S. Tsirkin" -Date: Fri, 13 Dec 2019 09:22:48 -0500 -Subject: virtio: update queue size on guest write - -Git-commit: d0c5f643383b9e84316f148affff368ac33d75b9 - -Some guests read back queue size after writing it. -Update the size immediatly upon write otherwise -they get confused. - -In particular this is the case for seabios. - -Reported-by: Roman Kagan -Suggested-by: Denis Plotnikov -Cc: qemu-stable@nongnu.org -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/virtio/virtio-pci.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c -index c6b47a9c7385195a9e9bed074040..e5c759e19eb57cfff1051ca03e84 100644 ---- a/hw/virtio/virtio-pci.c -+++ b/hw/virtio/virtio-pci.c -@@ -1256,6 +1256,8 @@ static void virtio_pci_common_write(void *opaque, hwaddr addr, - break; - case VIRTIO_PCI_COMMON_Q_SIZE: - proxy->vqs[vdev->queue_sel].num = val; -+ virtio_queue_set_num(vdev, vdev->queue_sel, -+ proxy->vqs[vdev->queue_sel].num); - break; - case VIRTIO_PCI_COMMON_Q_MSIX: - msix_vector_unuse(&proxy->pci_dev, diff --git a/vnc-prioritize-ZRLE-compression-over-ZLI.patch b/vnc-prioritize-ZRLE-compression-over-ZLI.patch deleted file mode 100644 index 9ba7461..0000000 --- a/vnc-prioritize-ZRLE-compression-over-ZLI.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Cameron Esfahani -Date: Mon, 20 Jan 2020 21:00:52 -0800 -Subject: vnc: prioritize ZRLE compression over ZLIB - -Git-commit: 557ba0e57200014bd4f453f6516f02b61bdfc782 - -In my investigation, ZRLE always compresses better than ZLIB so -prioritize ZRLE over ZLIB, even if the client hints that ZLIB is -preferred. - -zlib buffer is always reset in zrle_compress_data(), so using offset to -calculate next_out and avail_out is useless. - -Signed-off-by: Cameron Esfahani -Message-Id: -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - ui/vnc-enc-zrle.c | 4 ++-- - ui/vnc.c | 11 +++++++++-- - 2 files changed, 11 insertions(+), 4 deletions(-) - -diff --git a/ui/vnc-enc-zrle.c b/ui/vnc-enc-zrle.c -index 17fd28a2e2b078bd135496e75c6b..b4f71e32cfe8ca3dd645103f999d 100644 ---- a/ui/vnc-enc-zrle.c -+++ b/ui/vnc-enc-zrle.c -@@ -98,8 +98,8 @@ static int zrle_compress_data(VncState *vs, int level) - /* set pointers */ - zstream->next_in = vs->zrle->zrle.buffer; - zstream->avail_in = vs->zrle->zrle.offset; -- zstream->next_out = vs->zrle->zlib.buffer + vs->zrle->zlib.offset; -- zstream->avail_out = vs->zrle->zlib.capacity - vs->zrle->zlib.offset; -+ zstream->next_out = vs->zrle->zlib.buffer; -+ zstream->avail_out = vs->zrle->zlib.capacity; - zstream->data_type = Z_BINARY; - - /* start encoding */ -diff --git a/ui/vnc.c b/ui/vnc.c -index f94b3a257ee3add364a0b0bd5101..70bd8bf05d163e2ef0911c3b19fd 100644 ---- a/ui/vnc.c -+++ b/ui/vnc.c -@@ -2077,8 +2077,15 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) - break; - #endif - case VNC_ENCODING_ZLIB: -- vs->features |= VNC_FEATURE_ZLIB_MASK; -- vs->vnc_encoding = enc; -+ /* -+ * VNC_ENCODING_ZRLE compresses better than VNC_ENCODING_ZLIB. -+ * So prioritize ZRLE, even if the client hints that it prefers -+ * ZLIB. -+ */ -+ if ((vs->features & VNC_FEATURE_ZRLE_MASK) == 0) { -+ vs->features |= VNC_FEATURE_ZLIB_MASK; -+ vs->vnc_encoding = enc; -+ } - break; - case VNC_ENCODING_ZRLE: - vs->features |= VNC_FEATURE_ZRLE_MASK; diff --git a/vpc-Don-t-round-up-already-aligned-BAT-s.patch b/vpc-Don-t-round-up-already-aligned-BAT-s.patch deleted file mode 100644 index 98d32e8..0000000 --- a/vpc-Don-t-round-up-already-aligned-BAT-s.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Kevin Wolf -Date: Thu, 2 Apr 2020 11:36:03 +0200 -Subject: vpc: Don't round up already aligned BAT sizes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 3f6de653b946fe849330208becf79d6af7e876cb - -As reported on Launchpad, Azure apparently doesn't accept images for -upload that are not both aligned to 1 MB blocks and have a BAT size that -matches the image size exactly. - -As far as I can tell, there is no real reason why we create a BAT that -is one entry longer than necessary for aligned image sizes, so change -that. - -(Even though the condition is only mentioned as "should" in the spec and -previous products accepted larger BATs - but we'll try to maintain -compatibility with as many of Microsoft's ever-changing interpretations -of the VHD spec as possible.) - -Fixes: https://bugs.launchpad.net/bugs/1870098 -Reported-by: Tobias Witek -Signed-off-by: Kevin Wolf -Message-Id: <20200402093603.2369-1-kwolf@redhat.com> -Reviewed-by: Max Reitz -Reviewed-by: Philippe Mathieu-Daudé -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/vpc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/block/vpc.c b/block/vpc.c -index a65550298e195af52c51a31d1f9f..21b08033a6ab56115c6258b7ef3c 100644 ---- a/block/vpc.c -+++ b/block/vpc.c -@@ -835,7 +835,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf, - - /* Write the footer (twice: at the beginning and at the end) */ - block_size = 0x200000; -- num_bat_entries = (total_sectors + block_size / 512) / (block_size / 512); -+ num_bat_entries = DIV_ROUND_UP(total_sectors, block_size / 512); - - ret = blk_pwrite(blk, offset, buf, HEADER_SIZE, 0); - if (ret < 0) { diff --git a/xen-add-block-resize-support-for-xen-dis.patch b/xen-add-block-resize-support-for-xen-dis.patch index 3f800a0..4b284fc 100644 --- a/xen-add-block-resize-support-for-xen-dis.patch +++ b/xen-add-block-resize-support-for-xen-dis.patch @@ -15,10 +15,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 3 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c -index 0007ee64c75f38a2a3256f0b9462..86de57f9c6f7405bc26303065d2c 100644 +index 57d0e2804860e6776b509c5b6d6e..f9a22ec8d7d13a242775797f1e1f 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c -@@ -274,6 +274,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) +@@ -275,6 +275,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) xen_block_set_size(blockdev); diff --git a/xen-block-Fix-double-qlist-remove-and-re.patch b/xen-block-Fix-double-qlist-remove-and-re.patch deleted file mode 100644 index fe06357..0000000 --- a/xen-block-Fix-double-qlist-remove-and-re.patch +++ /dev/null @@ -1,155 +0,0 @@ -From: Anthony PERARD -Date: Mon, 6 Apr 2020 15:02:17 +0100 -Subject: xen-block: Fix double qlist remove and request leak - -Git-commit: 36d883ba0de8a281072ded2b51e0a711fd002139 - -Commit a31ca6801c02 ("qemu/queue.h: clear linked list pointers on -remove") revealed that a request was removed twice from a list, once -in xen_block_finish_request() and a second time in -xen_block_release_request() when both function are called from -xen_block_complete_aio(). But also, the `requests_inflight' counter is -decreased twice, and thus became negative. - -This is a bug that was introduced in bfd0d6366043 ("xen-block: improve -response latency"), where a `finished' list was removed. - -That commit also introduced a leak of request in xen_block_do_aio(). -That function calls xen_block_finish_request() but the request is -never released after that. - -To fix both issue, we do two changes: -- we squash finish_request() and release_request() together as we want - to remove a request from 'inflight' list to add it to 'freelist'. -- before releasing a request, we need to let the other end know the - result, thus we should call xen_block_send_response() before - releasing a request. - -The first change fixes the double QLIST_REMOVE() as we remove the extra -call. The second change makes the leak go away because if we want to -call finish_request(), we need to call a function that does all of -finish, send response, and release. - -Fixes: bfd0d6366043 ("xen-block: improve response latency") -Signed-off-by: Anthony PERARD -Message-Id: <20200406140217.1441858-1-anthony.perard@citrix.com> -Reviewed-by: Paul Durrant -[mreitz: Amended commit message as per Paul's suggestions] -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - hw/block/dataplane/xen-block.c | 48 ++++++++++++---------------------- - 1 file changed, 16 insertions(+), 32 deletions(-) - -diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c -index 3b9caeb2fa00a1f4eb338fca7a89..c4ed2870ecd779bf40eb4f3eded3 100644 ---- a/hw/block/dataplane/xen-block.c -+++ b/hw/block/dataplane/xen-block.c -@@ -64,6 +64,8 @@ struct XenBlockDataPlane { - AioContext *ctx; - }; - -+static int xen_block_send_response(XenBlockRequest *request); -+ - static void reset_request(XenBlockRequest *request) - { - memset(&request->req, 0, sizeof(request->req)); -@@ -115,23 +117,26 @@ out: - return request; - } - --static void xen_block_finish_request(XenBlockRequest *request) -+static void xen_block_complete_request(XenBlockRequest *request) - { - XenBlockDataPlane *dataplane = request->dataplane; - -- QLIST_REMOVE(request, list); -- dataplane->requests_inflight--; --} -+ if (xen_block_send_response(request)) { -+ Error *local_err = NULL; - --static void xen_block_release_request(XenBlockRequest *request) --{ -- XenBlockDataPlane *dataplane = request->dataplane; -+ xen_device_notify_event_channel(dataplane->xendev, -+ dataplane->event_channel, -+ &local_err); -+ if (local_err) { -+ error_report_err(local_err); -+ } -+ } - - QLIST_REMOVE(request, list); -+ dataplane->requests_inflight--; - reset_request(request); - request->dataplane = dataplane; - QLIST_INSERT_HEAD(&dataplane->freelist, request, list); -- dataplane->requests_inflight--; - } - - /* -@@ -246,7 +251,6 @@ static int xen_block_copy_request(XenBlockRequest *request) - } - - static int xen_block_do_aio(XenBlockRequest *request); --static int xen_block_send_response(XenBlockRequest *request); - - static void xen_block_complete_aio(void *opaque, int ret) - { -@@ -286,7 +290,6 @@ static void xen_block_complete_aio(void *opaque, int ret) - } - - request->status = request->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY; -- xen_block_finish_request(request); - - switch (request->req.operation) { - case BLKIF_OP_WRITE: -@@ -306,17 +309,8 @@ static void xen_block_complete_aio(void *opaque, int ret) - default: - break; - } -- if (xen_block_send_response(request)) { -- Error *local_err = NULL; - -- xen_device_notify_event_channel(dataplane->xendev, -- dataplane->event_channel, -- &local_err); -- if (local_err) { -- error_report_err(local_err); -- } -- } -- xen_block_release_request(request); -+ xen_block_complete_request(request); - - if (dataplane->more_work) { - qemu_bh_schedule(dataplane->bh); -@@ -420,8 +414,8 @@ static int xen_block_do_aio(XenBlockRequest *request) - return 0; - - err: -- xen_block_finish_request(request); - request->status = BLKIF_RSP_ERROR; -+ xen_block_complete_request(request); - return -1; - } - -@@ -575,17 +569,7 @@ static bool xen_block_handle_requests(XenBlockDataPlane *dataplane) - break; - }; - -- if (xen_block_send_response(request)) { -- Error *local_err = NULL; -- -- xen_device_notify_event_channel(dataplane->xendev, -- dataplane->event_channel, -- &local_err); -- if (local_err) { -- error_report_err(local_err); -- } -- } -- xen_block_release_request(request); -+ xen_block_complete_request(request); - continue; - } - diff --git a/xen-ignore-live-parameter-from-xen-save-.patch b/xen-ignore-live-parameter-from-xen-save-.patch index 6e3ccad..e3e3b49 100644 --- a/xen-ignore-live-parameter-from-xen-save-.patch +++ b/xen-ignore-live-parameter-from-xen-save-.patch @@ -27,10 +27,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c -index a71b930b91f71ed9763fcb07b525..c5cc5fed211e693723538e19850b 100644 +index c00a6807d92371380208762dc440..03ff4491a64861fcdf2b91d3ffed 100644 --- a/migration/savevm.c +++ b/migration/savevm.c -@@ -2774,7 +2774,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, +@@ -2782,7 +2782,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 controle of the images. */ diff --git a/xen_disk-Add-suse-specific-flush-disable.patch b/xen_disk-Add-suse-specific-flush-disable.patch index 01973b3..94fc4df 100644 --- a/xen_disk-Add-suse-specific-flush-disable.patch +++ b/xen_disk-Add-suse-specific-flush-disable.patch @@ -18,10 +18,10 @@ Signed-off-by: Olaf Hering 1 file changed, 12 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c -index 879fc310a4c5dfa4a7d8936f7d8e..0007ee64c75f38a2a3256f0b9462 100644 +index 99cb4c67cb09aa2bd8f12982984f..57d0e2804860e6776b509c5b6d6e 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c -@@ -743,6 +743,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id, +@@ -744,6 +744,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id, const char *mode = qdict_get_try_str(opts, "mode"); const char *direct_io_safe = qdict_get_try_str(opts, "direct-io-safe"); const char *discard_enable = qdict_get_try_str(opts, "discard-enable"); @@ -30,7 +30,7 @@ index 879fc310a4c5dfa4a7d8936f7d8e..0007ee64c75f38a2a3256f0b9462 100644 char *driver = NULL; char *filename = NULL; XenBlockDrive *drive = NULL; -@@ -812,6 +814,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, +@@ -813,6 +815,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, } }