diff --git a/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch b/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch index cc5ada9..92a74eb 100644 --- a/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch +++ b/0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch @@ -1,10 +1,10 @@ +From e54512fe75f85640c0c73e53e6f8bd0b9d193529 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 1 Feb 2022 20:09:37 +0100 -Subject: [PATCH] target/i386: the sgx_epc_get_section stub is reachable +Subject: [PATCH 1/5] target/i386: the sgx_epc_get_section stub is reachable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Content-type: text/plain The sgx_epc_get_section stub is reachable from cpu_x86_cpuid. It should not assert, instead it should just return true just like @@ -28,3 +28,6 @@ index 26833eb233..16b1dfd90b 100644 - g_assert_not_reached(); + return true; } +-- +2.37.3 + diff --git a/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch b/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch deleted file mode 100644 index 26d8ed7..0000000 --- a/0001-tests-Disable-pci_virtio_vga-for-ppc64.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f6d5fd60f54fb9dcdc3733154637a3a214f5d5af Mon Sep 17 00:00:00 2001 -From: "Eduardo Lima (Etrunko)" -Date: Thu, 1 Sep 2022 12:43:49 -0300 -Subject: [PATCH] tests: Disable pci_virtio_vga for ppc64 - -starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest -stderr: -qemu-system-ppc64: -device virtio-vga: 'virtio-vga' is not a valid device model name -Broken pipe -../tests/qtest/libqtest.c:156: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) - -Signed-off-by: Eduardo Lima (Etrunko) ---- - tests/qtest/display-vga-test.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/qtest/display-vga-test.c b/tests/qtest/display-vga-test.c -index ace3bb28e0..628dad4cf2 100644 ---- a/tests/qtest/display-vga-test.c -+++ b/tests/qtest/display-vga-test.c -@@ -61,7 +61,7 @@ int main(int argc, char **argv) - qtest_add_func("/display/pci/multihead", pci_multihead); - qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu); - if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") || -- g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) { -+ g_str_equal(arch, "hppa")) { - qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga); - } - --- -2.37.2 - diff --git a/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch b/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch new file mode 100644 index 0000000..2172c4d --- /dev/null +++ b/0002-tests-Disable-pci_virtio_vga-for-ppc64.patch @@ -0,0 +1,32 @@ +From 2f0a0afbf915d36c39c5cfac1e31c6edc7f47bef Mon Sep 17 00:00:00 2001 +From: "Eduardo Lima (Etrunko)" +Date: Thu, 1 Sep 2022 12:43:49 -0300 +Subject: [PATCH 2/5] tests: Disable pci_virtio_vga for ppc64 + +starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest +stderr: +qemu-system-ppc64: -device virtio-vga: 'virtio-vga' is not a valid device model name +Broken pipe +../tests/qtest/libqtest.c:156: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) + +Signed-off-by: Eduardo Lima (Etrunko) +--- + tests/qtest/display-vga-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/qtest/display-vga-test.c b/tests/qtest/display-vga-test.c +index ace3bb28e0..628dad4cf2 100644 +--- a/tests/qtest/display-vga-test.c ++++ b/tests/qtest/display-vga-test.c +@@ -61,7 +61,7 @@ int main(int argc, char **argv) + qtest_add_func("/display/pci/multihead", pci_multihead); + qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu); + if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") || +- g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) { ++ g_str_equal(arch, "hppa")) { + qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga); + } + +-- +2.37.3 + diff --git a/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch b/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch index e263067..7a7ec1c 100644 --- a/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch +++ b/0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch @@ -1,7 +1,7 @@ -From ebff02a43374c1138d4f8b2c07d2088a3921c288 Mon Sep 17 00:00:00 2001 +From 5c1d2f920c14d6e8f4ac7abc62714eadaa60f228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 10 Jan 2023 12:37:14 -0500 -Subject: [PATCH 1/2] Revert "linux-user: add more compat ioctl definitions" +Subject: [PATCH 3/5] Revert "linux-user: add more compat ioctl definitions" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -27,7 +27,7 @@ Signed-off-by: Daniel P. Berrangé 1 file changed, 25 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 1f8c10f8ef..9c1e9555e1 100644 +index 24b25759be..10af5e0d8e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -111,31 +111,6 @@ @@ -63,5 +63,5 @@ index 1f8c10f8ef..9c1e9555e1 100644 #include #endif -- -2.38.1 +2.37.3 diff --git a/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch b/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch index 08f5180..43b10c7 100644 --- a/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch +++ b/0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch @@ -1,7 +1,7 @@ -From f0f11a1435802b5c8ee8337a7b0c0f337d8f9936 Mon Sep 17 00:00:00 2001 +From b40cf0a490c28d5b79e05382d061983b92a7b2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 10 Jan 2023 12:37:25 -0500 -Subject: [PATCH 2/2] Revert "linux-user: fix compat with glibc >= 2.36 +Subject: [PATCH 4/5] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -29,7 +29,7 @@ Signed-off-by: Daniel P. Berrangé 2 files changed, 20 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 9c1e9555e1..f2b7634f5e 100644 +index 10af5e0d8e..d974c76b60 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -95,25 +95,7 @@ @@ -59,10 +59,10 @@ index 9c1e9555e1..f2b7634f5e 100644 #if defined(CONFIG_FIEMAP) #include diff --git a/meson.build b/meson.build -index 175517eafd..32fed7ea6e 100644 +index 5c6b5a1c75..3172b01089 100644 --- a/meson.build +++ b/meson.build -@@ -2039,8 +2039,6 @@ config_host_data.set('HAVE_OPTRESET', +@@ -2032,8 +2032,6 @@ config_host_data.set('HAVE_OPTRESET', cc.has_header_symbol('getopt.h', 'optreset')) config_host_data.set('HAVE_IPPROTO_MPTCP', cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) @@ -72,5 +72,5 @@ index 175517eafd..32fed7ea6e 100644 # has_member config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', -- -2.38.1 +2.37.3 diff --git a/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch b/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch new file mode 100644 index 0000000..989e7eb --- /dev/null +++ b/0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch @@ -0,0 +1,45 @@ +From db788c896eb1378ebc1f20dcc4954616a7631919 Mon Sep 17 00:00:00 2001 +From: Stefan Hajnoczi +Date: Tue, 7 Feb 2023 15:37:16 -0500 +Subject: [PATCH 5/5] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF + +When a write request is converted into a write zeroes request by the +detect-zeroes= feature, it is no longer associated with an I/O buffer. +The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O +buffer and must be cleared because bdrv_co_do_pwrite_zeroes() fails with +-EINVAL when it's set. + +Fiona Ebner bisected and diagnosed this QEMU 7.2 +regression where writes containing zeroes to a blockdev with +discard=unmap,detect-zeroes=unmap fail. + +Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1404 +Fixes: e8b6535533be ("block: add BDRV_REQ_REGISTERED_BUF request flag") +Tested-by: Fiona Ebner +Cc: qemu-stable@nongnu.org +Reviewed-by: Eric Blake +Reviewed-by: Hanna Czenczek +Signed-off-by: Stefan Hajnoczi +Message-Id: <20230207203719.242926-2-stefanha@redhat.com> +(cherry picked from commit 3c5867156eb81c7c71611d078b2c5c2c863f884a) +--- + block/io.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/block/io.c b/block/io.c +index b9424024f9..bbaa0d1b2d 100644 +--- a/block/io.c ++++ b/block/io.c +@@ -2087,6 +2087,9 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child, + if (bs->detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP) { + flags |= BDRV_REQ_MAY_UNMAP; + } ++ ++ /* Can't use optimization hint with bufferless zero write */ ++ flags &= ~BDRV_REQ_REGISTERED_BUF; + } + + if (ret < 0) { +-- +2.37.3 + diff --git a/qemu.spec b/qemu.spec index d2ee4d3..7e1924e 100644 --- a/qemu.spec +++ b/qemu.spec @@ -321,7 +321,7 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 6 +%global baserelease 7 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -346,10 +346,12 @@ Source36: README.tests # Fix SGX assert Patch: 0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch -Patch: 0001-tests-Disable-pci_virtio_vga-for-ppc64.patch +Patch: 0002-tests-Disable-pci_virtio_vga-for-ppc64.patch # Fix compat with kernel-headers >= 6.1 Patch: 0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch Patch: 0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch +# Fix virtio-blk-pci detect-zeroes=unmap (RHBZ#2173357) +Patch: 0005-block-fix-detect-zeroes-with-BDRV_REQ_REGISTERED_BUF.patch BuildRequires: meson >= %{meson_version} BuildRequires: zlib-devel @@ -2779,6 +2781,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Mon Feb 27 2023 Richard W.M. Jones - 7.2.0-7 +- Fix virtio-blk-pci detect-zeroes=unmap (RHBZ#2173357) + * Tue Jan 31 2023 Stefan Hajnoczi - 7.2.0-6 - Enable libblkio