qemu-kvm/kvm-target-s390x-fix-handli...

68 lines
2.7 KiB
Diff
Raw Permalink Normal View History

From 1acfca06f0dbbc586f0d86833196a4463dc8b8c2 Mon Sep 17 00:00:00 2001
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
Date: Tue, 23 May 2023 12:34:33 +0200
Subject: [PATCH 15/22] target/s390x: fix handling of zeroes in vfmin/vfmax
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Cédric Le Goater <clg@redhat.com>
RH-MergeRequest: 279: Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9
RH-Bugzilla: 2169308 2209605
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Commit: [14/21] 27f66691e08192a5c9f2ecbde3603c0adece4857
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
Bugzilla: https://bugzilla.redhat.com/2169308
commit 13c59eb09bd6d1fbc13f08b708226421f14a232b
Author: Ilya Leoshkevich <iii@linux.ibm.com>
Date: Wed Jul 13 20:26:10 2022 +0200
target/s390x: fix handling of zeroes in vfmin/vfmax
vfmin_res() / vfmax_res() are trying to check whether a and b are both
zeroes, but in reality they check that they are the same kind of zero.
This causes incorrect results when comparing positive and negative
zeroes.
Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)")
Co-developed-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220713182612.3780050-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
target/s390x/tcg/vec_fpu_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/s390x/tcg/vec_fpu_helper.c b/target/s390x/tcg/vec_fpu_helper.c
index 1a77993471..d1249706f9 100644
--- a/target/s390x/tcg/vec_fpu_helper.c
+++ b/target/s390x/tcg/vec_fpu_helper.c
@@ -794,7 +794,7 @@ static S390MinMaxRes vfmin_res(uint16_t dcmask_a, uint16_t dcmask_b,
default:
g_assert_not_reached();
}
- } else if (unlikely(dcmask_a & dcmask_b & DCMASK_ZERO)) {
+ } else if (unlikely((dcmask_a & DCMASK_ZERO) && (dcmask_b & DCMASK_ZERO))) {
switch (type) {
case S390_MINMAX_TYPE_JAVA:
return neg_a ? S390_MINMAX_RES_A : S390_MINMAX_RES_B;
@@ -844,7 +844,7 @@ static S390MinMaxRes vfmax_res(uint16_t dcmask_a, uint16_t dcmask_b,
default:
g_assert_not_reached();
}
- } else if (unlikely(dcmask_a & dcmask_b & DCMASK_ZERO)) {
+ } else if (unlikely((dcmask_a & DCMASK_ZERO) && (dcmask_b & DCMASK_ZERO))) {
const bool neg_a = dcmask_a & DCMASK_NEGATIVE;
switch (type) {
--
2.37.3