From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195581000297.54379838673765; Mon, 29 Nov 2021 06:19:41 -0800 (PST) Received: from localhost ([::1]:32842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhVL-0007hL-1q for importer@patchew.org; Mon, 29 Nov 2021 09:19:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLk-0001Fz-3a for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:44 -0500 Received: from [2a00:1450:4864:20::32d] (port=37612 helo=mail-wm1-x32d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLd-0006Tx-3C for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:43 -0500 Received: by mail-wm1-x32d.google.com with SMTP id k37-20020a05600c1ca500b00330cb84834fso16939732wms.2 for ; Mon, 29 Nov 2021 06:09:36 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e18sm14076042wrs.48.2021.11.29.06.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 07FB91FF98; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1TZ8swcyv0OX5mGYSW/yBjqG9DvFKB22CAAKdZIQEUc=; b=XzTav9bFvkmOT9bE9OZXiGyVLDbkGEJGdCpu9RVRwVcuUqoaxF+zCQoeemiXnPLNrx 2P9gTsTEuxj3wnMkmjp9oNT7rBx4xt5ta/Hf4+9zB3XjmM2vUckTSwI+R7aHdN8EmgSG eseAL95sZbsciQkKAJRZRaircLMNK/2u7TwK37aBdV/EoejgIcGxmRIzNwMJMR34YsrU bQZZlNfffMMshRsMglo2/HiKbhxabRmPvqcZ5p3+ubMlV0J+yiR/uP5/6UjfWnaAUyRA hOmfmBYsAAOwLzAO2d0ilSKYO11KALHO3WqLlXIbmyvSfFm+Vk/S9zj3ASp7GE2jdCQj Pdcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1TZ8swcyv0OX5mGYSW/yBjqG9DvFKB22CAAKdZIQEUc=; b=gILoIgYTbnVRJghHGNMD2ShbnPgTUMMaOytBt5urXLxC1lgZqMeZD2x3TL22JB8wmR lQmMAqUL4WOYn9KdLD3OkBQzEiivHtva73Q34ng817tWdzT2HNtDOCAKKC0ARPlN08Ju pi/Hrq0NuXNR7kQ5kt3OXp660EpDl01ZlWZaqA5VoW9gMYbc8ec5uTrZF4kEKljf4k/G S156GyOSOacwgCJJDFk/PvoNc0aYhOsaqS94LFSDlN0YkUWhJje85s1zWyR4VGwXrHLb STTUBS0ke4NBq4E7zbN+wudKcLSEt6oxlQI3NFBOqwdQ0IWReuGEtZyq+o0mfujItSqe LMkA== X-Gm-Message-State: AOAM5321OUfyYZwN+ozoRNt8UAYovEPCYs9UOAmqwHbNVVI1KKEBsVVK SIZLo5A0JRn7l4gwrL2sSkgqGQ== X-Google-Smtp-Source: ABdhPJxx5Hvw9vCKu/PqzgZaxHQw7FyQSEcBiW3/yvNy9Pr7Vm5aZyWV60xyvaA3LGa7lXM5cW8ZtQ== X-Received: by 2002:a05:600c:24d:: with SMTP id 13mr36711515wmj.156.1638194975097; Mon, 29 Nov 2021 06:09:35 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 1/8] accel/tcg: introduce CF_NOIRQ Date: Mon, 29 Nov 2021 14:09:25 +0000 Message-Id: <20211129140932.4115115-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32d (failed) 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=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, Richard Henderson , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195582124100001 Here we introduce a new compiler flag to disable the checking of exit request (icount_decr.u32). This is useful when we want to ensure the next block cannot be preempted by an asynchronous event. Suggested-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- v2 - split from larger patch - reword the check in cpu_handle_interrupt and scope to CF_NOIRQ only --- include/exec/exec-all.h | 1 + include/exec/gen-icount.h | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 6bb2a0f7ec..35d8e93976 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -503,6 +503,7 @@ struct TranslationBlock { #define CF_USE_ICOUNT 0x00020000 #define CF_INVALID 0x00040000 /* TB is stale. Set with @jmp_lock hel= d */ #define CF_PARALLEL 0x00080000 /* Generate code for a parallel contex= t */ +#define CF_NOIRQ 0x00100000 /* Generate an uninterruptible TB */ #define CF_CLUSTER_MASK 0xff000000 /* Top 8 bits are cluster ID */ #define CF_CLUSTER_SHIFT 24 =20 diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 610cba58fe..c57204ddad 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -21,7 +21,6 @@ static inline void gen_tb_start(const TranslationBlock *t= b) { TCGv_i32 count; =20 - tcg_ctx->exitreq_label =3D gen_new_label(); if (tb_cflags(tb) & CF_USE_ICOUNT) { count =3D tcg_temp_local_new_i32(); } else { @@ -42,7 +41,19 @@ static inline void gen_tb_start(const TranslationBlock *= tb) icount_start_insn =3D tcg_last_op(); } =20 - tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); + /* + * Emit the check against icount_decr.u32 to see if we should exit + * unless we suppress the check with CF_NOIRQ. If we are using + * icount and have suppressed interruption the higher level code + * should have ensured we don't run more instructions than the + * budget. + */ + if (tb_cflags(tb) & CF_NOIRQ) { + tcg_ctx->exitreq_label =3D NULL; + } else { + tcg_ctx->exitreq_label =3D gen_new_label(); + tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); + } =20 if (tb_cflags(tb) & CF_USE_ICOUNT) { tcg_gen_st16_i32(count, cpu_env, @@ -74,8 +85,10 @@ static inline void gen_tb_end(const TranslationBlock *tb= , int num_insns) tcgv_i32_arg(tcg_constant_i32(num_insns))); } =20 - gen_set_label(tcg_ctx->exitreq_label); - tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); + if (tcg_ctx->exitreq_label) { + gen_set_label(tcg_ctx->exitreq_label); + tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); + } } =20 #endif --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638196071655894.0938465675628; Mon, 29 Nov 2021 06:27:51 -0800 (PST) Received: from localhost ([::1]:51348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhdG-0003eo-KV for importer@patchew.org; Mon, 29 Nov 2021 09:27:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLk-0001GV-EY for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:44 -0500 Received: from [2a00:1450:4864:20::330] (port=54026 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLg-0006UH-Ut for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:43 -0500 Received: by mail-wm1-x330.google.com with SMTP id y196so14717240wmc.3 for ; Mon, 29 Nov 2021 06:09:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 38sm14401536wrc.1.2021.11.29.06.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 190571FF99; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LlhZwpKu414qJjgz6hLLraIgHgqCtfsJisAg9+N5jK4=; b=OLwx4sjA/j7DFPqmSLfmbswiuHGD7oRD2oFnlk84GP0iKlCif3nKCnUpCQ2LJUyEaU +btb+Jam5gGNPZTT8FENuNPKlPedGMBe5VYEKAfKcUcPCB6UNIw8zqFx1vYePcfXAlwS kMiC4D2h8gV9oYi2FczCsstL7NyY14IbffYIYUymf3LpSWBF96cjkuOTaylXgzl/dqlN pZAY2wEycWrUxi77uMbB5a9JpTQ9X2ng6U/NH2ILUsqL+HbKwTPFtpnr+htqB+zBVeNt dlE3sjJUmDqz1obuTUqb8/JgtCV07d/bTvVtjh2FGOu+JRIvZshkkNagHZhV7ci98yOE q27g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LlhZwpKu414qJjgz6hLLraIgHgqCtfsJisAg9+N5jK4=; b=EA9m+6yXC8IePo1wmDAXTZF6+WiqTqD/H3KK7cMXjy7O7bgPVmUcBSY0wzwY5Bdc8V MYqo4bK8BwWsmUDctpq7IroF05g7nqYfYvBM99GAbi0Rn+GaW8Uv8un1HkjWhW4pJTFB zJPJLDFyDgUwKa0tytOHRAUoTfoPe36a9UMn+tWkr41Y+5Ww7N7m/DqzKSuMNN3vh4H9 IL7RqfeNl3NYlwPKuPmcJDkzgEx2ULUnfNcLTiGEDhUImVDjaPFo1Mkm7FQsQHWhcXJl CnwND2obfR0ZVRjMJIUteOICvQfH00PqUzRhUrHvFNILg0DXEDkAwln9WN+Rzy8vOoXG 7cwQ== X-Gm-Message-State: AOAM530sqzqtZVdZFEEsLuWTfKOnYZFJv3jt/BSEAP5XZLqz6xuvlvfB QzFNg+5Erq1wlS+cgJ2S6LrUCw== X-Google-Smtp-Source: ABdhPJyaVxR7rE/TymKJl93phAjnRnkXwy+xvX8t6E/N/ZEq6NEXWXXict4cI4CvmkRFE1ye9C+WfA== X-Received: by 2002:a1c:4d15:: with SMTP id o21mr36414545wmh.171.1638194977979; Mon, 29 Nov 2021 06:09:37 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 2/8] accel/tcg: suppress IRQ check for special TBs Date: Mon, 29 Nov 2021 14:09:26 +0000 Message-Id: <20211129140932.4115115-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) 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=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, David Hildenbrand , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , f4bug@amsat.org, Peter Xu , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638196073693100002 When we set cpu->cflags_next_tb it is because we want to carefully control the execution of the next TB. Currently there is a race that causes the second stage of watchpoint handling to get ignored if an IRQ is processed before we finish executing the instruction that triggers the watchpoint. Use the new CF_NOIRQ facility to avoid the race. We also suppress IRQs when handling precise self modifying code to avoid unnecessary bouncing. Signed-off-by: Alex Benn=C3=A9e Cc: Pavel Dovgalyuk Fixes: https://gitlab.com/qemu-project/qemu/-/issues/245 Reviewed-by: Richard Henderson --- v2 - split the CF_NOIRQ implementation - only apply CF_NOIRQ for watchpoints/SMC handling - minor reword of commit v3 - add additional two cases of | CF_NOIRQ --- accel/tcg/cpu-exec.c | 9 +++++++++ accel/tcg/translate-all.c | 4 ++-- softmmu/physmem.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2d14d02f6c..409ec8c38c 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -721,6 +721,15 @@ static inline bool need_replay_interrupt(int interrupt= _request) static inline bool cpu_handle_interrupt(CPUState *cpu, TranslationBlock **last_tb) { + /* + * If we have requested custom cflags with CF_NOIRQ we should + * skip checking here. Any pending interrupts will get picked up + * by the next TB we execute under normal cflags. + */ + if (cpu->cflags_next_tb !=3D -1 && cpu->cflags_next_tb & CF_NOIRQ) { + return false; + } + /* Clear the interrupt flag now since we're processing * cpu->interrupt_request and cpu->exit_request. * Ensure zeroing happens before reading cpu->exit_request or diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index bd0bb81d08..bd71db59a9 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1738,7 +1738,7 @@ tb_invalidate_phys_page_range__locked(struct page_col= lection *pages, if (current_tb_modified) { page_collection_unlock(pages); /* Force execution of one insn next time. */ - cpu->cflags_next_tb =3D 1 | curr_cflags(cpu); + cpu->cflags_next_tb =3D 1 | CF_NOIRQ | curr_cflags(cpu); mmap_unlock(); cpu_loop_exit_noexc(cpu); } @@ -1906,7 +1906,7 @@ static bool tb_invalidate_phys_page(tb_page_addr_t ad= dr, uintptr_t pc) #ifdef TARGET_HAS_PRECISE_SMC if (current_tb_modified) { /* Force execution of one insn next time. */ - cpu->cflags_next_tb =3D 1 | curr_cflags(cpu); + cpu->cflags_next_tb =3D 1 | CF_NOIRQ | curr_cflags(cpu); return true; } #endif diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 314f8b439c..3524c04c2a 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -912,7 +912,7 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, va= ddr len, */ if (!cpu->can_do_io) { /* Force execution of one insn next time. */ - cpu->cflags_next_tb =3D 1 | CF_LAST_IO | curr_cflags(c= pu); + cpu->cflags_next_tb =3D 1 | CF_LAST_IO | CF_NOIRQ | cu= rr_cflags(cpu); cpu_loop_exit_restore(cpu, ra); } /* @@ -946,7 +946,7 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, va= ddr len, cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ - cpu->cflags_next_tb =3D 1 | CF_LAST_IO | curr_cflags(cpu); + cpu->cflags_next_tb =3D 1 | CF_LAST_IO | CF_NOIRQ | curr_c= flags(cpu); mmap_unlock(); cpu_loop_exit_noexc(cpu); } --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195839292746.6122166989172; Mon, 29 Nov 2021 06:23:59 -0800 (PST) Received: from localhost ([::1]:40286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhZW-0004MK-9w for importer@patchew.org; Mon, 29 Nov 2021 09:23:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLk-0001Hc-Fi for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:44 -0500 Received: from [2a00:1450:4864:20::32c] (port=38840 helo=mail-wm1-x32c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLh-0006UV-2a for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:44 -0500 Received: by mail-wm1-x32c.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso16924038wms.3 for ; Mon, 29 Nov 2021 06:09:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m20sm22730587wmq.11.2021.11.29.06.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 32BF01FF9A; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ouEp36joxnPAP6ToPpz7+NhGlX24uSLIBMD0iYKDcl0=; b=kYQG87QHMlgrKeUfuE59nUCz0/d/vQyrkkFElPWhW1yUCLwtnGwjHKVprUpZKQWqp1 dUmCd48nyt7P0lERtCw9MP07OKxJLeT9NToKjLr1XkGIhzcn0fTW6ra1OWfUhByT5jtI 1cYEOaqEzA/czAgGHTAPrjcije0y8sqfoQhc84E3ZqWj5SLkglcyPROyFXjqmUCGsG8V w35rc7h2ChfnZbpUt5OmIDzhDIZIDFnq/XrgmivGFESJlPVeZKFH/BWrIxQXnBQ/fbBx SqAH3t+dc8J5lHi9ijGDXg2KYnu754iLXDccm4bwKu+hvN0LnDcl8z6puFYcXysI4roB dcvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ouEp36joxnPAP6ToPpz7+NhGlX24uSLIBMD0iYKDcl0=; b=nEX3SoppvmLi5ggm08PqUMz8j/vw8YgBKoZNYH8HrDBeUGx/adT7o5dA0QTfOx5X82 9OMjRltKLS6lSXHKt3kv399T0yFUiYPJRtnzTmWPFGEvAwMzmW+f8/Nk27PRtg8NH2MH Z/Qt7VkpbJ86RFy4T+A7eSOVyC0w2S+wBrgO6MGbiTAkYAxlVTgfTN/BxvpVCsBGw4Df XmTIPQ8HoVW9zH3CcrY8nPqzaT+Dme9DXrBmY/mpQgBwaWMS3TP4BEQZRK9EvEVaVnxT aaplZxY4St1neyX6ra9OxoK+fWU1mal0qQeE8pB7eU5ygu0olDKaw7BMcIm/eqTKYqus o1pQ== X-Gm-Message-State: AOAM532d6J012i42DimmfqABjemPSfmvzOV7TLpOtNM15zRN7Zv4+vZ8 svcP9WUY2DOchAX1+PEfWFr5Gg== X-Google-Smtp-Source: ABdhPJxF8RYdZRo+FTnHzyp1+NvWWpI3+hK0EYkvnyYETKodHytyiF69FMah+yB9exxYTs+5EKyW+g== X-Received: by 2002:a1c:770e:: with SMTP id t14mr35829986wmi.173.1638194979787; Mon, 29 Nov 2021 06:09:39 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 3/8] tests/avocado: fix tcg_plugin mem access count test Date: Mon, 29 Nov 2021 14:09:27 +0000 Message-Id: <20211129140932.4115115-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32c (failed) 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=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, Beraldo Leal , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , f4bug@amsat.org, Wainer dos Santos Moschetta , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, Mahmoud Mandour , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195840727100001 When we cleaned up argument handling the test was missed. Fixes: 5ae589faad ("tests/plugins/mem: introduce "track" arg and make args = not positional") Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211123205729.2205806-4-alex.bennee@linaro.org> --- tests/avocado/tcg_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py index 9ca1515c3b..642d2e49e3 100644 --- a/tests/avocado/tcg_plugins.py +++ b/tests/avocado/tcg_plugins.py @@ -131,7 +131,7 @@ def test_aarch64_virt_mem_icount(self): suffix=3D".log") =20 self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libmem.so,arg=3Dboth", plugin_log.name, + "tests/plugin/libmem.so,inline=3Dtrue,callback=3Dtrue"= , plugin_log.name, console_pattern, args=3D('-icount', 'shift=3D1')) =20 --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195495688986.6977849938303; Mon, 29 Nov 2021 06:18:15 -0800 (PST) Received: from localhost ([::1]:57894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhTx-0005W0-F7 for importer@patchew.org; Mon, 29 Nov 2021 09:18:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLi-0001BW-QH for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:42 -0500 Received: from [2a00:1450:4864:20::42f] (port=40936 helo=mail-wr1-x42f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLd-0006Ty-31 for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:42 -0500 Received: by mail-wr1-x42f.google.com with SMTP id t9so20122477wrx.7 for ; Mon, 29 Nov 2021 06:09:36 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y7sm13646852wrw.55.2021.11.29.06.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4AF141FF9B; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IBnkomQJkxbzzpqUI0StuDJRpi3gzRMQ5u3DHeZjNiQ=; b=nxyGWxtk/O1klH5UIHZvtFe9ZKeXj+mHD+0nrRvVgeyWhJELmQNnnuZVDwyhXid3MD Vuch5psX6dmXOyoD/PeEZPySI86MI1Gvr0Dajx0LEdOHNm54FUl08+i+JDkIORHxx5Bs Y8+bTl8UF6xTC2gaY965Z17QUezOxCv4n72O9TU8RhkZdYnogq1aKrUm4Qmkkb69Psko 8OiDp08xjBrMxkSlOyPto1j2yeVjtWZ6Ew8TFrlB6Thy9/PTwGOEJJMpBI9R+rMlr6NL xxVREAr3kmMn9UNSj9McTNH+f2df2s6nHKwlYIN+p+Ck22JHuiU6icPW3DAyDvAlIV7i Ybnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IBnkomQJkxbzzpqUI0StuDJRpi3gzRMQ5u3DHeZjNiQ=; b=W0gtoEKXyGmYW2qsWKGk2NwCza+JkK3OqeVaWVl5cm1jhKOw5Okc41OBJLfxRyAkO4 w8UEqsvnQS+yIRfvUcCDqM49z9w7pOIx/tYB8SiyAAd/z/Ald+64Bn+x3KkLOTOVYI8n WHXS3JKZT7ez5l2kKpAKjVxvEKcnQwup+Mcm4C3gEiX+EEcpWcnM72RIEEDMA670QcY/ T40/6ogDrSDlrgxj3RkobZ05MV7d7TCL+S3gfUTMfi54qsCQPQdmEMLLgRDsDSHGDNTQ Uo5zYnLrx6XYTes8TYO59zif97TpEP/dL2/zpe5qZ48EkXGrXax1HHfB0VTjhjnR1SgL plGQ== X-Gm-Message-State: AOAM5302yGqzjaBWa4flY6P2ALzF2tvEknLT0l+iqeWIP9pDm8f1EW/5 ccJZoF19/+dFD8tZdADI+nfMhw== X-Google-Smtp-Source: ABdhPJwFojI9lEDiTTrHKUixFph7LMHXLxw28NwQZbNSFOg2Y6+pjeiEDPiTg//nmHOkJwA2y+XJ9w== X-Received: by 2002:a5d:52c2:: with SMTP id r2mr34699012wrv.548.1638194975597; Mon, 29 Nov 2021 06:09:35 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 4/8] plugins/meson.build: fix linker issue with weird paths Date: Mon, 29 Nov 2021 14:09:28 +0000 Message-Id: <20211129140932.4115115-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42f (failed) 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=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, Stefan Weil , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, Mahmoud Mandour , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195497257000001 Signed-off-by: Alex Benn=C3=A9e Tested-by: Stefan Weil Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211123205729.2205806-5-alex.bennee@linaro.org> --- plugins/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/meson.build b/plugins/meson.build index aeb386ebae..b3de57853b 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -2,9 +2,9 @@ plugin_ldflags =3D [] # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host - plugin_ldflags =3D ['-Wl,--dynamic-list=3D' + (meson.project_build_roo= t() / 'qemu-plugins-ld.symbols')] + plugin_ldflags =3D ['-Wl,--dynamic-list=3Dqemu-plugins-ld.symbols'] elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags =3D ['-Wl,-exported_symbols_list,' + (meson.project_bui= ld_root() / 'qemu-plugins-ld64.symbols')] + plugin_ldflags =3D ['-Wl,-exported_symbols_list,qemu-plugins-ld64.symb= ols'] endif endif =20 --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195611616569.6715708842423; Mon, 29 Nov 2021 06:20:11 -0800 (PST) Received: from localhost ([::1]:33712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhVq-0008Ig-5S for importer@patchew.org; Mon, 29 Nov 2021 09:20:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLo-0001Vh-TD for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:48 -0500 Received: from [2a00:1450:4864:20::42e] (port=39855 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLm-0006Wh-R1 for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:48 -0500 Received: by mail-wr1-x42e.google.com with SMTP id a18so37122846wrn.6 for ; Mon, 29 Nov 2021 06:09:46 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z6sm19448585wmp.9.2021.11.29.06.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5770B1FF9C; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bUO0SB+BMTWj4cM859jVLA0edAg0vIZYqctggby2tKg=; b=vBCptxwGyZhz+7Y8v8Q0Z2bHKlAj7rmBwo+/nSQALIhXMZakiGhxHXs8e5PLgeY/CD fcBzwfA/ySpJEx3QFx/B+d6EiQ/JuKwDV+mIeKGzeFwrkFsPeNs77bA9E6m01c08c4zA eA1xDfiGzHPOpyNhEdBc95Drx+h4hJpvkqGJAl2MgSfHf9GkaSy/m+iCgP5jIAI5RnQ3 YIrgunHiIdbpEb+i/BmNAYySHkWg8C2ApS8Q6GwgNVcdgBwKkEibV9Y/F724jTHJ+Xmb OAqcZRzBqiLrqDUcHzZyRrpRdg6iHiDRj4qp9If/zkckERTTgWS6kviNyYjjFdBUoTij YnWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bUO0SB+BMTWj4cM859jVLA0edAg0vIZYqctggby2tKg=; b=aVC6kgG0fIHEHfVmp4CG/JO8qfyXqzne0BQXW6FpWVlYddgy2y6wZHo5k8zk61E7YZ /UPUR30cR2OerBaIZzd6qYYJSCXXhPAQnAURMrGdjx0mnAiPUsSOaoduCaX8kDFJ9gTP YkuO5TWvSlcsqopBevZWjWvRxzvmVKL3UXmc4rZQ0Jg+zXpm06PPTjfS0P9iSqxDyrCF XnrkcVsR1dZ2jbN2MVlNkhXoAqU5H6aM9HnhN8nibs2C2lUepKJyFFAoTuOQgqJ7M+4+ BNOMcOe98li9xiyUAKS07I56lllGaYqQhmIJtH+uQX+PRbdpBIZQOihCPWR0ZOuTEgTV 8Kcg== X-Gm-Message-State: AOAM531y+18jPq5IPzPBkffa196YHFnVvQsXcV15z8Q3ZjBLxAw1Jrm5 TS+KZpadgx9MFynxhvVnaXR7Kg== X-Google-Smtp-Source: ABdhPJx/Ja9GIiHDidkVDdzREuv+4AfVAkXrd03v3G6Oe/Lcfih2eRQR6FWXeIXkNm3qF9Tlr8LREA== X-Received: by 2002:adf:ef52:: with SMTP id c18mr34807909wrp.162.1638194985251; Mon, 29 Nov 2021 06:09:45 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 5/8] gdbstub: handle a potentially racing TaskState Date: Mon, 29 Nov 2021 14:09:29 +0000 Message-Id: <20211129140932.4115115-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) 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=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195612280100001 When dealing with multi-threaded userspace programs there is a race condition with the addition of cpu->opaque (aka TaskState). This is due to cpu_copy calling cpu_create which updates the global vCPU list. However the task state isn't set until later. This shouldn't be a problem because the new thread can't have executed anything yet but the gdbstub code does liberally iterate through the CPU list in various places. This sticking plaster ensure the not yet fully realized vCPU is given an pid of -1 which should be enough to ensure it doesn't show up anywhere else. In the longer term I think the code that manages the association between vCPUs and attached GDB processes could do with a clean-up and re-factor. Signed-off-by: Alex Benn=C3=A9e Tested-by: Richard Henderson Reviewed-by: Richard Henderson Cc: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/730 Message-Id: <20211123205729.2205806-6-alex.bennee@linaro.org> --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index 23baaef40e..141d7bc4ec 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -94,7 +94,7 @@ static inline int cpu_gdb_index(CPUState *cpu) { #if defined(CONFIG_USER_ONLY) TaskState *ts =3D (TaskState *) cpu->opaque; - return ts->ts_tid; + return ts ? ts->ts_tid : -1; #else return cpu->cpu_index + 1; #endif --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195958526544.2243038011247; Mon, 29 Nov 2021 06:25:58 -0800 (PST) Received: from localhost ([::1]:45318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhbR-0007wI-EJ for importer@patchew.org; Mon, 29 Nov 2021 09:25:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLp-0001Yv-Lf for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:53 -0500 Received: from [2a00:1450:4864:20::42a] (port=33725 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLj-0006Vi-E4 for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:49 -0500 Received: by mail-wr1-x42a.google.com with SMTP id d24so37159562wra.0 for ; Mon, 29 Nov 2021 06:09:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b13sm10506295wrh.32.2021.11.29.06.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6D7E71FF9D; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/izHlYo1eDjiSDXKoXYRwJfwLHOfDK99Sn/yTJcOteo=; b=hyknblUAE5zpHyqPYon6KtwVJxni6A1aDV5KaSx92becnD0Sh4ugKRu8lD2SPjzJC0 1NhPXvUqVK4eB41/smwqdnDjMgTFwk5do1NnYjGW8eM3+qqBEjCUlseNs1RZS564mgQZ Bi1xevqc77l81w/UNo3VGAJ+UHIjZ/K0bvdNQkj8lDzY4msjgEhupqDFnhga9K+cROSe w23LJ5MBu8y9oTBoouBXCcbCmV8+DvgkDxxaUS+pmy60oWQdLbbGCTAvDHUwoikx9HfD tZDN1ObMdIFH6EouXDMF0631f2+me0tX3V763AlLtD6zL9gwp8izPoLgZ7Nkupc5BY8+ IY0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/izHlYo1eDjiSDXKoXYRwJfwLHOfDK99Sn/yTJcOteo=; b=uGFgDu8td9AdG/DRz1IS41WXzh6cmgChk5S3nWWE6kghj3wLgdppF/8EFkKucvBAiM si1AYay6OkmpVDkDkG573/sCRYiwPBrNymz6p+TF5dpw0Jxsqaq9JJQElNmNGm0Bglug lW1kAbIGjBPuMDZef70fUvAwiqzp0ajiKVcGdJhwkxnqEB7WmS8vm2PYLE2UyvzD++Jn 1DaCZeLR6gNxGDB5kLYR9VAZ9c1PWJSLOa5Q4frYzRZ7RThkHWyZVKKvRxwnXW651tbl LqPKqGWiiIb4Em//jWlbSl8ubwORJ+YyG270QTLG6kddT8bHfU+j68stkoF72HKotQR7 J83w== X-Gm-Message-State: AOAM532/sTF4qvR6740b8WwAaj5ATZ4Lo3+wjqd0JbeBbngISVRYd4gM W1p/TCtb+S4nJnjtIgZAg+3Slg== X-Google-Smtp-Source: ABdhPJx1b5JRspEhNJjDZABH5IyON/cBtOTNiA8YCvC+0yDGdoVKGQ3CJGe02GA/cl9SHXrZmF5pNg== X-Received: by 2002:adf:b355:: with SMTP id k21mr33101423wrd.451.1638194981510; Mon, 29 Nov 2021 06:09:41 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 6/8] MAINTAINERS: Remove me as a reviewer for the build and test/avocado Date: Mon, 29 Nov 2021 14:09:30 +0000 Message-Id: <20211129140932.4115115-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) 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=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, Beraldo Leal , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , f4bug@amsat.org, Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195959456100001 From: Willian Rampazzo Remove me as a reviewer for the Build and test automation and the Integration Testing with the Avocado Framework and add Beraldo Leal. Signed-off-by: Willian Rampazzo Reviewed-by: Beraldo Leal Message-Id: <20211122191124.31620-1-willianr@redhat.com> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211123205729.2205806-7-alex.bennee@linaro.org> --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d3879aa3c1..8f5156bfa7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3469,7 +3469,7 @@ M: Alex Benn=C3=A9e M: Philippe Mathieu-Daud=C3=A9 M: Thomas Huth R: Wainer dos Santos Moschetta -R: Willian Rampazzo +R: Beraldo Leal S: Maintained F: .github/lockdown.yml F: .gitlab-ci.yml @@ -3507,7 +3507,7 @@ W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa R: Philippe Mathieu-Daud=C3=A9 R: Wainer dos Santos Moschetta -R: Willian Rampazzo +R: Beraldo Leal S: Odd Fixes F: tests/avocado/ =20 --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638195757202302.4192092626955; Mon, 29 Nov 2021 06:22:37 -0800 (PST) Received: from localhost ([::1]:37232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhYC-0002Cf-1s for importer@patchew.org; Mon, 29 Nov 2021 09:22:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLl-0001MN-QU for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:45 -0500 Received: from [2a00:1450:4864:20::42b] (port=43808 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLj-0006W2-LV for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:45 -0500 Received: by mail-wr1-x42b.google.com with SMTP id v11so37084200wrw.10 for ; Mon, 29 Nov 2021 06:09:43 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b13sm10506316wrh.32.2021.11.29.06.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 84A701FF9E; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RyIHG7rbgW4Ax4rztavLtHw3c5eLl5GAByR6z8d2y5A=; b=PlfctvyAuSm/NmQ03mobkKCoMnJVg+7DfPA0Pp6KIEaM8hsDBm0x3+81xh2X6SRq/W yfZMWjbba04U2X3C+UdB5KycwWaMjdUhL2aTSlsR0fHAAC0eD4oWiKe2ZPp7pr49aDQ6 8NZtWsmsdZOX0wX088spbq+lWnexhZeUTP1gFfl9Wu2SuEL2A/ZEtFvWI2CWpk1IXR+L jUTv1Ohiaux7M5ojo1B+FbnrJdxRSLcTWSBW0Tl1z8MSPNfyCEh6cdQ30f+qdZjJ/0J2 jysTsPuQyAD1ojaq/33wSDv8qXq177KS7t9PwsjhSeOc53gspC21sPtOxFrdR3LDLX8a XDhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RyIHG7rbgW4Ax4rztavLtHw3c5eLl5GAByR6z8d2y5A=; b=olqlWWG+DbVhfBjmROSR/AtQi29Ijv8QrTis2GqwcqkvtQcud26MQR808ArsTFYDI7 Y5PS8+cUMaaZ4lwmn+kD66+y1h27iZoLd5S2lLlCyiym6DU4lUxVYVdz5X/hA2ko04fA tSRZm1liWeWu/EvvHUuwOm7YcdrpiS90/KJhmwV/W5IvSQhIXpqE8jMC2BY9oLeQZaGS N6te1uRvcztHFhOXETHawnoRaAXVzxNsOgZJ9fmpuIOBeNTwHUmJbY7y2N6GI89/2WcK L3XhOZTR7FliXdRkcp+er2rtNzaTpjFvNXd9gpLCxvHkbsOWQ2wBuLRT86exZazwx05v JmBw== X-Gm-Message-State: AOAM532sP7PJjz/RWutCpimBLDPXT2LdX28GyjlxO/3QjnI2CHjQBxwP Q+7XjNQ2dd5vhzImzL68ex+dfQ== X-Google-Smtp-Source: ABdhPJxMijliy5TF1HjZQVgItOk1ShpyUwe/SomF1kKjkKmb3X3ugvegOFNuG2AfpUWG3VqZ45iFyg== X-Received: by 2002:a5d:658c:: with SMTP id q12mr34347340wru.34.1638194982055; Mon, 29 Nov 2021 06:09:42 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 7/8] MAINTAINERS: Add section for Aarch64 GitLab custom runner Date: Mon, 29 Nov 2021 14:09:31 +0000 Message-Id: <20211129140932.4115115-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) 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=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638195758724100001 From: Philippe Mathieu-Daud=C3=A9 Add a MAINTAINERS section to cover the GitLab YAML config file containing the jobs run on the custom runner sponsored by the Works On Arm project [*]. [*] https://developer.arm.com/solutions/infrastructure/works-on-arm Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20211116163226.2719320-1-f4bug@amsat.org> Message-Id: <20211123205729.2205806-8-alex.bennee@linaro.org> --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8f5156bfa7..006a2293ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3511,6 +3511,12 @@ R: Beraldo Leal S: Odd Fixes F: tests/avocado/ =20 +GitLab custom runner (Works On Arm Sponsored) +M: Alex Benn=C3=A9e +M: Philippe Mathieu-Daud=C3=A9 +S: Maintained +F: .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml + Documentation ------------- Build system architecture --=20 2.30.2 From nobody Fri May 3 23:15:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1638196217777808.2941607700556; Mon, 29 Nov 2021 06:30:17 -0800 (PST) Received: from localhost ([::1]:57956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrhfa-0008Hy-Rn for importer@patchew.org; Mon, 29 Nov 2021 09:30:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrhLn-0001Ob-4b for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:47 -0500 Received: from [2a00:1450:4864:20::433] (port=40941 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrhLk-0006WE-Gn for qemu-devel@nongnu.org; Mon, 29 Nov 2021 09:09:46 -0500 Received: by mail-wr1-x433.google.com with SMTP id t9so20123351wrx.7 for ; Mon, 29 Nov 2021 06:09:44 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 138sm19954070wma.17.2021.11.29.06.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 06:09:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 913041FF9F; Mon, 29 Nov 2021 14:09:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bE1boPVSofZsVRYk/2tnKXg+GDOQQWyCjSc44kFDB+A=; b=HZWYqXh8i9QQU+OkMcfBc7J52UYZqVbXSj4nI2M5iaw1x3oz9UfzAx0nEUT5Iskt79 NJ779y0QLEjB4PtzWSYqn8hvarUFisVDRR7aD84UnwzzPhlFE5r+MDcQQ8uXr+jJ8VTD uP6ngFRTq7YmuIMJOFCHvfKhoYSpo+OFgXcgl+SAvJf+NwKgWYC38P9Y67C5PeFMbYcj shs4UQ73p4MNSDLxwE3gfZkLoTaVl8fiMjD7ACmjfNGM72Lk7iLzmTAHok+gVqQd6p1J iEHWifRXgCB1TAuviMmWwBBN7DtXl9ZVndBfUKWG41A4HYt/FEmjg9BCI+eCDdzG7bCa 76CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bE1boPVSofZsVRYk/2tnKXg+GDOQQWyCjSc44kFDB+A=; b=FLKn15qgbxwuf3vrZoJV16rsnSUtnP6yPzFLfpP98hcnDXE3cOo9Kw8l7MJM1Rgmxn jff9M67IlWWdWcKRprt2qRNimmHaTp8bQSe1i+D8KwVoLuM/QGg1sW/qccXmvPKpGVQ3 JmzBda6h4yxZNkianb7xunoVfDydEuLJcJ38rSORGrN09j8swDQTsIr/wHhK/37VSFeQ K0yfrQmlTmGgIVp5f16ZXItZ/9eklC6ayRLlZcpcPmgVlmjMPVDusqcmjChyTrb+shgW qSGO9QA+ebu4kdzjtBomkj53QNNiXXxC5VEvY8JxnttB53efEWqbC+KjRlHYqenLpWZG d/XQ== X-Gm-Message-State: AOAM533EZsBS+Qe/ZUYrMl3CiZVn//DMEMVnCl2V5y6oXLBAi2DcX9a5 ApaVhaduG8Dc+EUHgRSPoQEFNQ== X-Google-Smtp-Source: ABdhPJwW5trdXzFhLjB7OVnwYe6ApnBTfMMRSoqcTwqUI5mauZ+2OkJuXeuDcCif5T7W9XUNF5ONYg== X-Received: by 2002:a05:6000:18a3:: with SMTP id b3mr34450461wri.343.1638194983187; Mon, 29 Nov 2021 06:09:43 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 8/8] tests/plugin/syscall.c: fix compiler warnings Date: Mon, 29 Nov 2021 14:09:32 +0000 Message-Id: <20211129140932.4115115-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129140932.4115115-1-alex.bennee@linaro.org> References: <20211129140932.4115115-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) 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=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=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: , Cc: fam@euphon.net, berrange@redhat.com, Juro Bystricky , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, Mahmoud Mandour , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1638196219976100001 From: Juro Bystricky Fix compiler warnings. The warnings can result in a broken build. This patch fixes warnings such as: In file included from /usr/include/glib-2.0/glib.h:111, from ../tests/plugin/syscall.c:13: ../tests/plugin/syscall.c: In function =E2=80=98print_entry=E2=80=99: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: =E2=80=98out=E2= =80=99 may be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] g_free (*pp); ^~~~~~~~~~~~ ../tests/plugin/syscall.c:82:23: note: =E2=80=98out=E2=80=99 was declared h= ere g_autofree gchar *out; ^~~ In file included from /usr/include/glib-2.0/glib.h:111, from ../tests/plugin/syscall.c:13: ../tests/plugin/syscall.c: In function =E2=80=98vcpu_syscall_ret=E2=80=99: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: =E2=80=98out=E2= =80=99 may be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] g_free (*pp); ^~~~~~~~~~~~ ../tests/plugin/syscall.c:73:27: note: =E2=80=98out=E2=80=99 was declared h= ere g_autofree gchar *out; ^~~ cc1: all warnings being treated as errors Signed-off-by: Juro Bystricky Signed-off-by: Alex Benn=C3=A9e Message-Id: <20211128011551.2115468-1-juro.bystricky@intel.com> Reviewed-by: Richard Henderson --- tests/plugin/syscall.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 484b48de49..96040c578f 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c @@ -70,19 +70,17 @@ static void vcpu_syscall_ret(qemu_plugin_id_t id, unsig= ned int vcpu_idx, } g_mutex_unlock(&lock); } else { - g_autofree gchar *out; - out =3D g_strdup_printf("syscall #%" PRIi64 " returned -> %" PRIi6= 4 "\n", - num, ret); + g_autofree gchar *out =3D g_strdup_printf( + "syscall #%" PRIi64 " returned -> %" PRIi64 "\n", num, ret); qemu_plugin_outs(out); } } =20 static void print_entry(gpointer val, gpointer user_data) { - g_autofree gchar *out; SyscallStats *entry =3D (SyscallStats *) val; int64_t syscall_num =3D entry->num; - out =3D g_strdup_printf( + g_autofree gchar *out =3D g_strdup_printf( "%-13" PRIi64 "%-6" PRIi64 " %" PRIi64 "\n", syscall_num, entry->calls, entry->errors); qemu_plugin_outs(out); --=20 2.30.2