From nobody Fri May 17 01:44:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1679415456598418.63115942771765; Tue, 21 Mar 2023 09:17:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peefE-00074X-IR; Tue, 21 Mar 2023 12:16:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peeex-00072e-9m for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:28 -0400 Received: from mail.ozlabs.org ([2404:9400:2221:ea00::3] helo=gandalf.ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peeet-00084R-0G for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:25 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4PgxYb5B8Sz4xDr; Wed, 22 Mar 2023 03:16:19 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4PgxYY578zz4x1f; Wed, 22 Mar 2023 03:16:17 +1100 (AEDT) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Stefan Hajnoczi , Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH for-8.0 v2 1/3] async: Suppress GCC13 false positive in aio_bh_poll() Date: Tue, 21 Mar 2023 17:16:07 +0100 Message-Id: <20230321161609.716474-2-clg@kaod.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230321161609.716474-1-clg@kaod.org> References: <20230321161609.716474-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2404:9400:2221:ea00::3; envelope-from=SRS0=QD3Z=7N=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1679415457428100002 From: C=C3=A9dric Le Goater GCC13 reports an error : ../util/async.c: In function =E2=80=98aio_bh_poll=E2=80=99: include/qemu/queue.h:303:22: error: storing the address of local variable = =E2=80=98slice=E2=80=99 in =E2=80=98*ctx.bh_slice_list.sqh_last=E2=80=99 [-= Werror=3Ddangling-pointer=3D] 303 | (head)->sqh_last =3D &(elm)->field.sqe_next; = \ | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../util/async.c:169:5: note: in expansion of macro =E2=80=98QSIMPLEQ_INSERT= _TAIL=E2=80=99 169 | QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next); | ^~~~~~~~~~~~~~~~~~~~ ../util/async.c:161:17: note: =E2=80=98slice=E2=80=99 declared here 161 | BHListSlice slice; | ^~~~~ ../util/async.c:161:17: note: =E2=80=98ctx=E2=80=99 declared here But the local variable 'slice' is removed from the global context list in following loop of the same routine. Add a pragma to silent GCC. Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Daniel P. Berrang=C3=A9 Signed-off-by: C=C3=A9dric Le Goater --- util/async.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/util/async.c b/util/async.c index 21016a1ac7..de9b431236 100644 --- a/util/async.c +++ b/util/async.c @@ -164,7 +164,20 @@ int aio_bh_poll(AioContext *ctx) =20 /* Synchronizes with QSLIST_INSERT_HEAD_ATOMIC in aio_bh_enqueue(). */ QSLIST_MOVE_ATOMIC(&slice.bh_list, &ctx->bh_list); + + /* + * GCC13 [-Werror=3Ddangling-pointer=3D] complains that the local vari= able + * 'slice' is being stored in the global 'ctx->bh_slice_list' but the + * list is emptied before this function returns. + */ +#if !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-pointer=3D" +#endif QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next); +#if !defined(__clang__) +#pragma GCC diagnostic pop +#endif =20 while ((s =3D QSIMPLEQ_FIRST(&ctx->bh_slice_list))) { QEMUBH *bh; --=20 2.39.2 From nobody Fri May 17 01:44:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1679415475759974.9002979913266; Tue, 21 Mar 2023 09:17:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peefI-000784-Jr; Tue, 21 Mar 2023 12:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peef0-000733-W2 for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:37 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peeex-00084s-2M for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:30 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4PgxYf4Jtqz4xFS; Wed, 22 Mar 2023 03:16:22 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4PgxYc1mhbz4x1f; Wed, 22 Mar 2023 03:16:19 +1100 (AEDT) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Thomas Huth , Richard Henderson , David Hildenbrand , Ilya Leoshkevich , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH for-8.0 v2 2/3] target/s390x: Fix float_comp_to_cc() prototype Date: Tue, 21 Mar 2023 17:16:08 +0100 Message-Id: <20230321161609.716474-3-clg@kaod.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230321161609.716474-1-clg@kaod.org> References: <20230321161609.716474-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=150.107.74.76; envelope-from=SRS0=QD3Z=7N=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1679415477950100003 From: C=C3=A9dric Le Goater GCC13 reports an error : ../target/s390x/tcg/fpu_helper.c:123:5: error: conflicting types for =E2=80= =98float_comp_to_cc=E2=80=99 due to enum/integer mismatch; have =E2=80=98in= t(CPUS390XState *, FloatRelation)=E2=80=99 {aka =E2=80=98int(struct CPUArch= State *, FloatRelation)=E2=80=99} [-Werror=3Denum-int-mismatch] 123 | int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compar= e) | ^~~~~~~~~~~~~~~~ In file included from ../target/s390x/tcg/fpu_helper.c:23: ../target/s390x/s390x-internal.h:302:5: note: previous declaration of =E2= =80=98float_comp_to_cc=E2=80=99 with type =E2=80=98int(CPUS390XState *, int= )=E2=80=99 {aka =E2=80=98int(struct CPUArchState *, int)=E2=80=99} 302 | int float_comp_to_cc(CPUS390XState *env, int float_compare); | ^~~~~~~~~~~~~~~~ Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Ilya Leoshkevich Fixes: 71bfd65c5f ("softfloat: Name compare relation enum") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/s390x/s390x-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 5d4361d35b..825252d728 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -11,6 +11,7 @@ #define S390X_INTERNAL_H =20 #include "cpu.h" +#include "fpu/softfloat.h" =20 #ifndef CONFIG_USER_ONLY typedef struct LowCore { @@ -299,7 +300,7 @@ uint32_t set_cc_nz_f128(float128 v); uint8_t s390_softfloat_exc_to_ieee(unsigned int exc); int s390_swap_bfp_rounding_mode(CPUS390XState *env, int m3); void s390_restore_bfp_rounding_mode(CPUS390XState *env, int old_mode); -int float_comp_to_cc(CPUS390XState *env, int float_compare); +int float_comp_to_cc(CPUS390XState *env, FloatRelation float_compare); =20 #define DCMASK_ZERO 0x0c00 #define DCMASK_NORMAL 0x0300 --=20 2.39.2 From nobody Fri May 17 01:44:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1679415493259826.5974557637225; Tue, 21 Mar 2023 09:18:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peefI-00077p-E8; Tue, 21 Mar 2023 12:16:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peef4-00073F-Oo for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:39 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peeey-00085B-TU for qemu-devel@nongnu.org; Tue, 21 Mar 2023 12:16:31 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4PgxYh3DLsz4xFT; Wed, 22 Mar 2023 03:16:24 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4PgxYg0vG1z4x1f; Wed, 22 Mar 2023 03:16:22 +1100 (AEDT) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Daniel Henrique Barboza Subject: [PATCH for-8.0 v2 3/3] target/ppc: Fix helper_pminsn() prototype Date: Tue, 21 Mar 2023 17:16:09 +0100 Message-Id: <20230321161609.716474-4-clg@kaod.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230321161609.716474-1-clg@kaod.org> References: <20230321161609.716474-1-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=150.107.74.76; envelope-from=SRS0=QD3Z=7N=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1679415493781100003 From: C=C3=A9dric Le Goater GCC13 reports an error: ../target/ppc/excp_helper.c:2625:6: error: conflicting types for =E2=80=98h= elper_pminsn=E2=80=99 due to enum/integer mismatch; have =E2=80=98void(CPUP= PCState *, powerpc_pm_insn_t)=E2=80=99 {aka =E2=80=98void(struct CPUArchSta= te *, powerpc_pm_insn_t)=E2=80=99} [-Werror=3Denum-int-mismatch] 2625 | void helper_pminsn(CPUPPCState *env, powerpc_pm_insn_t insn) | ^~~~~~~~~~~~~ In file included from /home/legoater/work/qemu/qemu.git/include/qemu/osdep.= h:49, from ../target/ppc/excp_helper.c:19: /home/legoater/work/qemu/qemu.git/include/exec/helper-head.h:23:27: note: p= revious declaration of =E2=80=98helper_pminsn=E2=80=99 with type =E2=80=98v= oid(CPUArchState *, uint32_t)=E2=80=99 {aka =E2=80=98void(CPUArchState *, u= nsigned int)=E2=80=99} 23 | #define HELPER(name) glue(helper_, name) | ^~~~~~~ Cc: Daniel Henrique Barboza Fixes: 7778a575c7 ("ppc: Add P7/P8 Power Management instructions") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- target/ppc/excp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 287659c74d..199328f4b6 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -2622,7 +2622,7 @@ void helper_scv(CPUPPCState *env, uint32_t lev) } } =20 -void helper_pminsn(CPUPPCState *env, powerpc_pm_insn_t insn) +void helper_pminsn(CPUPPCState *env, uint32_t insn) { CPUState *cs; =20 --=20 2.39.2